Skip to content

DRIVERS-3239 - Token buckets disabled by default#1902

Merged
NoahStapp merged 8 commits intomongodb:client-backpressurefrom
NoahStapp:DRIVERS-3239-token-bucket-refactor
Mar 3, 2026
Merged

DRIVERS-3239 - Token buckets disabled by default#1902
NoahStapp merged 8 commits intomongodb:client-backpressurefrom
NoahStapp:DRIVERS-3239-token-bucket-refactor

Conversation

@NoahStapp
Copy link
Contributor

@NoahStapp NoahStapp commented Feb 23, 2026

Python first implementation: mongodb/mongo-python-driver#2713.

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).

@NoahStapp NoahStapp requested a review from a team as a code owner February 23, 2026 20:51
@NoahStapp NoahStapp requested review from ShaneHarvey, katcharov and stIncMale and removed request for a team February 23, 2026 20:51
Copy link
Member

@tadjik1 tadjik1 left a comment

Choose a reason for hiding this comment

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

Small typos in SystemOverloaded error label (must be lowercased).

@tadjik1
Copy link
Member

tadjik1 commented Feb 24, 2026

2nd implementation in Node: mongodb/node-mongodb-native#4878

@NoahStapp NoahStapp requested a review from tadjik1 February 24, 2026 13:36
Copy link
Member

@stIncMale stIncMale left a comment

Choose a reason for hiding this comment

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

The last reviewed commit is 3eec81c.

I reviewed only client-backpressure.md‎. I do not plan to review the changes in prose tests, because the Java driver does not have the backpressure implementation I could try the tests with.

3. Configure the following failpoint:

````
```javascript
Copy link
Member

Choose a reason for hiding this comment

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

This section renders incorrectly because of the nested ````

Drivers should test that retry token buckets are created at their maximum capacity and that that capacity is enforced.

1. Let `client` be a `MongoClient`.
1. Let `client` be a `MongoClient` with `adaptiveRetries=True`.
Copy link
Member

Choose a reason for hiding this comment

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

Do we also need to update the spec tests to add adaptiveRetries=True?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, none of the spec tests test behavior involving token buckets.

@NoahStapp NoahStapp requested a review from a team as a code owner February 25, 2026 22:47
@NoahStapp NoahStapp requested review from JamesKovacs, ShaneHarvey and stIncMale and removed request for a team February 25, 2026 22:47
Copy link
Member

@stIncMale stIncMale left a comment

Choose a reason for hiding this comment

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

The last reviewed commit is 2d41532.

@NoahStapp NoahStapp requested a review from stIncMale March 2, 2026 18:09
Copy link
Member

@stIncMale stIncMale left a comment

Choose a reason for hiding this comment

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

The last reviewed commit is 9fb14c4.

@NoahStapp NoahStapp merged commit b286c02 into mongodb:client-backpressure Mar 3, 2026
6 checks passed
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.

4 participants