Skip to content

Commit 9e9f33d

Browse files
committed
Fix retryable wrapping.
JAVA-5530
1 parent cb0d596 commit 9e9f33d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

driver-core/src/main/com/mongodb/internal/operation/ClientBulkWriteOperation.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
import static com.mongodb.internal.connection.DualMessageSequences.WritersProviderAndLimitsChecker.WriteResult.FAIL_LIMIT_EXCEEDED;
126126
import static com.mongodb.internal.connection.DualMessageSequences.WritersProviderAndLimitsChecker.WriteResult.OK_LIMIT_NOT_REACHED;
127127
import static com.mongodb.internal.operation.AsyncOperationHelper.cursorDocumentToAsyncBatchCursor;
128-
import static com.mongodb.internal.operation.AsyncOperationHelper.decorateReadWithRetriesAsync;
128+
import static com.mongodb.internal.operation.AsyncOperationHelper.decorateWriteWithRetriesAsync;
129129
import static com.mongodb.internal.operation.AsyncOperationHelper.withAsyncSourceAndConnection;
130130
import static com.mongodb.internal.operation.BulkWriteBatch.logWriteModelDoesNotSupportRetries;
131131
import static com.mongodb.internal.operation.CommandOperationHelper.commandWriteConcern;
@@ -349,7 +349,7 @@ private void executeBatchAsync(
349349
RetryState retryState = initialRetryState(retryWritesSetting, timeoutContext);
350350
BatchEncoder batchEncoder = new BatchEncoder();
351351

352-
AsyncCallbackSupplier<ExhaustiveClientBulkWriteCommandOkResponse> retryingBatchExecutor = decorateReadWithRetriesAsync(
352+
AsyncCallbackSupplier<ExhaustiveClientBulkWriteCommandOkResponse> retryingBatchExecutor = decorateWriteWithRetriesAsync(
353353
retryState, operationContext,
354354
// Each batch re-selects a server and re-checks out a connection because this is simpler,
355355
// and it is allowed by https://jira.mongodb.org/browse/DRIVERS-2502.

driver-reactive-streams/src/main/com/mongodb/reactivestreams/client/MongoCluster.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ public interface MongoCluster {
377377
*
378378
* @param models The {@linkplain ClientNamespacedWriteModel individual write operations}.
379379
* @return The {@link Publisher} with a single element which could be: The {@link ClientBulkWriteResult} if the operation is successful.
380-
* The {@link ClientBulkWriteException} If and only if the operation is unsuccessful or partially unsuccessful,
380+
* The {@link ClientBulkWriteException} if and only if the operation is unsuccessful or partially unsuccessful,
381381
* and there is at least one of the following pieces of information to report:
382382
* {@link ClientBulkWriteException#getWriteConcernErrors()}, {@link ClientBulkWriteException#getWriteErrors()},
383383
* {@link ClientBulkWriteException#getPartialResult()}. The {@link MongoException} only if the operation is unsuccessful.
@@ -401,7 +401,7 @@ public interface MongoCluster {
401401
* @param models The {@linkplain ClientNamespacedWriteModel individual write operations}.
402402
* @param options The options.
403403
* @return The {@link Publisher} with a single element which could be: The {@link ClientBulkWriteResult} if the operation is successful.
404-
* The {@link ClientBulkWriteException} If and only if the operation is unsuccessful or partially unsuccessful,
404+
* The {@link ClientBulkWriteException} if and only if the operation is unsuccessful or partially unsuccessful,
405405
* and there is at least one of the following pieces of information to report:
406406
* {@link ClientBulkWriteException#getWriteConcernErrors()}, {@link ClientBulkWriteException#getWriteErrors()},
407407
* {@link ClientBulkWriteException#getPartialResult()}. The {@link MongoException} only if the operation is unsuccessful.
@@ -429,7 +429,7 @@ Publisher<ClientBulkWriteResult> bulkWrite(
429429
* @param clientSession The {@linkplain ClientSession client session} with which to associate this operation.
430430
* @param models The {@linkplain ClientNamespacedWriteModel individual write operations}.
431431
* @return The {@link Publisher} with a single element which could be: The {@link ClientBulkWriteResult} if the operation is successful.
432-
* The {@link ClientBulkWriteException} If and only if the operation is unsuccessful or partially unsuccessful,
432+
* The {@link ClientBulkWriteException} if and only if the operation is unsuccessful or partially unsuccessful,
433433
* and there is at least one of the following pieces of information to report:
434434
* {@link ClientBulkWriteException#getWriteConcernErrors()}, {@link ClientBulkWriteException#getWriteErrors()},
435435
* {@link ClientBulkWriteException#getPartialResult()}. The {@link MongoException} only if the operation is unsuccessful.
@@ -456,7 +456,7 @@ Publisher<ClientBulkWriteResult> bulkWrite(
456456
* @param models The {@linkplain ClientNamespacedWriteModel individual write operations}.
457457
* @param options The options.
458458
* @return The {@link Publisher} with a single element which could be: The {@link ClientBulkWriteResult} if the operation is successful.
459-
* The {@link ClientBulkWriteException} If and only if the operation is unsuccessful or partially unsuccessful,
459+
* The {@link ClientBulkWriteException} if and only if the operation is unsuccessful or partially unsuccessful,
460460
* and there is at least one of the following pieces of information to report:
461461
* {@link ClientBulkWriteException#getWriteConcernErrors()}, {@link ClientBulkWriteException#getWriteErrors()},
462462
* {@link ClientBulkWriteException#getPartialResult()}. The {@link MongoException} only if the operation is unsuccessful.

0 commit comments

Comments
 (0)