Add support for strong consistency on GetWorkflowHistory and DescribeWorkflowExecution #1445
+583
−15
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?
Adds support to make requests with a QueryConsistencyLevel to:
Using
STRONG
as the QueryConsistencyLevel will direct cadence to retrieve information from the "active" cluster, regardless of where the request is received (active or passive). Note that this will increase the latency of requests that are received in the passive cluster.The existing methods have been kept for compatibility and can continue to be used.
Why?
Supports the equivalent changes to
cadence-frontend
.How did you test it?
Unit tests locally. New integration tests.
Potential risks
Detailed Description
[In-depth description of the changes made to the interfaces, specifying new fields, removed fields, or modified data structures]
GetWorkflowHistory and DescribeWorkflowExecution have not been changed.
New methods, GetWorkflowHistoryWithOptions and DescribeWorkflowExecutionWithOptions have been added, mirroring the same payloads sent to the original methods but with an extensible struct passed with the new option
QueryConsistencyLevel
.The existing methods now call the new
...WithOptions
methods, with the QueryConsistencyLevel not populated.Impact Analysis
The existing methods will behave as they do today, and will not respect the QueryConsistencyLevel query parameter.
The new structs are forwards compatible if no fields are removed (and all fields continue to be respected).
Testing Plan
Rollout Plan