Skip to content

Commit 916420d

Browse files
authored
[JAVA-5224] Make ReadConcernMajorityNotAvailableYet a retryable error (#1601)
JAVA-5224
1 parent a86b3df commit 916420d

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
final class ChangeStreamBatchCursorHelper {
3636
@VisibleForTesting(otherwise = PRIVATE)
3737
static final List<Integer> RETRYABLE_SERVER_ERROR_CODES =
38-
asList(6, 7, 63, 89, 91, 133, 150, 189, 234, 262, 9001, 10107, 11600, 11602, 13388, 13435, 13436);
38+
asList(6, 7, 63, 89, 91, 133, 134, 150, 189, 234, 262, 9001, 10107, 11600, 11602, 13388, 13435, 13436);
3939
@VisibleForTesting(otherwise = PRIVATE)
4040
static final String RESUMABLE_CHANGE_STREAM_ERROR_LABEL = "ResumableChangeStreamError";
4141

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ static RetryState initialRetryState(final boolean retry, final TimeoutContext ti
127127
return RetryState.withNonRetryableState();
128128
}
129129

130-
private static final List<Integer> RETRYABLE_ERROR_CODES = asList(6, 7, 89, 91, 189, 262, 9001, 13436, 13435, 11602, 11600, 10107);
130+
private static final List<Integer> RETRYABLE_ERROR_CODES = asList(6, 7, 89, 91, 134, 189, 262, 9001, 13436, 13435, 11602, 11600, 10107);
131131
static boolean isRetryableException(final Throwable t) {
132132
if (!(t instanceof MongoException)) {
133133
return false;

driver-sync/src/test/functional/com/mongodb/client/unified/UnifiedTestModifications.java

-2
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,6 @@ public static void applyCustomizations(final TestDef def) {
179179
.file("retryable-reads", "listDatabaseObjects-serverErrors")
180180
.file("retryable-reads", "listCollectionObjects")
181181
.file("retryable-reads", "listCollectionObjects-serverErrors");
182-
def.skipJira("https://jira.mongodb.org/browse/JAVA-5224")
183-
.test("retryable-reads", "ReadConcernMajorityNotAvailableYet is a retryable read", "Find succeeds on second attempt after ReadConcernMajorityNotAvailableYet");
184182

185183
// retryable-writes
186184

0 commit comments

Comments
 (0)