Fix SignalWithStart hang on orphaned current-execution pointer - #11774
Open
ryancocuzzo wants to merge 1 commit into
Open
Fix SignalWithStart hang on orphaned current-execution pointer#11774ryancocuzzo wants to merge 1 commit into
ryancocuzzo wants to merge 1 commit into
Conversation
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.
Fixes #10841
What changed?
On a BrandNew conflict against a completed current row, overwrite it with UpdateCurrent. Same recovery StartWorkflow already has. Reuse policy still runs. Running conflicts still return
CurrentWorkflowConditionFailedError.Why?
Cassandra can leave
current_executionspointing at a run whose mutable state is gone. SignalWithStart treats that as "no current workflow", BrandNew loses the CAS, and the history handler retries that error with no backoff until the client deadline.That retry exists for concurrent starts. In this case it never succeeds. The reporter unstuck themselves with admin
DeleteWorkflowExecution— that one actually removes the pointer.SQL doesn't hang here. The lock query inner-joins
executions, so the orphan is invisible and you get a unique constraint instead.How did you tt it?
Unit tests cover the happy path (TIMED_OUT pointer → new run), REJECT_DUPLICATE, and leaving a running conflict alone.
Cassandra functional test: complete a workflow, delete mutable state while leaving the pointer, CloseShard so cache can't hide it, SignalWithStart with a 10s timeout. Used to wait out the deadline.
Potential risks
Overwriting a running current row would break concurrent SignalWithStart. We don't.
Not touching the handler retry loop, and not changing SQL in this PR.