-
Notifications
You must be signed in to change notification settings - Fork 287
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
syncer(dm): Add unit test and integration test for multi-schema change when encountering "invalid connection" error #7104
Conversation
…e when invalid connection
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
/cc @lance6716 |
Codecov Report
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. @@ Coverage Diff @@
## master #7104 +/- ##
================================================
+ Coverage 59.8150% 65.8508% +6.0358%
================================================
Files 803 565 -238
Lines 92129 52218 -39911
================================================
- Hits 55107 34386 -20721
+ Misses 32213 15171 -17042
+ Partials 4809 2661 -2148 |
/cc @GMHDBJD |
/run-all-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 2a4d28a
|
/run-all-tests |
/hold waiting refine tests and codes |
…e when invalid connection
/run-dm-integration-test |
…e of invalid connection error
/run-all-tests |
1 similar comment
/run-all-tests |
/unhold |
This pull request has been accepted and is ready to merge. Commit hash: 39cef26
|
/run-all-tests |
/hold need to fix CI |
/run-all-tests |
2 similar comments
/run-all-tests |
/run-all-tests |
/run-all-tests |
/run-dm-integration-test |
2 similar comments
/run-dm-integration-test |
/run-dm-integration-test |
/unhold |
@lyzx2001: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
/run-engine-integration-test |
1 similar comment
/run-engine-integration-test |
What problem does this PR solve?
Issue Number: ref #4689
What is changed and how it works?
I have added unit test and integration test for multi-schema change when encountering "invalid connection" error, as additional tests for #6848. The running results have proved that the current logic works correctly for the multi-schema change situation as well.
According to experiments, the behavior of DM and TiDB is slightly different for multi-schema change.
Suppose we execute
ALTER TABLE gbk.invalid_conn_test2 MODIFY i SMALLINT NOT NULL DEFAULT '0', MODIFY j SMALLINT NOT NULL DEFAULT '0'
in DM and manually in TiDB separately.For DM:
The multi-schema change DDL would be separated into two or more single DDL, and are executed by order one by one.
For manually operated in TiDB:
The multi-schema change DDL would be separated into two or more subjob. The history returned by
ADMIN SHOW DDL JOBS
would contain both the subjobs and the original multi-schema change job. The history returned byADMIN SHOW DDL JOB QUERIES LIMIT 10 OFFSET 0
would only contain the original multi-schema change job but not the subjobs.I have added a unit test to test the manual TiDB situations since other unit tests have already covered the DM situations. I have added several integration tests to test the DM situations.
Check List
Tests
Questions
Will it cause performance regression or break compatibility?
No.
Do you need to update user documentation, design documentation or monitoring documentation?
No.
Release note