diff --git a/service/matching/matching_engine.go b/service/matching/matching_engine.go index 98ba1dc2ede..feb1b40de13 100644 --- a/service/matching/matching_engine.go +++ b/service/matching/matching_engine.go @@ -2859,6 +2859,12 @@ func (e *matchingEngineImpl) pollTask( // returned to the handler before a context timeout error is generated. workerInstanceKey := pollMetadata.workerInstanceKey if workerInstanceKey != "" && e.shutdownWorkers.Get(workerInstanceKey) != nil { + e.logger.Info("Rejecting poll from recently-shutdown worker", + tag.WorkflowNamespaceID(partition.NamespaceId()), + tag.WorkflowTaskQueueName(partition.TaskQueue().Name()), + tag.WorkflowTaskQueueType(partition.TaskType()), + tag.NewStringTag("worker-instance-key", workerInstanceKey), + ) return nil, false, errNoTasks }