router: grant an in-flight resume a bounded grace past the park budget when a worker is already assigned - #676
Open
yufan-su wants to merge 1 commit into
Open
Conversation
… worker is already assigned
yufan-su
force-pushed
the
resume-commit-grace
branch
from
July 31, 2026 22:59
1c260d1 to
d442b58
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#675
Context
In a flaky run of TestRequestParking E2E, it parks a request for actor B behind a deliberately 1-worker pool, frees the worker by suspending actor A, and expects a 200.
What we got instead was a
503 "no free workers available"at just over the 5s park budget, where Actor B was left in RESUMING with the worker already assigned. In this case, CI runs 7 e2e suites against a single 4-vCPU kind cluster; under that contention the gVisor snapshot restore routinely runs a few hundred milliseconds past the 5s budget. So the router cancelled a resume that was about to succeed.Proposal
When the park budget elapses with a resume attempt still in flight, the router issues one
GetActor:RESUMINGorRUNNING→ a worker is assigned; the in-flight attempt gets a bounded 3s grace to land.The retry loop always stops at the budget. The grace covers the single attempt already underway, never another round. The probe's 1s timeout is spent inside the grace, not on top of it, so the router's worst-case hold on a parked request is exactly budget + grace.