PYTHON-5767 Implement DRIVERS-3427 phase 1 rollout changes#2739
Draft
Jibola wants to merge 9 commits intomongodb:backpressurefrom
Draft
PYTHON-5767 Implement DRIVERS-3427 phase 1 rollout changes#2739Jibola wants to merge 9 commits intomongodb:backpressurefrom
Jibola wants to merge 9 commits intomongodb:backpressurefrom
Conversation
…ongodb#2497) All commands that fail with the "Retryable" error label will be retried up to 3 times. When the error includes the "SystemOverloaded" error label we apply exponential backoff with jitter before attempting a retry.
Add adaptive token bucket based retry policy. Successfully completed commands deposit 0.1 token. Failed retry attempts consume 1 token. A retry is only permitted if there is an available token. Token bucket starts full with the maximum 1000 tokens.
…tion rate limiter triggers (mongodb#2509) Co-authored-by: Iris <58442094+sleepyStick@users.noreply.github.com> Co-authored-by: Noah Stapp <noah.stapp@mongodb.com> Co-authored-by: Shane Harvey <shnhrv@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ay from 50ms to 100ms (mongodb#2599)
Resolve merge conflicts by taking upstream versions, which represent the refined evolution of local prototype backpressure work. Co-Authored-By: Claude Code <noreply@anthropic.com>
- Change MAX_RETRIES default from 5 to 2
- Add configurable maxAdaptiveRetries client option (default: 2)
- Add enableOverloadRetargeting client option (default: false)
- Add retry metadata ("retry": N) to outgoing command bodies on retry
- Remove _retry_overload decorator from collection/database methods
Co-Authored-By: Claude Code <noreply@anthropic.com>
Open
1 task
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.
Summary
MAX_RETRIESdefault from 5 to 2; expose as configurablemaxAdaptiveRetriesclient optionenableOverloadRetargetingclient option (default:false) to gate server deprioritization on overload errors"retry": Nfield into outgoing command bodies on retry attempts so the server can observe retry storm impact_retry_overloaddecorator from collection/database methods (retry now handled centrally in_ClientConnectionRetryable)Test plan
pytest test/test_client_backpressure.pymaxRetriesoption is respected by the retry loopenableOverloadRetargeting=Truerestores deprioritization behaviorGenerated with Claude Code