-
Notifications
You must be signed in to change notification settings - Fork 455
Don't inspect error messages for "not master" or "node is recovering" #745
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bazile-clyde @samantharitter: The changes are complete, but I'm not sure about two things that I've highlighted below. I'd appreciate your opinion on how to best proceed.
1df16ab
to
caf940c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good. Only a few comments.
@@ -182,7 +184,8 @@ test_state_change_helper (uint32_t domain, bool expect_error) | |||
BSON_ASSERT (expect_error == _mongoc_error_is_state_change (&error)); | |||
} | |||
|
|||
error.code = 123; | |||
/* Fallback code that's used when no code was returned */ | |||
error.code = 17; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we make this MONGOC_ERROR_QUERY_FAILURE
? That way it's easier to see where it came from. It'll also be easier to grep for later.
@@ -2055,8 +2055,8 @@ test_request_scan_on_error () | |||
NULL /* server_err */); | |||
/* for an unknown code, the message should still be checked. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is stale right? Previously, we would check the error message in the default case. Now we do not and return false. If so, we can remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Covers CDRIVER-3885 and CDRIVER-3884.