-
Notifications
You must be signed in to change notification settings - Fork 867
Test active-active behavior with concurrent SignalWithStart requests #7270
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
4223ea1
Started getting the sim test to work. Remaining work includes fixing …
c-warren 664b728
ymmv
c-warren c87a106
Merge branch 'master' into cwarren/swssim
c-warren 6e3e75d
Fix the queryWorkflow parts of the test
c-warren a74cc78
Add to github actions, add additional test
c-warren cd78752
missing config files
c-warren File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
23 changes: 23 additions & 0 deletions
23
config/dynamicconfig/replication_simulation_activeactive_same_wfid_signalwithstart.yml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # This file is used as dynamicconfig override for "activeactive_same_wfid_signalwithstart" replication simulation scenario | ||
| # configured via simulation/replication/testdata/replication_simulation_activeactive_same_wfid_signalwithstart.yaml | ||
| system.writeVisibilityStoreName: | ||
| - value: "db" | ||
| system.readVisibilityStoreName: | ||
| - value: "db" | ||
| history.replicatorTaskBatchSize: | ||
| - value: 25 | ||
| constraints: {} | ||
| frontend.failoverCoolDown: | ||
| - value: 5s | ||
| history.ReplicationTaskProcessorStartWait: # default is 5s. repl task processor sleeps this much before processing received messages. | ||
| - value: 10ms | ||
| history.standbyTaskMissingEventsResendDelay: | ||
| - value: 5s | ||
| history.standbyTaskMissingEventsDiscardDelay: | ||
| - value: 10s | ||
| history.standbyClusterDelay: | ||
| - value: 10s | ||
| history.enableTransferQueueV2: | ||
| - value: true | ||
| history.enableTimerQueueV2: | ||
| - value: true |
23 changes: 23 additions & 0 deletions
23
...g/dynamicconfig/replication_simulation_activeactive_same_wfid_signalwithstart_delayed.yml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # This file is used as dynamicconfig override for "activeactive_same_wfid_signalwithstart_delayed" replication simulation scenario | ||
| # configured via simulation/replication/testdata/replication_simulation_activeactive_same_wfid_signalwithstart_delayed.yaml | ||
| system.writeVisibilityStoreName: | ||
| - value: "db" | ||
| system.readVisibilityStoreName: | ||
| - value: "db" | ||
| history.replicatorTaskBatchSize: | ||
| - value: 25 | ||
| constraints: {} | ||
| frontend.failoverCoolDown: | ||
| - value: 5s | ||
| history.ReplicationTaskProcessorStartWait: # default is 5s. repl task processor sleeps this much before processing received messages. | ||
| - value: 10ms | ||
| history.standbyTaskMissingEventsResendDelay: | ||
| - value: 5s | ||
| history.standbyTaskMissingEventsDiscardDelay: | ||
| - value: 10s | ||
| history.standbyClusterDelay: | ||
| - value: 10s | ||
| history.enableTransferQueueV2: | ||
| - value: true | ||
| history.enableTimerQueueV2: | ||
| - value: true |
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
103 changes: 103 additions & 0 deletions
103
...n/replication/testdata/replication_simulation_activeactive_same_wfid_signalwithstart.yaml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,103 @@ | ||
| # This file is a replication simulation scenario spec. | ||
| # It is parsed into ReplicationSimulationConfig struct. | ||
| # Replication simulation for this file can be run via ./simulation/replication/run.sh activeactive_same_wfid_signalwithstart | ||
| # Dynamic config overrides can be set via config/dynamicconfig/replication_simulation_activeactive_same_wfid_signalwithstart.yml | ||
| # When a domain is configured as active-active | ||
| # And the same workflow ID is used to SignalWithStart in multiple clusters | ||
| # Then the 'earlier' workflow should be terminated | ||
| # And the 'later' workflow should complete | ||
|
|
||
| clusters: | ||
| cluster0: | ||
| grpcEndpoint: "cadence-cluster0:7833" | ||
| cluster1: | ||
| grpcEndpoint: "cadence-cluster1:7833" | ||
|
|
||
| # primaryCluster is where domain data is written to and replicates to others. e.g. domain registration | ||
| primaryCluster: "cluster0" | ||
|
|
||
| domains: | ||
| test-domain-aa-conflict: | ||
| activeClustersByRegion: | ||
| region0: cluster0 | ||
| region1: cluster1 | ||
|
|
||
| operations: | ||
| - op: signal_with_start_workflow | ||
| at: 0s | ||
| workflowID: conflict-wf | ||
| workflowType: timer-activity-loop-workflow | ||
| cluster: cluster0 | ||
| domain: test-domain-aa-conflict | ||
| signalName: custom-signal | ||
| signalInput: "cluster0-signal-data" | ||
| workflowExecutionStartToCloseTimeout: 65s | ||
| workflowDuration: 35s | ||
| runIDKey: cluster0-run | ||
|
|
||
| - op: signal_with_start_workflow | ||
| at: 2s | ||
| workflowID: conflict-wf | ||
| workflowType: timer-activity-loop-workflow | ||
| cluster: cluster1 | ||
| domain: test-domain-aa-conflict | ||
| signalName: custom-signal | ||
| signalInput: "cluster1-signal-data" | ||
| workflowExecutionStartToCloseTimeout: 65s | ||
| workflowDuration: 35s | ||
| runIDKey: cluster1-run | ||
|
|
||
| # Query the cluster0 run to validate it was started with the correct signal | ||
| # Note that if this query is delayed it will eventually see the signal from the 'later' workflow | ||
| - op: query_workflow | ||
| at: 3s | ||
| workflowID: conflict-wf | ||
| cluster: cluster0 | ||
| domain: test-domain-aa-conflict | ||
| query: latest-signal-content | ||
| runIDKey: cluster0-run | ||
| want: | ||
| queryResult: ["cluster0-signal-data"] | ||
|
|
||
| # Query the cluster1 run to validate it was started with the correct signal | ||
| - op: query_workflow | ||
| at: 3s | ||
| workflowID: conflict-wf | ||
| cluster: cluster1 | ||
| domain: test-domain-aa-conflict | ||
| query: latest-signal-content | ||
| runIDKey: cluster1-run | ||
| want: | ||
| queryResult: ["cluster1-signal-data"] | ||
|
|
||
| - op: validate | ||
| at: 30s | ||
| workflowID: conflict-wf | ||
| runIDKey: cluster0-run | ||
| cluster: cluster0 | ||
| domain: test-domain-aa-conflict | ||
| want: | ||
| status: terminated | ||
| startedByWorkersInCluster: cluster0 | ||
| completedByWorkersInCluster: cluster0 | ||
|
|
||
| - op: validate | ||
| at: 30s | ||
| workflowID: conflict-wf | ||
| runIDKey: cluster1-run | ||
| cluster: cluster0 | ||
| domain: test-domain-aa-conflict | ||
| want: | ||
| status: running | ||
| startedByWorkersInCluster: cluster1 | ||
|
|
||
| - op: validate | ||
| at: 70s | ||
| workflowID: conflict-wf | ||
| runIDKey: cluster1-run | ||
| cluster: cluster0 | ||
| domain: test-domain-aa-conflict | ||
| want: | ||
| status: completed | ||
| startedByWorkersInCluster: cluster1 | ||
| completedByWorkersInCluster: cluster1 | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.