-
Notifications
You must be signed in to change notification settings - Fork 766
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly update workflow transition history (#5885)
## What changed? <!-- Describe what has changed in this PR --> - Properly update workflow transition history. - Only update transition history when closing transaction as active - Only update updates to replicated application state as state transition (NOTE: this is a different concept from the existing state transition counter we have in executionInfo, which is simply how many times the mutable state object got updated.) - When sub state machine tree is dirty - When history event got generated. - When there's sync activity - All other changes are either system level field update or not replicated (e.g. buffer events or transient workflow task) ## Why? <!-- Tell your future self why have you made these changes --> - State-based replication rely on all clusters agree on the same transition history. and replication task processing logic relies on the transition history to detect missing or conflicting state transitions. ## How did you test it? <!-- How have you verified this change? Tested locally? Added a unit test? Checked in staging env? --> - Existing tests - Added unit tests ## Potential risks <!-- Assuming the worst case, what can be broken when deploying this change to production? --> - State transition history is behind a feature flag so no risk. ## Documentation <!-- Have you made sure this change doesn't falsify anything currently stated in `docs/`? If significant new behavior is added, have you described that in `docs/`? --> - N/A ## Is hotfix candidate? <!-- Is this PR a hotfix candidate or does it require a notification to be sent to the broader community? (Yes/No) --> - No
- Loading branch information
Showing
11 changed files
with
465 additions
and
164 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#frontend.enableClientVersionCheck: | ||
#- value: true | ||
# constraints: {} | ||
#history.persistenceMaxQPS: | ||
#- value: 3000 | ||
# constraints: {} | ||
#frontend.persistenceMaxQPS: | ||
#- value: 3000 | ||
# constraints: {} | ||
#frontend.throttledLogRPS: | ||
#- value: 20 | ||
# constraints: {} | ||
#history.defaultActivityRetryPolicy: | ||
#- value: | ||
# InitialIntervalInSeconds: 1 | ||
# MaximumIntervalCoefficient: 100.0 | ||
# BackoffCoefficient: 2.0 | ||
# MaximumAttempts: 0 | ||
#history.defaultWorkflowRetryPolicy: | ||
#- value: | ||
# InitialIntervalInSeconds: 1 | ||
# MaximumIntervalCoefficient: 100.0 | ||
# BackoffCoefficient: 2.0 | ||
# MaximumAttempts: 0 | ||
#system.secondaryVisibilityWritingMode: | ||
# - value: "off" | ||
# constraints: {} | ||
#system.enableReadFromSecondaryVisibility: | ||
# - value: false | ||
# constraints: {} | ||
#system.enableParentClosePolicyWorker: | ||
# - value: true | ||
system.enableEagerWorkflowStart: | ||
- value: true | ||
frontend.enableUpdateWorkflowExecution: | ||
- value: true | ||
frontend.enableUpdateWorkflowExecutionAsyncAccepted: | ||
- value: true | ||
frontend.workerVersioningDataAPIs: | ||
- value: true | ||
frontend.workerVersioningWorkflowAPIs: | ||
- value: true | ||
frontend.accessHistoryFraction: | ||
- value: 1.0 | ||
frontend.adminDeleteAccessHistoryFraction: | ||
- value: 1.0 | ||
system.enableNexus: | ||
# enableNexus also controls transition history which can't be enabled now | ||
- value: false | ||
component.nexusoperations.callback.endpoint.template: | ||
- value: http://localhost:7243/api/v1/namespaces/{{.NamespaceName}}/nexus/callback | ||
matching.queryWorkflowTaskTimeoutLogRate: | ||
- value: 1.0 | ||
history.ReplicationEnableUpdateWithNewTaskMerge: | ||
- value: true | ||
history.enableWorkflowExecutionTimeoutTimer: | ||
- value: true |
Oops, something went wrong.