-
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: postpone cleaning placement rules to gc-worker #28687
ddl: postpone cleaning placement rules to gc-worker #28687
Conversation
Signed-off-by: ailinkid <314806019@qq.com>
Signed-off-by: ailinkid <314806019@qq.com>
[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. |
Please follow PR Title Format:
Or if the count of mainly changed packages are more than 3, use
After you have format title, you can leave a comment |
/run-check_dev_2 |
@@ -339,12 +333,6 @@ func onDropTableOrView(d *ddlCtx, t *meta.Meta, job *model.Job) (ver int64, _ er | |||
break | |||
} | |||
} | |||
// Clean the placement bundle to PD. | |||
err = dropRuleBundles(d, physicalTableIDs) |
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.
I think we should add some comments here about why we not drop rule bundles here and postpone it to gc_worker.
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.
added:
Placement rules cannot be removed immediately after drop table / truncate table, because the tables can be flashed back or recovered.
Signed-off-by: ailinkid <314806019@qq.com>
LGTM. but I'm not very familiar with gc_worker. May be you can ask another one to review it again? @AilinKid |
|
/merge |
This pull request has been accepted and is ready to merge. Commit hash: b48dc9f
|
@AilinKid: 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. |
What problem does this PR solve?
Issue Number: close #28686
Problem Summary:
What is changed and how it works?
What's Changed:
1: remove the instant notification of cleaning placement rules when dropping table in the ddl workers.
2: make gc worker clean all the placement rules for both table and partitions (since it's idempotent, doing it for every partition range is ok)
Check List
Tests
Release note