mirror of
https://github.com/temporalio/temporal.git
synced 2026-08-30 18:41:49 -07:00
## What changed? Adds infrastructure to cancel all outstanding polls for a worker instance during shutdown. Key Changes: 1. request_response.proto / service.proto - New CancelOutstandingWorkerPolls RPC that cancels polls by worker_instance_key instead of individual poller_id 2. matching_engine.go: - Added workerInstancePollers map to track pollers by worker instance key - pollTask() now registers pollers in both outstandingPollers (by pollerID) and workerInstancePollers (by worker key) - CancelOutstandingWorkerPolls() cancels all pollers for a worker instance and returns count ## Why? To support eager cancellation of outstanding polls when worker call ShutdownWorker. ## How did you test it? - [ ] built - [ ] run locally and tested manually - [ ] covered by existing tests - [x] added new unit test(s) - [ ] added new functional test(s) ## Potential risks None. No changes to existing functionality.