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.
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
Point in time recovery and restore: assume (and validate) MySQL56 flavor in position arguments #15599
Point in time recovery and restore: assume (and validate) MySQL56 flavor in position arguments #15599
Changes from 4 commits
629623a
d3e143c
fff521f
8ee1cf6
a88dd20
043deca
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Isn't it worth asserting that the provided gtidSet is not being mangled in any way, and makes it here intact?
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.
done
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.
Similarly here, it will be more robust to assert on the actual result versus only asserting that it is not nil.
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.
We do have a
utils.MustMatch
somewhere that can be used to check for equality of complex structs.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.
Done. No need for
utils.MustMatch
,assert.Equal(...)
implements deep check.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.
IMO it would be nice to move this wording to the error above so that it's clear that we don't support other flavors.
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 is likewise an intentional design: we
Wrapf
an error, which happens to beErrExpectMysql56Flavor
, and which explicitly tells us"expected MySQL GTID position but found a different or invalid format"
. It would be redundant to add the same wording here.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.
Right, but we lose the wording which notes that MySQL format is the only one supported. That was my point. I guess it's implicit in this wording, so not a huge deal.
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.
We don't lose the wording. The error above will have both
cannot decode position in incremental backup: %v
as well as"expected MySQL GTID position but found a different or invalid format
, because it wraps one with another. Am I misunderstanding?