-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat(NODE-7122): exponential backoff between retries in convenient transaction API #4765
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: main
Are you sure you want to change the base?
Conversation
test/integration/transactions-convenient-api/transactions-convenient-api.prose.test.ts
Outdated
Show resolved
Hide resolved
b6c76a9 to
7ac265d
Compare
4073776 to
3dad6c2
Compare
test/integration/transactions-convenient-api/transactions-convenient-api.prose.test.ts
Show resolved
Hide resolved
test/integration/transactions-convenient-api/transactions-convenient-api.prose.test.ts
Outdated
Show resolved
Hide resolved
test/integration/transactions-convenient-api/transactions-convenient-api.prose.test.ts
Show resolved
Hide resolved
test/integration/transactions-convenient-api/transactions-convenient-api.prose.test.ts
Outdated
Show resolved
Hide resolved
|
@dariakp Comments addressed. Sorry about the rebase + force push, force of habit 😅. |
| }); | ||
| }); | ||
|
|
||
| // 5. Compare the two time between the two runs. |
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.
And this is how we catch spec typos 😅 time -> times
let's update here and maybe include this in the next spec PR or as a one-off?
PavelSafronov
left a comment
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.
Changes look good!
Description
Summary of Changes
This PR adds exponential backoff between convenient transaction API failures if the transaction must be restarted. (DRIVERS-1934)
Release Highlight
withTransactionnow applies exponential backoff during transaction retriesThe convenient transaction API now uses exponential backoff between retries if a transaction must be retried. Under scenarios of high server load, this can prevent transaction retry storms.
Double check the following
npm run check:lint)type(NODE-xxxx)[!]: descriptionfeat(NODE-1234)!: rewriting everything in coffeescript