STOR-5615: Apply retry policy to JSRPC calls - #7513
Merged
Merged
Conversation
Contributor
|
LGTM |
apeacock1991
force-pushed
the
apeacock/STOR-5615-jsrpc-retry-policy
branch
2 times, most recently
from
September 24, 2026 21:26
db36e80 to
87a6dca
Compare
apeacock1991
marked this pull request as ready for review
September 24, 2026 21:29
JSRPC calls to Durable Objects use the binding's retry policy when the userland gate is on and the binding configures one. Otherwise they use the runtime default. The fetch and JSRPC retry gates and their retry-request gates must all be on to enforce retries. When the timeout expires, an in-flight retry is cancelled and fails with the original disconnect; pipelined calls reject too. This includes established sessions with a pending receiver call. Cancel the session only after the timeout wins the result race, so session revocation cannot replace the original disconnect. The first attempt is never cancelled. JSRPC starts the retry timeout when it creates the retry state, before any output-gate wait. Fetch starts it after that wait.
apeacock1991
force-pushed
the
apeacock/STOR-5615-do-retry-policy-config
branch
from
September 24, 2026 21:41
6e19966 to
badef8b
Compare
apeacock1991
force-pushed
the
apeacock/STOR-5615-jsrpc-retry-policy
branch
from
September 24, 2026 21:41
87a6dca to
7f87ae3
Compare
|
The generated output of |
maxmcd
reviewed
Sep 24, 2026
Base automatically changed from
apeacock/STOR-5615-do-retry-policy-config
to
main
September 25, 2026 07:52
Only the first attempt of a JSRPC call to a Durable Object now waits for the output gate. A retry resends the same payload, which that wait already cleared, so it no longer waits again. Fetch retries already work this way. Waiting again held retries behind later, unrelated writes and spent their retry budget. The retry timeout now starts once the first attempt clears the output gate, as it does for fetch. Before, time spent behind the actor's own earlier writes counted against the timeout.
maxmcd
approved these changes
Sep 25, 2026
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.
JSRPC calls to Durable Objects now retry the same way fetch does.
durable-object-retries-userlandgate is on, JSRPC uses the binding's retry policy (maxAttempts,timeoutMs). Otherwise it uses the default policy.Default change
As with fetch in #7383, in-flight cancellation also applies to the default policy when those gates are on.
Output gate
The second commit aligns JSRPC with fetch: