Increase max attempts to 30 to cover matching restarts

With task reschedule backoff (initial=1s, coefficient=1.1), 30 attempts
covers ~2 minutes of cumulative backoff. Transport errors fail fast
(no blocking wait), so 30 attempts is cheap.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Kannan Rajah
2026-08-29 11:56:31 -07:00
parent 1e05695774
commit 2206ed337b
2 changed files with 4 additions and 4 deletions

View File

@@ -217,8 +217,8 @@ in the consistent hash ring used by ringpop. Changing it may cause service disru
)
WorkerCommandsMaxAttempts = NewGlobalIntSetting(
"system.workerCommandsMaxAttempts",
5,
`WorkerCommandsMaxAttempts is the maximum number of dispatch attempts for a worker commands task before dropping it.`,
30,
`WorkerCommandsMaxAttempts is the maximum number of dispatch attempts for a worker commands task before dropping it. With the default task reschedule backoff (initial=1s, coefficient=1.1), 30 attempts covers ~2 minutes of retries, enough to ride out a matching rolling restart.`,
)
NamespaceMinRetentionGlobal = NewGlobalDurationSetting(
"system.namespaceMinRetentionGlobal",

View File

@@ -293,8 +293,8 @@ func (s *outboundQueueActiveTaskExecutorSuite) TestExecute_WorkerCommandsTask_Ex
}
s.mockExecutable.EXPECT().GetTask().Return(task).AnyTimes()
// Default WorkerCommandsMaxAttempts is 5; use a higher value to trigger the drop.
s.mockExecutable.EXPECT().Attempt().Return(6).AnyTimes()
// Default WorkerCommandsMaxAttempts is 30; use a higher value to trigger the drop.
s.mockExecutable.EXPECT().Attempt().Return(31).AnyTimes()
s.mockExecutable.EXPECT().GetWorkflowID().Return("").AnyTimes()
result := s.executor.Execute(ctx, s.mockExecutable)