Files
temporal/api/matchingservicemock/v1
Kannan Rajah abdc95a763 Add CancelOutstandingWorkerPolls RPC to matching service (#9202)
## 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.
2026-02-10 18:57:33 -08:00
..