-
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: handle placement rule cache for drop/truncate/recover/flashback table #20622
Conversation
Signed-off-by: xhe <[email protected]>
Signed-off-by: xhe <[email protected]>
Signed-off-by: xhe <[email protected]>
Signed-off-by: xhe <[email protected]>
@ti-srebot /run-all-tests |
/run-all-tests |
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.
Please add test cases by the following procedure:
create a table with partitions -> mock rule cache -> drop the table -> check the rule cache directly or by information_schema.placement_policy
.
|
||
affects := make([]*model.AffectedOption, len(oldIDs)) | ||
for i := 0; i < len(oldIDs); i++ { | ||
affects[i] = &model.AffectedOption{ |
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.
What about schemaID?
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.
It is not used anyway. Affects are processed by L141-165, then continue the loop. It is never passed to ApplyDiff
or whatever function that required schemaID
.
Co-authored-by: djshow832 <[email protected]>
Signed-off-by: xhe <[email protected]>
@ti-srebot /run-all-tests |
/run-all-tests |
not every partition needs to update, some partitions do not have a non-empty bundle. Signed-off-by: xhe <[email protected]>
@ti-srebot /run-all-tests |
/run-all-tests |
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
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
@ti-srebot /merge |
@xhebox No command or invalid command |
/merge |
/run-all-tests |
What problem does this PR solve?
Problem Summary: #20575 has added the function that lazily delete placement rules on PD when tables are removed by GC. This PR completes the function:
Check List
Tests
There should be a manual test though.. Maybe wait for PRs that adds SQL statements to modify rules on Table.
Release note