inquiry race condition fix; default max concurrency, db max delay - #6399
Open
guzzijones wants to merge 14 commits into
Open
inquiry race condition fix; default max concurrency, db max delay#6399guzzijones wants to merge 14 commits into
guzzijones wants to merge 14 commits into
Conversation
per-workflow coord lock on the resume paths and on handle_workflow_execution, RESUMING self-transition in request_next_tasks, wall-clock deadline on request_next_tasks, stop_max_delay on all retry_on_transient_db_errors decorators, and widened retry_on_connection_errors to cover pymongo.ConnectionFailure.
guzzijones
marked this pull request as draft
August 27, 2026 11:27
guzzijones
marked this pull request as ready for review
August 27, 2026 22:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
stop_max_delay=cfg.CONF.workflow_engine.retry_stop_max_msec(60 s default) added to every
retry_on_transient_db_errorsdecorator in
st2common.services.workflows— 10 call sitesincluding
request,request_pause,request_resume,request_cancellation,update_task_state,update_task_execution,resume_task_execution,update_workflow_execution,resume_workflow_execution,fail_workflow_execution. When the ceiling is hit, the lastStackStormDBObjectWriteConflictErrorpropagates out toWorkflowExecutionHandler.process, which routes it tofail_workflow_executionand releases the coordination lock —freeing every other message waiting behind that workflow.
Back story
We had an unbounded with items that filled up the work queues. The actions were continuously rescheduled due to the process that looks back 1 minute for zombie actions. Fix 3 is more of a fail safe for mongo writes. It came about when reviewing this. Fix 1 was noticed when reviewing logs that every inquiry causes a db write conflict. Fix 2 actually bounds unbounded with items as an option.