langflow-ai / langflow

Langflow is a low-code app builder for RAG and multi-agent AI applications. It’s Python-based and agnostic to any model, API, or database.
http://www.langflow.org
MIT License
35.58k stars 4.23k forks source link

Index_name Confusion of OpenSearch #4422

Open songjinu opened 2 weeks ago

songjinu commented 2 weeks ago

The Parallel calls of '/run/{flow_id}' API with different index_name (by tweaks) in OpenSearch: A Test for Index_name Confusion. when sequencially call API, No prob. Any one help what the problem? (I'm in 1.0.16)

Could We Parallel calls a same flow_id '/run/{flow_id}' API with many different tweaks ?

asilism commented 2 weeks ago

Hello, I'm a coworker with songjinu. We have confirmed that this phenomenon only occurs in certain components.

  1. A component that has been inherited.
  2. outputs are defined in the parent component such as , RecursiveCharacterTextSplitterComponent / LCTextSplitterComponent , OpenSearchComponent / LCVectorStoreComponent

I suspect that the cause is exec_globals used when build_custom_class is called. I'm testing deepcopy() outputs in a child class, but I'm not sure if this is the right approach, since the code is so complex.

if exec_globals[class_name].outputs is not None:
            exec_globals[class_name].outputs = copy.deepcopy(exec_globals[class_name].outputs)
songjinu commented 2 weeks ago

@joaoguilhermeS, @ogabrielluiz Are there good ways to avoid shared The result of outputs in concurrent processing ?