Skip to content

Commit 11c2479

Browse files
committed
Remove the assertion from RetryState.isLastAttempt
Turned out, `assertFalse(operationTimeout && attemptLimit)` holds only as long as there is `retryUntilTimeoutThrowsException`, which I am going to remove, because it is useless. There is no reason to add an assertion that is known to be removed soon.
1 parent a7d9dfc commit 11c2479

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

driver-core/src/main/com/mongodb/internal/async/function/RetryState.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,6 @@ public boolean isFirstAttempt() {
360360
private boolean isLastAttempt(final Throwable attemptException) {
361361
boolean operationTimeout = retryUntilTimeoutThrowsException && attemptException instanceof MongoOperationTimeoutException;
362362
boolean attemptLimit = attempt() == attempts - 1;
363-
assertFalse(operationTimeout && attemptLimit);
364363
return loopState.isLastIteration() || operationTimeout || attemptLimit;
365364
}
366365

0 commit comments

Comments
 (0)