-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
ddl: refactor schema builder #31172
ddl: refactor schema builder #31172
Conversation
Signed-off-by: xhe <[email protected]>
Signed-off-by: xhe <[email protected]>
Signed-off-by: xhe <[email protected]>
[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. |
Signed-off-by: xhe <[email protected]>
Signed-off-by: xhe <[email protected]>
Signed-off-by: xhe <[email protected]>
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, pls add tests for it either in this one or next pull request
Thx, I don't think new tests are needed. It is same as before anyway. But I think some failed tests may be related, I'll take a deeper look... |
Signed-off-by: xhe <[email protected]>
Issue Number: ref pingcap#30272
Signed-off-by: xhe <[email protected]>
Signed-off-by: xhe <[email protected]>
Signed-off-by: xhe <[email protected]>
Co-authored-by: wjHuang <[email protected]>
/merge |
/merge cancel |
Seems stable, I am looking at it. |
Signed-off-by: xhe <[email protected]>
Since my fix for rename tables, auto id allocated are not as expected as in the tests. It should not be "1,2,3" but "1,5001", which is the result reusing allocators.3 |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 7f4d41e
|
Code Coverage Details: https://codecov.io/github/pingcap/tidb/commit/6f42e215fe76c63fb7cbd8d38a62baff87b488d3 |
@xhebox: 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. |
/merge |
What problem does this PR solve?
Issue Number: ref #30272
Problem Summary: Sub task from #28763. The big function
ApplyDiff
is separated into two parts: the outer one serve as the first dispatching layer, which will handle some loosely-related actions; all other actions falls into default, which either requiresapplyUpdateTable(the original main logic of ApplyDiff)
to update the infoschema, or processAffectedOpts
.It is made very clear and verbose about how the actions are handled. The redundant code is intended to make it clear.
Also one memory optimization is applied,
dbInfo
won't be copied every time inapplyUpdateTable
.copySchemaTables
is renamed togetSchemaAndCopyIfNecessary
.Check List
Tests
Side effects
Documentation
Release note