You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for strong consistency on GetWorkflowHistory and DescribeWorkflowExecution (#1445)
What changed?
Adds support to make requests with a QueryConsistencyLevel to:
GetWorkflowHistory
DescribeWorkflowExecution
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.
// ParentClosePolicy defines the behavior performed on a child workflow when its parent is closed
82
88
ParentClosePolicy= internal.ParentClosePolicy
83
89
90
+
// QueryConsistencyLevel defines the level of consistency the query should respond with.
91
+
// It will default to the cluster's configuration if not specified.
92
+
// Valid values are QueryConsistencyLevelEventual (served by the receiving cluster), and QueryConsistencyLevelStrong (redirects to the active cluster).
// DescribeTaskList returns information about the target tasklist, right now this API returns the
371
388
// pollers which polled this tasklist in last few minutes.
372
389
// The errors it can return:
@@ -569,6 +586,11 @@ type (
569
586
// ParentClosePolicy defines the action on children when parent is closed
570
587
ParentClosePolicyint
571
588
589
+
// QueryConsistencyLevel defines the level of consistency the query should respond with.
590
+
// It will default to the cluster's configuration if not specified.
591
+
// Valid values are QueryConsistencyLevelEventual (served by the receiving cluster), and QueryConsistencyLevelStrong (redirects to the active cluster).
592
+
QueryConsistencyLevelint
593
+
572
594
// ActiveClusterSelectionPolicy defines the policy for selecting the active cluster to start the workflow execution on for active-active domains.
573
595
// Active-active domains can be configured to be active in multiple clusters (at most one in a given region).
574
596
// Individual workflows can be configured to be active in one of the active clusters of the domain.
@@ -620,6 +642,15 @@ const (
620
642
WorkflowIDReusePolicyTerminateIfRunning
621
643
)
622
644
645
+
const (
646
+
// QueryConsistencyLevelUnspecified will use the default consistency level provided by the cluster.
0 commit comments