Add MongoException.SYSTEM_OVERLOADED_ERROR_LABEL/RETRYABLE_ERROR_LABEL#1926
Add MongoException.SYSTEM_OVERLOADED_ERROR_LABEL/RETRYABLE_ERROR_LABEL#1926stIncMale merged 1 commit intomongodb:backpressurefrom
MongoException.SYSTEM_OVERLOADED_ERROR_LABEL/RETRYABLE_ERROR_LABEL#1926Conversation
…ABEL` JAVA-5956, JAVA-6117, JAVA-6113, JAVA-6119
driver-core/src/main/com/mongodb/internal/operation/CommandOperationHelper.java
Show resolved
Hide resolved
| * @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 |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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>. | ||
| */ |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
The 8.3 version here and below was chosen to be documented based on https://mongodb.slack.com/archives/C09HD2C42N5/p1774376899374599 and https://mongodb.slack.com/archives/GCKKT44RM/p1774320729754479.
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