Skip to content

Conversation

@sleepyStick
Copy link
Contributor

@sleepyStick sleepyStick commented Oct 17, 2025

Please complete the following before merging:

  • Is the relevant DRIVERS ticket in the PR title?
  • Update changelog.
  • Test changes in at least one language driver.
  • Test these changes against all server versions and topologies (including standalone, replica set, and sharded
    clusters).

python implementation: mongodb/mongo-python-driver#2600

callbacks.

A previous design had no limits for retrying commits or entire transactions. The callback is always able indicate that
A previous design had no limits for retrying commits or entire transactions. The callback is always able to indicate that
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe I read it wrong, or maybe its a typo? Not sure.

[abortTransaction](../transactions/transactions.md#aborttransaction) on the session.
2. If the callback's error includes a "TransientTransactionError" label and the elapsed time of `withTransaction` is
less than 120 seconds, jump back to step two.
less than 120 seconds, sleep for `jitter * min(BACKOFF_INITIAL * (1.25**retry), BACKOFF_MAX)` where:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I know python uses ** as the exponential operator. I don't believe that is a standard across other programming languages. Is it clear that its exponent? Is there a different preferred symbol for exponent? (I know math commonly uses ^ but it typically also means bitwise XOR in code so I felt like that could be confusing.)

Copy link
Contributor

Choose a reason for hiding this comment

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

** seems fine to me, but I might also be biased because that's what Node does 🙂. But I don't think people will have trouble understanding what this means.

@sleepyStick sleepyStick marked this pull request as ready for review November 12, 2025 21:44
@sleepyStick sleepyStick requested a review from a team as a code owner November 12, 2025 21:44
@sleepyStick sleepyStick requested review from alcaeus and removed request for a team November 12, 2025 21:44
@alcaeus alcaeus requested review from durran and removed request for alcaeus November 13, 2025 08:18
Copy link
Member

@ShaneHarvey ShaneHarvey left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@comandeo-mongo comandeo-mongo left a comment

Choose a reason for hiding this comment

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

LGTM! Maybe we can add a link to the reference implementation to PRs description.

@sleepyStick
Copy link
Contributor Author

LGTM! Maybe we can add a link to the reference implementation to PRs description.

Good suggestion! I added a link to the python PR in the PR description now!

@sleepyStick sleepyStick merged commit 135add4 into master Nov 24, 2025
6 checks passed
@sleepyStick sleepyStick deleted the DRIVERS-1934 branch November 24, 2025 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants