Skip to content
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

relay, syncer(dm): stricter GTID check when retry replication #3496

Merged
merged 28 commits into from
Dec 7, 2021

Conversation

lance6716
Copy link
Contributor

@lance6716 lance6716 commented Nov 17, 2021

What problem does this PR solve?

close #3487

also avoid skipping events of another GTID after re-connect upstream without relay. when upstream switches, we continue from last finished GTID set, but new upstream may send different GTID (maybe written from itself rather than the replication master)

What is changed and how it works?

  • relay only send ErrMaybeDuplicateEvent when upstream switch and last relay log file is not properly closed
  • when syncer want to skip part of transaction, it should check GTID first

Check List

Tests

Code changes

  • Has exported function/method change

Side effects

Related changes

  • Need to cherry-pick to the release branch

Release note

When auto recover a GTID replication, skip duplicated events of unfinished transaction.

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Nov 17, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • Ehco1996
  • lichunzhu

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 17, 2021
@lance6716 lance6716 changed the title dm/test: add a test to reproduce #3487 [DNM]dm/test: add a test to reproduce #3487 Nov 17, 2021
@ti-chi-bot ti-chi-bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 25, 2021
@lance6716 lance6716 changed the title [DNM]dm/test: add a test to reproduce #3487 relay, syncer(dm): strict GTID check when retry replication Nov 25, 2021
@lance6716 lance6716 changed the title relay, syncer(dm): strict GTID check when retry replication relay, syncer(dm): stricter GTID check when retry replication Nov 25, 2021
@lance6716 lance6716 added the needs-cherry-pick-release-5.3 Should cherry pick this PR to release-5.3 branch. label Nov 25, 2021
@lance6716

This comment has been minimized.

@lance6716
Copy link
Contributor Author

I'm keep re-running github actions, now I think it's OK to review

/cc @GMHDBJD @glorv @D3Hunter

@lance6716
Copy link
Contributor Author

lance6716 commented Nov 30, 2021

/hold

need to revert the hook of chaos before merge

@ti-chi-bot ti-chi-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 30, 2021
@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Dec 6, 2021
@lance6716
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 66fc82f

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Dec 6, 2021
@glorv
Copy link
Contributor

glorv commented Dec 6, 2021

/run-verify

@glorv
Copy link
Contributor

glorv commented Dec 6, 2021

/run-kafka-integration-test

@Ehco1996
Copy link
Contributor

Ehco1996 commented Dec 7, 2021

/run-verify-ci

@Ehco1996
Copy link
Contributor

Ehco1996 commented Dec 7, 2021

@ti-chi-bot ti-chi-bot removed the status/can-merge Indicates a PR has been approved by a committer. label Dec 7, 2021
@lance6716
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: c2c8acf

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Dec 7, 2021
@lance6716
Copy link
Contributor Author

/run-leak-test

@ti-chi-bot ti-chi-bot merged commit 3eafa6d into pingcap:master Dec 7, 2021
ti-chi-bot pushed a commit to ti-chi-bot/tiflow that referenced this pull request Dec 7, 2021
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #3754.

okJiang pushed a commit to okJiang/tiflow that referenced this pull request Dec 8, 2021
@lance6716 lance6716 deleted the reproduce branch October 13, 2022 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dm Issues or PRs related to DM. needs-cherry-pick-release-5.3 Should cherry pick this PR to release-5.3 branch. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

data lost in chaos with enable-relay
8 participants