Repository navigation
Drop retryable batches without Retry-After when backoff is disabled - #455
Merged
Merged
Conversation
shouldDropBatch kept every retryable batch whenever rate limiting was enabled, assuming a Retry-After the caller never checked. With backoff disabled, a 500 batch stayed in storage and was resent. HTTPClient now makes the drop decision with the response headers.
bsneed
approved these changes
Oct 21, 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.
Fixes the
e2e-testsfailure onmainsince July:settings-enabled-flag > backoffConfig.enabled: false > disables backoff retry when enabled is falseexpects one upload and gets two.#440 changed
shouldDropBatchto keep every retryable batch whenever rate limiting is enabled, on the assumption that the response carried aRetry-After. The caller never passes the headers, so the check never happens. When settings only disable backoff, rate limiting stays enabled, so a 500 withoutRetry-Afteris kept and resent.handleResponsealready checks for the header, so the two disagreed.RetryStateMachine.shouldDropBatchtakesretryAfterSeconds(defaulted) and matcheshandleResponse: 429 is kept when rate limiting is on; another retryable code is kept for aRetry-Afterpause when rate limiting is on, otherwise only when backoff is on.HTTPClientmakes the drop decision where it has the headers and completes with.badRequestfor a dropped batch.SegmentDestinationalready drops on that for disk batches; the memory path now does too, and.statusCodemeans the batch will be retried.Behavior change: a 429 overridden to
dropinstatusCodeOverridesis now kept while rate limiting is enabled, matchinghandleResponse, which rate-limits it.Verified:
main(the disk flush makes 2 uploads, as in the e2e run) and pass with the fix.sdk-e2e-testsmain run locally against this branch: 90 passed, 3 skipped, 0 failed.