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

dm: revert dm#2047 #3491

Merged
merged 6 commits into from
Nov 17, 2021
Merged

dm: revert dm#2047 #3491

merged 6 commits into from
Nov 17, 2021

Conversation

glorv
Copy link
Contributor

@glorv glorv commented Nov 17, 2021

What problem does this PR solve?

Revert dm#2047 due to #3487

Also cherry-pick #3413 #3435 #3471 to make integration stable.

What is changed and how it works?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Code changes

Side effects

Related changes

Release note

None

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Nov 17, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • GMHDBJD
  • lance6716

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 do-not-merge/cherry-pick-not-approved release-note-none Denotes a PR that doesn't merit a release note. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 17, 2021
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 17, 2021
@glorv
Copy link
Contributor Author

glorv commented Nov 17, 2021

/run-all-tests

@glorv
Copy link
Contributor Author

glorv commented Nov 17, 2021

/run-kafka-integration-test

Copy link
Contributor

@lance6716 lance6716 left a comment

Choose a reason for hiding this comment

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

LGTM

the difference of this revert PR and dm#2048 is https://github.com/pingcap/dm/pull/2047/files#diff-e725a03bd475dc4ea28028613ede1fd88a8cc8f881f0a1788a189e766f191830R1869

after this PR, we reset streamer to s.checkpoint.GlobalPoint() but before dm#2048, we reset streamer to lastLocation.

s.checkpoint.GlobalPoint() is updated in three places: xid job, ddl job, handle-error skip. In the first two places lastLocation is equal to s.checkpoint.GlobalPoint(). In the last place s.checkpoint.GlobalPoint() is forwarded, I think it's better than lastLocation because we now remember user's action after ResetReplicationSyncer

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 17, 2021
@glorv
Copy link
Contributor Author

glorv commented Nov 17, 2021

/run-dm-integration-test

@GMHDBJD
Copy link
Contributor

GMHDBJD commented Nov 17, 2021

rest LGTM

after this PR, we reset streamer to s.checkpoint.GlobalPoint() but before dm#2048, we reset streamer to lastLocation.

One situation is sequence sharding ddl, lastLocation is forwarded but global checkpoint is not, may this cause some problem? 🤔

@Ehco1996 Ehco1996 added the area/dm Issues or PRs related to DM. label Nov 17, 2021
@glorv
Copy link
Contributor Author

glorv commented Nov 17, 2021

/run-dm-integration-test

Copy link
Contributor

@GMHDBJD GMHDBJD left a comment

Choose a reason for hiding this comment

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

LGTM

@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 Nov 17, 2021
@glorv
Copy link
Contributor Author

glorv commented Nov 17, 2021

/run-all-tests

@glorv
Copy link
Contributor Author

glorv commented Nov 17, 2021

LGTM

the difference of this revert PR and dm#2048 is https://github.com/pingcap/dm/pull/2047/files#diff-e725a03bd475dc4ea28028613ede1fd88a8cc8f881f0a1788a189e766f191830R1869

after this PR, we reset streamer to s.checkpoint.GlobalPoint() but before dm#2048, we reset streamer to lastLocation.

s.checkpoint.GlobalPoint() is updated in three places: xid job, ddl job, handle-error skip. In the first two places lastLocation is equal to s.checkpoint.GlobalPoint(). In the last place s.checkpoint.GlobalPoint() is forwarded, I think it's better than lastLocation because we now remember user's action after ResetReplicationSyncer

We may also update lastLocation when handle-error skip, in this way lastLocation will represent last finished binlog accurately. We can optimize this later.

@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 17, 2021
@glorv
Copy link
Contributor Author

glorv commented Nov 17, 2021

/run-all-tests

@glorv
Copy link
Contributor Author

glorv commented Nov 17, 2021

/run-all-tests

@glorv
Copy link
Contributor Author

glorv commented Nov 17, 2021

/run-kafka-integration-test

@zhouqiang-cl zhouqiang-cl added the cherry-pick-approved Cherry pick PR approved by release team. label Nov 17, 2021
@glorv
Copy link
Contributor Author

glorv commented Nov 17, 2021

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: 285c0e2

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

glorv commented Nov 17, 2021

/run-integration-test

@ti-chi-bot ti-chi-bot merged commit c4c78d3 into pingcap:release-5.3 Nov 17, 2021
@glorv glorv deleted the revert-dm-2048 branch November 17, 2021 11:00
@glorv glorv changed the title dm: revert dm#2048 dm: revert dm#2047 Nov 18, 2021
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. cherry-pick-approved Cherry pick PR approved by release team. release-note-none Denotes a PR that doesn't merit a release note. 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.

8 participants