-
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, store: Remove placement rules when the GC worker removes partitions #20575
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AilinKid
reviewed
Oct 22, 2020
tangenta
reviewed
Oct 22, 2020
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
LGTM |
ti-srebot
approved these changes
Oct 22, 2020
/run-all-tests |
/merge |
ti-srebot
added
the
status/can-merge
Indicates a PR has been approved by a committer.
label
Oct 22, 2020
/run-all-tests |
@djshow832 merge failed. |
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
sig/sql-infra
SIG: SQL Infra
status/can-merge
Indicates a PR has been approved by a committer.
status/LGT2
Indicates that a PR has LGTM 2.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Issue Number: close #18411
Problem Summary:
When the user drops a partitioned table, the placement rules on the partitions should be dropped. But this cannot be done immediately, because the user may recover it by
flashback
orrecover
statements.So the placement rules should be kept until the GC worker removes the corresponding ranges.
What is changed and how it works?
What's Changed:
Remove the placement rules when the GC worker runs GC job.
Note that truncating table doesn't work well, because there's a bug in truncating partitioned table: the partitions become less after truncating.
Furthermore, rule cache doesn't change in this PR. It will be implemented in the next PR.
How it Works:
Related changes
Check List
Tests
Check out the placement rules:
Check the placement rule immediately, we found it doesn't change:
After 10 minutes:
We can see that the placement rule is deleted.
Side effects
Release note