Skip to content

Add MongoException.SYSTEM_OVERLOADED_ERROR_LABEL/RETRYABLE_ERROR_LABEL#1926

Merged
stIncMale merged 1 commit intomongodb:backpressurefrom
stIncMale:addLabels
Mar 24, 2026
Merged

Add MongoException.SYSTEM_OVERLOADED_ERROR_LABEL/RETRYABLE_ERROR_LABEL#1926
stIncMale merged 1 commit intomongodb:backpressurefrom
stIncMale:addLabels

Conversation

@stIncMale
Copy link
Member

@stIncMale stIncMale commented Mar 24, 2026

This PR only adds the labels, and does not fully implement the tickets specified below.

The reason there are four JAVA tickets specified is that the is a single specification commit that resolved the four corresponding DRIVERS tickets. All of these JAVA tickets have to be done together.

The relevant spec changes:

JAVA-5956, JAVA-6117, JAVA-6113, JAVA-6119

…ABEL`

JAVA-5956, JAVA-6117, JAVA-6113, JAVA-6119
@stIncMale stIncMale requested a review from vbabanin March 24, 2026 19:22
@stIncMale stIncMale self-assigned this Mar 24, 2026
@stIncMale stIncMale requested a review from a team as a code owner March 24, 2026 19:22
@stIncMale stIncMale changed the base branch from main to backpressure March 24, 2026 19:24
* @since 5.7
* @mongodb.server.release 8.3
*/
// TODO-BACKPRESSURE Valentin Add a @mongodb.driver.manual link or something similar, see `content/atlas/source/overload-errors.txt` in https://github.com/10gen/docs-mongodb-internal/pull/17281
Copy link
Member Author

Choose a reason for hiding this comment

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

The TODO-BACKPRESSURE Valentin tag is added in accordance with the TODO label specified in the description of #1918.

if (e.hasErrorLabel(MongoException.TRANSIENT_TRANSACTION_ERROR_LABEL)) {
System.out.println("TransientTransactionError, aborting transaction and retrying ...");
System.out.printf("%s, aborting transaction and retrying ...%n",
MongoException.TRANSIENT_TRANSACTION_ERROR_LABEL);
Copy link
Member Author

Choose a reason for hiding this comment

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

Here and in some other places I am just making sure we use the constants for the labels.

/**
* <a href="https://github.com/mongodb/specifications/blob/master/source/transactions-convenient-api/tests/README.md#callback-returns-a-value">
* Callback Returns a Value</a>.
*/
Copy link
Member Author

Choose a reason for hiding this comment

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

This non-documentation-style description of the method was effectively duplicating the text of the linked prose test. Instead of duplicating the test descriptions, we should link to them.

The same applies to other changes in this file.

*
* @see #hasErrorLabel(String)
* @since 5.7
* @mongodb.server.release 8.3
Copy link
Member Author

Choose a reason for hiding this comment

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

@stIncMale stIncMale merged commit b33dca9 into mongodb:backpressure Mar 24, 2026
53 checks passed
@stIncMale stIncMale deleted the addLabels branch March 24, 2026 21:13
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.

2 participants