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

checker(dm): support concurrent check #3975

Merged
merged 73 commits into from
Feb 14, 2022

Conversation

okJiang
Copy link
Member

@okJiang okJiang commented Dec 20, 2021

What problem does this PR solve?

Issue Number: close #3974

What is changed and how it works?

  • support concurrent check table_structure and table_consistency
  • the checker thread follows the change of MydumperConfig.Threads

Check List

Tests

  • Unit test
  • Manual test

10000 tables with default dumpconfig.thread

added delay spend time
10 ms 31s
20 ms 56s
50 ms 130s
100 ms 175s

Code changes

  • Has interface methods change

Related changes

  • Need to update the documentation

Release note

Please add a release note.
If you don't think this PR needs a release note then fill it with `None`.

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Dec 20, 2021

[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 do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Dec 20, 2021
@ti-chi-bot ti-chi-bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Dec 20, 2021
@ti-chi-bot ti-chi-bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Dec 21, 2021
@okJiang
Copy link
Member Author

okJiang commented Dec 23, 2021

/run-dm-integration-test

@okJiang
Copy link
Member Author

okJiang commented Dec 23, 2021

/run-dm-integration-test

@okJiang
Copy link
Member Author

okJiang commented Dec 23, 2021

/run-dm-integration-test

@okJiang okJiang marked this pull request as ready for review December 23, 2021 09:49
@ti-chi-bot ti-chi-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 23, 2021
@okJiang
Copy link
Member Author

okJiang commented Dec 23, 2021

/run-dm-integration-test

@okJiang okJiang added area/dm Issues or PRs related to DM. status/ptal Could you please take a look? labels Dec 23, 2021
@okJiang
Copy link
Member Author

okJiang commented Dec 23, 2021

test passed all. /cc @Ehco1996 @GMHDBJD

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.

will reveiw table_structure.go later 😂 there one is too large

dm/tests/checker/run.md Outdated Show resolved Hide resolved
dm/pkg/checker/utils.go Outdated Show resolved Hide resolved
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Feb 11, 2022
Comment on lines 569 to 573
case <-ctx.Done():
log.L().Logger.Warn("ctx canceled before input tables completely")
return
default:
inCh <- &checkItem{table, sourceID}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
case <-ctx.Done():
log.L().Logger.Warn("ctx canceled before input tables completely")
return
default:
inCh <- &checkItem{table, sourceID}
case <-ctx.Done():
log.L().Logger.Warn("ctx canceled before input tables completely")
return
case inCh <- &checkItem{table, sourceID}:

current implement still can cause bock if ctx is canceled after select check

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 Feb 11, 2022
@Ehco1996
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: dfc8e81

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Feb 11, 2022
@okJiang
Copy link
Member Author

okJiang commented Feb 12, 2022

/run-all-tests

@okJiang
Copy link
Member Author

okJiang commented Feb 12, 2022

/run-dm-integration-test
/run-verify

1 similar comment
@okJiang
Copy link
Member Author

okJiang commented Feb 12, 2022

/run-dm-integration-test
/run-verify

@ti-chi-bot ti-chi-bot removed the status/can-merge Indicates a PR has been approved by a committer. label Feb 12, 2022
Comment on lines +128 to +130
c.reMu.Lock()
markCheckError(r, err)
c.reMu.Unlock()
Copy link
Member Author

Choose a reason for hiding this comment

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

here is different from L396. Here can cause data race with handleOpts().

Copy link
Member Author

Choose a reason for hiding this comment

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

If there is no other doubt, please give me a /merge again. @Ehco1996

@okJiang
Copy link
Member Author

okJiang commented Feb 12, 2022

/run-all-tests

@Ehco1996
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: 4d91558

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Feb 14, 2022
@okJiang
Copy link
Member Author

okJiang commented Feb 14, 2022

/run-verify

@ti-chi-bot ti-chi-bot merged commit c3e8be9 into pingcap:master Feb 14, 2022
zhaoxinyu pushed a commit to zhaoxinyu/ticdc that referenced this pull request Feb 16, 2022
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 Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ 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.

Pre-Checker: Speed ​​up check
7 participants