Skip to content

Commit bc32f23

Browse files
authored
fix(cluster-forwarding): do not forward activity heartbeat in selected-apis-forwarding-v2 (#7488)
<!-- Describe what has changed in this PR --> **What changed?** Remove activity heartbeat from selected-apis-forwarding-v2 <!-- Tell your future self why have you made these changes --> **Why?** Prevent issues after failover when a large number of heartbeat requests arrive before replication. Activity heartbeat can happen very frequently and result in a large number of requests. <!-- How have you verified this change? Tested locally? Added a unit test? Checked in staging env? --> **How did you test it?** <!-- Assuming the worst case, what can be broken when deploying this change to production? --> **Potential risks** <!-- Is it notable for release? e.g. schema updates, configuration or data migration required? If so, please mention it, and also update CHANGELOG.md --> **Release notes** Removing activity heartbeat from selected-apis-forwarding-v2 because of issues after failover due to possible large volume of heartbeat requests forwarded before event replication. <!-- Is there any documentation updates should be made for config, https://cadenceworkflow.io/docs/operation-guide/setup/ ? If so, please open an PR in https://github.com/cadence-workflow/cadence-docs --> **Documentation Changes** Signed-off-by: fimanishi <[email protected]>
1 parent 5c79d73 commit bc32f23

File tree

1 file changed

+7
-11
lines changed
  • service/frontend/wrappers/clusterredirection

1 file changed

+7
-11
lines changed

service/frontend/wrappers/clusterredirection/policy.go

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,21 +53,19 @@ const (
5353
// please also reference selectedAPIsForwardingRedirectionPolicyAPIAllowlist and DCRedirectionPolicySelectedAPIsForwardingV2
5454
DCRedirectionPolicySelectedAPIsForwarding = "selected-apis-forwarding"
5555
// DCRedirectionPolicySelectedAPIsForwardingV2 forwards everything in DCRedirectionPolicySelectedAPIsForwarding,
56-
// as well as activity completions (sync and async) and heartbeats.
56+
// as well as activity completions (sync and async).
5757
// This is done because activity results are generally deemed "useful" and relatively costly to re-do (when it is
5858
// even possible to redo), but activity workers themselves may be datacenter-specific.
5959
//
6060
// This will likely replace DCRedirectionPolicySelectedAPIsForwarding soon.
6161
//
6262
// 1-6. from DCRedirectionPolicySelectedAPIsForwarding
63-
// 7. RecordActivityTaskHeartbeat
64-
// 8. RecordActivityTaskHeartbeatByID
65-
// 9. RespondActivityTaskCanceled
66-
// 10. RespondActivityTaskCanceledByID
67-
// 11. RespondActivityTaskCompleted
68-
// 12. RespondActivityTaskCompletedByID
69-
// 13. RespondActivityTaskFailed
70-
// 14. RespondActivityTaskFailedByID
63+
// 7. RespondActivityTaskCanceled
64+
// 8. RespondActivityTaskCanceledByID
65+
// 9. RespondActivityTaskCompleted
66+
// 10. RespondActivityTaskCompletedByID
67+
// 11. RespondActivityTaskFailed
68+
// 12. RespondActivityTaskFailedByID
7169
// please also reference selectedAPIsForwardingRedirectionPolicyAPIAllowlistV2
7270
DCRedirectionPolicySelectedAPIsForwardingV2 = "selected-apis-forwarding-v2"
7371
// DCRedirectionPolicyAllDomainAPIsForwarding means forwarding all the worker and non-worker APIs based domain,
@@ -142,8 +140,6 @@ var selectedAPIsForwardingRedirectionPolicyAPIAllowlistV2 = map[string]struct{}{
142140
"TerminateWorkflowExecution": {},
143141
"ResetWorkflowExecution": {},
144142
// additional endpoints
145-
"RecordActivityTaskHeartbeat": {},
146-
"RecordActivityTaskHeartbeatByID": {},
147143
"RespondActivityTaskCanceled": {},
148144
"RespondActivityTaskCanceledByID": {},
149145
"RespondActivityTaskCompleted": {},

0 commit comments

Comments
 (0)