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/optimistic: make errors which isn't sync error handled by 'binlog skip' command #4883

Merged
merged 20 commits into from
Mar 17, 2022

Conversation

lichunzhu
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #3789

What is changed and how it works?

Add ConflictStage ConflictError and returns an error directly when dm-worker meets this stage.

Check List

Tests

  • Unit test
  • Integration test

Code changes

  • Has persistent data change

Side effects

  • Breaking backward compatibility

Related changes

  • Need to update the documentation

Release note

None

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Mar 14, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • Ehco1996
  • GMHDBJD

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 the release-note-none Denotes a PR that doesn't merit a release note. label Mar 14, 2022
@ti-chi-bot ti-chi-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 14, 2022
@lichunzhu lichunzhu requested review from GMHDBJD, WizardXiao, lance6716 and Ehco1996 and removed request for GMHDBJD and WizardXiao March 14, 2022 07:04
@lance6716 lance6716 added the area/dm Issues or PRs related to DM. label Mar 14, 2022
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.

rest LGTM

"\"result\": true" 1
"binlog skip test" \
"\"result\": true" 2 \
"\"source 'mysql-replica-02' has no error\"" 1
Copy link
Contributor

Choose a reason for hiding this comment

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

How about check the task status after skip? Maybe insert some new rows.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@GMHDBJD
Copy link
Contributor

GMHDBJD commented Mar 14, 2022

@lichunzhu
Copy link
Contributor Author

/run-all-tests

@lichunzhu
Copy link
Contributor Author

/run-all-tests

@Ehco1996
Copy link
Contributor

will review after codefreeze 😂

@lichunzhu
Copy link
Contributor Author

/run-all-tests

@lichunzhu
Copy link
Contributor Author

/run-all-tests

@lichunzhu
Copy link
Contributor Author

/run-verify-ci

@lichunzhu
Copy link
Contributor Author

/run-dm-integration-test

@codecov-commenter
Copy link

codecov-commenter commented Mar 16, 2022

Codecov Report

Merging #4883 (a2a2158) into master (687e248) will decrease coverage by 0.2351%.
The diff coverage is 49.4444%.

Flag Coverage Δ
cdc 61.0616% <50.3067%> (+0.4630%) ⬆️
dm 51.7699% <49.1434%> (-0.6997%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@@               Coverage Diff                @@
##             master      #4883        +/-   ##
================================================
- Coverage   56.1240%   55.8888%   -0.2352%     
================================================
  Files           522        524         +2     
  Lines         65325      66677      +1352     
================================================
+ Hits          36663      37265       +602     
- Misses        25094      25767       +673     
- Partials       3568       3645        +77     

@lichunzhu
Copy link
Contributor Author

@Ehco1996 @GMHDBJD PTAL

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 the status/LGT1 Indicates that a PR has LGTM 1. label Mar 17, 2022
Copy link
Contributor

@Ehco1996 Ehco1996 left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -179,6 +179,9 @@ func (s *Syncer) handleQueryEventOptimistic(qec *queryEventContext) error {
}
}

if op.ConflictStage == optimism.ConflictError {
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe use switch to handle different op, ok to change in next pr

@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 Mar 17, 2022
@lichunzhu
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: a2a2158

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Mar 17, 2022
@ti-chi-bot ti-chi-bot removed the status/can-merge Indicates a PR has been approved by a committer. label Mar 17, 2022
@lichunzhu
Copy link
Contributor Author

/run-all-tests

@pingcap pingcap deleted a comment from ti-chi-bot Mar 17, 2022
@lichunzhu
Copy link
Contributor Author

/run-leak-test

@lichunzhu
Copy link
Contributor Author

/run-dm-integration-test

@lichunzhu
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: 389c472

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

/run-dm-integration-test

@ti-chi-bot ti-chi-bot merged commit b0e6b2a into pingcap:master Mar 17, 2022
@lichunzhu lichunzhu deleted the fixAddDroppedCol branch March 17, 2022 07:07
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. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 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.

Support unlock-ddl-lock for Optimistic Sharding DDL
6 participants