-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] RestStatus.CONFLICT when updating the state index with two steps concurrently #977
Comments
There is actually no conflict in the flow framework template, so I doubt whether there is some bug in the flow framework. The error seems to come from the JAVA file |
[Catch All Triage - 1, 2, 3] |
Flow Framework does not have any APIs that return flow-framework/src/main/java/org/opensearch/flowframework/indices/FlowFrameworkIndicesHandler.java Line 867 in 0284554
That method is called in two places; this call is a response to a GET so wouldn't produce that exception: flow-framework/src/main/java/org/opensearch/flowframework/indices/FlowFrameworkIndicesHandler.java Line 830 in 0284554
And here where we're trying to update the state index document but failing after 3 retries: flow-framework/src/main/java/org/opensearch/flowframework/indices/FlowFrameworkIndicesHandler.java Lines 823 to 829 in 0284554
The fact that you don't always get the error implies a probable race condition. In this case it looks like we may be trying to simultaneously update the state document from multiple different workflow steps at the same time. Here's a look at the steps being executed: (indented steps depend on the one above them)
Given the We are using In theory, we could mitigate this in Flow Framework with one or more of the following:
In the meantime, you can adjust the template to work around the race condition using one of the following
I'll leave this issue open as a feature request to improve our handling of simultaneous updates. |
Bug introduced here: prior version with painless script would use a new source document to update on retries: Possible fix would follow a simplified version of the DDB Client changes in this PR: |
What is the bug?
Users may not be able to provision the
text-to-visualization-claude.json
sample template.How can one reproduce the bug?
Provision the flow framework for text to visualization agents. Please remember to
You may meet with error. (This error may not always happen)
What is the expected behavior?
The flow framework provision API should work.
What is your host/environment?
Operating system, version.
Do you have any screenshots?
If applicable, add screenshots to help explain your problem.
Do you have any additional context?
Add any other context about the problem.
The text was updated successfully, but these errors were encountered: