Include ServerError in downgrade criteria from peers_v2 to peers#1085
Merged
Include ServerError in downgrade criteria from peers_v2 to peers#1085
Conversation
The logic from JAVA-1388 dictates that the driver downgrades from system.peers_v2 to system.peers for node discovery if an INVALID_QUERY error is received. We should also consider SERVER_ERROR as some versions inappropriately respond with errors of that type.
olim7t
reviewed
Aug 20, 2018
| if (t instanceof InvalidQueryException) { | ||
| // downgrade to system.peers if we get an invalid query or server error as this | ||
| // indicates the peers_v2 table does not exist. | ||
| if (t instanceof InvalidQueryException || t instanceof ServerError) { |
Contributor
There was a problem hiding this comment.
Didn't we decide to also match the error message in the case of ServerError?
Contributor
Author
There was a problem hiding this comment.
My mistake, that's right. I'll add that.
olim7t
approved these changes
Aug 20, 2018
Contributor
olim7t
left a comment
There was a problem hiding this comment.
LGTM, I think we should also mention in the comment that this is because DSE 6.0.0 to 6.0.2 does that.
Contributor
Author
|
Sounds good, will amend the comment and also include it in the commit message, thanks for reviewing! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The logic from JAVA-1388 dictates that the driver downgrades from
system.peers_v2 to system.peers for node discovery if an
INVALID_QUERY error is received. We should also consider SERVER_ERROR
as some versions inappropriately respond with errors of that type.