-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Improve CSOT API discoverability and document its effect on retrying #1939
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
4cadad6
e168f53
6b0c88b
23ef136
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -432,9 +432,13 @@ public Builder writeConcern(final WriteConcern writeConcern) { | |||||
| * | ||||||
| * <p>Starting with the 3.11.0 release, the default value is true</p> | ||||||
| * | ||||||
| * <p>If a {@linkplain #timeout(long, TimeUnit) timeout} is set, the driver may retry | ||||||
| * multiple times until the timeout expires. Otherwise, at most one retry attempt is made. | ||||||
| * | ||||||
| * @param retryWrites sets if writes should be retried if they fail due to a network error. | ||||||
| * @return this | ||||||
| * @see #getRetryWrites() | ||||||
| * @see #timeout(long, TimeUnit) | ||||||
| * @mongodb.server.release 3.6 | ||||||
| */ | ||||||
| public Builder retryWrites(final boolean retryWrites) { | ||||||
|
|
@@ -445,9 +449,13 @@ public Builder retryWrites(final boolean retryWrites) { | |||||
| /** | ||||||
| * Sets whether reads should be retried if they fail due to a network error. | ||||||
| * | ||||||
| * <p>If a {@linkplain #timeout(long, TimeUnit) timeout} is set, the driver may retry | ||||||
| * multiple times until the timeout expires. Otherwise, at most one retry attempt is made. | ||||||
| * | ||||||
| * @param retryReads sets if reads should be retried if they fail due to a network error. | ||||||
| * @return this | ||||||
| * @see #getRetryReads() | ||||||
| * @see #timeout(long, TimeUnit) | ||||||
|
Comment on lines
+452
to
+458
|
||||||
| * @since 3.11 | ||||||
| * @mongodb.server.release 3.6 | ||||||
| */ | ||||||
|
|
@@ -716,14 +724,28 @@ public Builder inetAddressResolver(@Nullable final InetAddressResolver inetAddre | |||||
| * <li>{@code > 0} The time limit to use for the full execution of an operation.</li> | ||||||
| * </ul> | ||||||
| * | ||||||
| * <p>Note: When using synchronous API, this timeout does not limit socket writes, therefore there is a possibility that the | ||||||
| * operation might not be timed out when expected. This limitation does not apply to the reactive streams API. | ||||||
| * <p>The timeout can be set at the following levels (ordered by lowest precedence): | ||||||
| * <ul> | ||||||
| * <li>{@link #timeout(long, TimeUnit) MongoClientSettings} (current)</li> | ||||||
| * <li>{@code MongoCluster.withTimeout}</li> | ||||||
| * <li>{@code MongoDatabase.withTimeout}</li> | ||||||
| * <li>{@code MongoCollection.withTimeout}</li> | ||||||
| * <li>{@link ClientSessionOptions.Builder#defaultTimeout(long, TimeUnit) ClientSessionOptions}</li> | ||||||
| * <li>{@link TransactionOptions.Builder#timeout(Long, TimeUnit) TransactionOptions}</li> | ||||||
| * </ul> | ||||||
| * If not set at a given level, the timeout is inherited from the level above. | ||||||
| * | ||||||
| * <p>If {@linkplain #retryWrites(boolean) write} or {@linkplain #retryReads(boolean) read} retries are enabled, | ||||||
| * the driver may retry multiple times until the timeout expires. | ||||||
| * | ||||||
| * <p>Note: When using synchronous API, this timeout does not limit socket writes, therefore there is a possibility that the | ||||||
| * operation might not be timed out when expected. This limitation does not apply to the reactive streams API. | ||||||
| * | ||||||
| * @param timeout the timeout | ||||||
| * @param timeUnit the time unit | ||||||
| * @return this | ||||||
| * @since 5.2 | ||||||
| * @see #getTimeout | ||||||
| * @see #getTimeout(TimeUnit) | ||||||
|
||||||
| * @see #getTimeout(TimeUnit) | |
| * @see MongoClientSettings#getTimeout(TimeUnit) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This
@see #getRetryWrites()tag is insideMongoClientSettings.Builder, butBuilderdoesn’t definegetRetryWrites(). This will produce a broken/unresolved Javadoc reference. Consider updating it to reference the actual getter onMongoClientSettings(e.g.,MongoClientSettings#getRetryWrites()).