Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

syncer: do not ignore fake rotate event to the next file (#1039) #1041

Merged
merged 2 commits into from
Sep 16, 2020

Conversation

ti-srebot
Copy link

cherry-pick #1039 to release-2.0


What problem does this PR solve?

fix #1038

What is changed and how it works?

only skip the fake rotate event if it's not to the next binlog file.

NOTE:

  • MySQL server will write a RotateEvent before rotate to the next binlog file normally.
  • MySQL server will send a fake RotateEvent to the slave before sending other real binlog events.
  • MySQL server will write a StopEvent at the end of a binlog file when stoping itself but without RotateEvent
  • MySQL server will write from a new binlog file after started itself

Check List

Tests

Code changes

Side effects

  • Increased code complexity

Related changes

  • Need to cherry-pick to the release branch
  • Need to be included in the release note

@ti-srebot ti-srebot added needs-update-release-note This PR should be added into release notes. Remove this label once the release notes are updated priority/important Major change, requires approval from ≥2 primary reviewers type/bug-fix Bug fix type/cherry-pick This PR is just a cherry-pick (backport) labels Sep 16, 2020
@lance6716
Copy link
Collaborator

LGTM

@ti-srebot ti-srebot added the status/LGT1 One reviewer already commented LGTM label Sep 16, 2020
Copy link
Member

@csuzhangxc csuzhangxc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@csuzhangxc csuzhangxc added status/LGT2 Two reviewers already commented LGTM, ready for merge and removed status/LGT1 One reviewer already commented LGTM labels Sep 16, 2020
@csuzhangxc csuzhangxc added this to the v2.0.0 RC.3 milestone Sep 16, 2020
@csuzhangxc csuzhangxc merged commit 651943d into pingcap:release-2.0 Sep 16, 2020
@csuzhangxc 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 Oct 27, 2020
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/important Major change, requires approval from ≥2 primary reviewers 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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants