-
Notifications
You must be signed in to change notification settings - Fork 1.1k
PYTHON-5518: withTransaction API retries too frequently #2600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: backpressure
Are you sure you want to change the base?
PYTHON-5518: withTransaction API retries too frequently #2600
Conversation
|
@sleepyStick is this ready for review? |
yes? the spec for these changes are still in review -- if the spec is good/doesn't have any more changes, then this is ready for review? |
| async def test_transaction_backoff(self): | ||
| client = async_client_context.client | ||
| coll = client[self.db.name].test | ||
| # patch random to make it deterministic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need random to be deterministic here? Can you expand this comment with a short motivation?
| @@ -0,0 +1,111 @@ | |||
| from __future__ import annotations | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't want to add this file do we?
| @@ -0,0 +1,82 @@ | |||
| from __future__ import annotations | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't want to add this file do we?
PYTHON-5518
Summary
_BACKOFF_INITIAL, _BACKOFF_MAX, and the growth rate have now been experimented with using the previous with_transaction benchmark and values are chosen based on what experimentally did the best.
Changes in this PR
added tests for the backoff in with_transaction
changed _BACKOFF_INITIAL, _BACKOFF_MAX, and the growth rate
graph.pywas the file used to analyze the various _BACKOFF_INITIAL, _BACKOFF_MAX, and the growth rate values against each otherwithTransaction.pywas the benchmarking scripthappy to remove them or put them elsewhere but since this is just merging into the backpressure branch, i figured it was fine to keep for now?
Testing Plan
prose test
Screenshots (optional)
Checklist
Checklist for Author
Checklist for Reviewer {@primary_reviewer}
Focus Areas for Reviewer (optional)