Skip to content

Commit 832a576

Browse files
rkannan82claude
andauthored
Log rejection of polls from recently-shutdown workers (#9811)
## What Add an Info-level log when a poll is rejected because the worker is in the shutdown cache. Follows up on #9545. ## Why The shutdown-worker cache returns `errNoTasks` silently, making cache rejections indistinguishable from normal empty polls. This log helps operators debug cases where a worker's polls aren't getting tasks post-shutdown. ## How did you test it? Built. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a78e744 commit 832a576

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

service/matching/matching_engine.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2859,6 +2859,12 @@ func (e *matchingEngineImpl) pollTask(
28592859
// returned to the handler before a context timeout error is generated.
28602860
workerInstanceKey := pollMetadata.workerInstanceKey
28612861
if workerInstanceKey != "" && e.shutdownWorkers.Get(workerInstanceKey) != nil {
2862+
e.logger.Info("Rejecting poll from recently-shutdown worker",
2863+
tag.WorkflowNamespaceID(partition.NamespaceId()),
2864+
tag.WorkflowTaskQueueName(partition.TaskQueue().Name()),
2865+
tag.WorkflowTaskQueueType(partition.TaskType()),
2866+
tag.NewStringTag("worker-instance-key", workerInstanceKey),
2867+
)
28622868
return nil, false, errNoTasks
28632869
}
28642870

0 commit comments

Comments
 (0)