Skip to content

Commit fa4be0a

Browse files
committed
Update comment for standby executor
1 parent f983d6b commit fa4be0a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

service/history/api/respondworkflowtaskcompleted/workflow_task_completed_handler.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -666,6 +666,7 @@ func (handler *workflowTaskCompletedHandler) handleCommandRequestCancelActivity(
666666
handler.activityNotStartedCancelled = true
667667
} else if ai.StartedEventId != common.EmptyEventID {
668668
// Activity has started - create cancel task and send to worker via Nexus.
669+
// TODO: Batch tasks for the same control queue.
669670
if err := handler.mutableState.AddCancelActivityNexusTasks(ai.ScheduledEventId); err != nil {
670671
return nil, err
671672
}

service/history/transfer_queue_standby_task_executor.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ func (t *transferQueueStandbyTaskExecutor) Execute(
109109
case *tasks.ChasmTask:
110110
err = t.executeChasmSideEffectTransferTask(ctx, task)
111111
case *tasks.CancelActivityNexusTask:
112-
// Cancel activity nexus task is best-effort and only processed in active cluster
112+
// Nexus operation is synchronous. So if the failover happens waiting for the Nexus response,
113+
// the task will be retried in standby.
113114
err = nil
114115
default:
115116
err = errUnknownTransferTask

0 commit comments

Comments
 (0)