|
130 | 130 | import static com.mongodb.internal.operation.AsyncOperationHelper.withAsyncSourceAndConnection; |
131 | 131 | import static com.mongodb.internal.operation.BulkWriteBatch.logWriteModelDoesNotSupportRetries; |
132 | 132 | import static com.mongodb.internal.operation.CommandOperationHelper.commandWriteConcern; |
| 133 | +import static com.mongodb.internal.operation.CommandOperationHelper.getWriteAttemptFailureNotToBeRetriedOrAddRetryableLabel; |
133 | 134 | import static com.mongodb.internal.operation.CommandOperationHelper.initialRetryState; |
134 | | -import static com.mongodb.internal.operation.CommandOperationHelper.shouldAttemptToRetryWriteAndAddRetryableLabel; |
135 | 135 | import static com.mongodb.internal.operation.CommandOperationHelper.transformWriteException; |
136 | 136 | import static com.mongodb.internal.operation.OperationHelper.isRetryableWrite; |
137 | 137 | import static com.mongodb.internal.operation.SyncOperationHelper.cursorDocumentToBatchCursor; |
@@ -321,7 +321,7 @@ private Integer executeBatch( |
321 | 321 | // The server does not have a chance to add "RetryableWriteError" label to `e`, |
322 | 322 | // and if it is the last attempt failure, `RetryingSyncSupplier` also may not have a chance |
323 | 323 | // to add the label. So we do that explicitly. |
324 | | - shouldAttemptToRetryWriteAndAddRetryableLabel(retryState, mongoException); |
| 324 | + getWriteAttemptFailureNotToBeRetriedOrAddRetryableLabel(retryState, mongoException); |
325 | 325 | resultAccumulator.onBulkWriteCommandErrorWithoutResponse(mongoException); |
326 | 326 | throw mongoException; |
327 | 327 | } |
@@ -386,7 +386,7 @@ private void executeBatchAsync( |
386 | 386 | // The server does not have a chance to add "RetryableWriteError" label to `e`, |
387 | 387 | // and if it is the last attempt failure, `RetryingSyncSupplier` also may not have a chance |
388 | 388 | // to add the label. So we do that explicitly. |
389 | | - shouldAttemptToRetryWriteAndAddRetryableLabel(retryState, mongoException); |
| 389 | + getWriteAttemptFailureNotToBeRetriedOrAddRetryableLabel(retryState, mongoException); |
390 | 390 | resultAccumulator.onBulkWriteCommandErrorWithoutResponse(mongoException); |
391 | 391 | c.completeExceptionally(mongoException); |
392 | 392 | } else { |
|
0 commit comments