This repository has been archived by the owner on Nov 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 188
relay: fix GTID recover after relay log recovered (#335) #339
Merged
csuzhangxc
merged 7 commits into
pingcap:release-1.0
from
sre-bot:release-1.0-c6344f3b66ef
Oct 28, 2019
Merged
relay: fix GTID recover after relay log recovered (#335) #339
csuzhangxc
merged 7 commits into
pingcap:release-1.0
from
sre-bot:release-1.0-c6344f3b66ef
Oct 28, 2019
Conversation
This file contains 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
sre-bot
added
priority/normal
Minor change, requires approval from ≥1 primary reviewer
priority/release-blocker
This PR blocks a release. Please review it ASAP.
needs-update-release-note
This PR should be added into release notes. Remove this label once the release notes are updated
type/bug-fix
Bug fix
type/cherry-pick
This PR is just a cherry-pick (backport)
labels
Oct 28, 2019
Codecov Report
@@ Coverage Diff @@
## release-1.0 #339 +/- ##
================================================
Coverage ? 60.0973%
================================================
Files ? 135
Lines ? 15197
Branches ? 0
================================================
Hits ? 9133
Misses ? 5170
Partials ? 894 |
LGTM |
amyangfei
approved these changes
Oct 28, 2019
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
csuzhangxc
added
already-update-release-note
The release note is updated. Add this label once the release note is updated
and removed
needs-update-release-note
This PR should be added into release notes. Remove this label once the release notes are updated
labels
Nov 1, 2019
WangXiangUSTC
added
status/LGT2
Two reviewers already commented LGTM, ready for merge
and removed
status/LGT1
One reviewer already commented LGTM
labels
Nov 4, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
already-update-release-note
The release note is updated. Add this label once the release note is updated
priority/normal
Minor change, requires approval from ≥1 primary reviewer
priority/release-blocker
This PR blocks a release. Please review it ASAP.
status/LGT2
Two reviewers already commented LGTM, ready for merge
type/bug-fix
Bug fix
type/cherry-pick
This PR is just a cherry-pick (backport)
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.
cherry-pick #335 to release-1.0
What problem does this PR solve?
MySQL may not save all previous GTID sets in its binlog file as
Previous_gtids
event in some special scenarios (not confirmed yet, but maybe a bug, ref https://bugs.mysql.com/bug.php?id=93809).example:
00c04543-f584-11e9-a765-0242ac120002:1-60
Previous_gtids
event:00c04543-f584-11e9-a765-0242ac120002:45-60
00c04543-f584-11e9-a765-0242ac120002:45-60
, but this should still be00c04543-f584-11e9-a765-0242ac120002:1-60
.00c04543-f584-11e9-a765-0242ac120002:45-60
to request the master is wrong, because this will cause the master to send binlog events in00c04543-f584-11e9-a765-0242ac120002:1-44
. if this events are purged, an error (ERROR 1236 (HY000): The slave is connecting using CHANGE MASTER TO MASTER_AUTO_POSITION = 1, but the master has purged binary logs containing GTIDs that the slave requires.
) will reported; if this events are not purged, they will be sent again.What is changed and how it works?
only truncate the
Stop
of the GTID set intervals, like truncating00c04543-f584-11e9-a765-0242ac120002:1-60
with00c04543-f584-11e9-a765-0242ac120002:40-50
will get00c04543-f584-11e9-a765-0242ac120002:1-50
.Check List
Tests
Related changes