Preserve reset request IDs in workflow history - #873
Open
Qian-Cheng-nju wants to merge 1 commit into
Open
Qian-Cheng-nju wants to merge 1 commit into
Qian-Cheng-nju 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.
What changed?
Add
reset_request_idtoWorkflowTaskFailedEventAttributesfor events with causeRESET_WORKFLOW, and regenerate the OpenAPI schemas. The field identifies the public reset request that creatednew_run_id. Internal resets leave it empty.Why?
Reset request deduplication must survive history-based replication and mutable-state reconstruction. A request ID stored only in mutable state is lost under legacy event-based cross-cluster replication, so a retry after failover can create another reset run. Keeping the ID in the existing reset event lets the server rebuild its deduplication index without changing the workflow-start request ID used by callbacks.
Breaking changes
None at the wire level: this adds an optional proto3 string field. Older history has an empty value. Older servers do not gain the new deduplication behavior until upgraded.
Server PR
temporalio/temporal#12042
Validation
buf lint,buf breakingagainst main,buf build, API lint, OpenAPI generation and path-conflict check. The companion server changes pass local reset/rebuild and callback regressions, plus failover tests with transition history enabled and disabled, using locally generated Go bindings.