Skip to content
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

[JAVA-5224] Make ReadConcernMajorityNotAvailableYet a retryable error #1601

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@
final class ChangeStreamBatchCursorHelper {
@VisibleForTesting(otherwise = PRIVATE)
static final List<Integer> RETRYABLE_SERVER_ERROR_CODES =
asList(6, 7, 63, 89, 91, 133, 150, 189, 234, 262, 9001, 10107, 11600, 11602, 13388, 13435, 13436);
asList(6, 7, 63, 89, 91, 133, 134, 150, 189, 234, 262, 9001, 10107, 11600, 11602, 13388, 13435, 13436);
@VisibleForTesting(otherwise = PRIVATE)
static final String RESUMABLE_CHANGE_STREAM_ERROR_LABEL = "ResumableChangeStreamError";

Original file line number Diff line number Diff line change
@@ -127,7 +127,7 @@ static RetryState initialRetryState(final boolean retry, final TimeoutContext ti
return RetryState.withNonRetryableState();
}

private static final List<Integer> RETRYABLE_ERROR_CODES = asList(6, 7, 89, 91, 189, 262, 9001, 13436, 13435, 11602, 11600, 10107);
private static final List<Integer> RETRYABLE_ERROR_CODES = asList(6, 7, 89, 91, 134, 189, 262, 9001, 13436, 13435, 11602, 11600, 10107);
static boolean isRetryableException(final Throwable t) {
if (!(t instanceof MongoException)) {
return false;
Original file line number Diff line number Diff line change
@@ -167,8 +167,6 @@ public static void doSkips(final TestDef def) {
.file("retryable-reads", "listDatabaseObjects-serverErrors")
.file("retryable-reads", "listCollectionObjects")
.file("retryable-reads", "listCollectionObjects-serverErrors");
def.skipJira("https://jira.mongodb.org/browse/JAVA-5224")
.test("retryable-reads", "ReadConcernMajorityNotAvailableYet is a retryable read", "Find succeeds on second attempt after ReadConcernMajorityNotAvailableYet");

// retryable-writes