Skip to content

Conversation

@baileympearson
Copy link
Contributor

@baileympearson baileympearson commented Oct 29, 2025

Description

Summary of Changes

This PR adds exponential backoff between convenient transaction API failures if the transaction must be restarted.

Release Highlight

withTransaction now applies exponential backoff during transaction retries

The 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

  • Lint is passing (npm run check:lint)
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@baileympearson baileympearson changed the title wip feat(NODE-7122): exponential backoff between retries in convenient transaction API feat(NODE-7122): exponential backoff between retries in convenient transaction API Nov 25, 2025
@baileympearson baileympearson marked this pull request as ready for review November 25, 2025 23:31
@baileympearson baileympearson requested a review from a team as a code owner November 25, 2025 23:31
@durran durran self-assigned this Nov 26, 2025
@durran durran added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Nov 26, 2025
@@ -1,3 +1,5 @@
import { setTimeout } from 'timers/promises';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we implement this without using Node's API? I feel like adding this conflicts with our Pluggable IO epic.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setTimeout is out of scope for the project and we have many other usages of this API in the driver, so I'd prefer not to diverge from what the driver already does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Primary Review In Review with primary reviewer, not yet ready for team's eyes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants