You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Retry ForwardPoll on ResourceExhausted instead of disabling forwarding (#10019)
## What
On child partitions, when `ForwardPoll` gets a `ResourceExhausted`
error, re-enqueue the poller with forwarding still enabled so it
retries.
## Why
When `frontend.enableCancelWorkerPollsOnShutdown` is enabled, a wave of
cancelled polls followed by re-polls can trigger rate limiting on the
root partition. The `forwardPolls` goroutine was treating
`ResourceExhausted` the same as other errors — permanently disabling
forwarding by setting `forwardCtx = nil`. This caused the poll to fall
back to waiting for a local task match, which on a child partition with
no backlog means waiting the full 60s long-poll timeout before the
poller retries.
The `forwardTasks` goroutine already had proper `ResourceExhausted`
retry logic with exponential backoff; `forwardPolls` was missing it.
## How did you test it?
Unit test (`TestForwardPollRetriesOnResourceExhausted`) that sets up a
child partition with a mock matching client returning
`ResourceExhausted` on the first `ForwardPoll` call and a valid task on
the second, then verifies the poll succeeds via retry.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
0 commit comments