-
Notifications
You must be signed in to change notification settings - Fork 751
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
refactor: add DatabaseMeta.gc_in_progress #16464
Conversation
/// Indicates whether garbage collection is currently in progress for this dropped database. | ||
/// | ||
/// If it is in progress, the database should not be un-dropped, because the data may be incomplete. | ||
pub gc_in_progress: bool, |
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 means all dbs in old version this flag is false?
Because these dbs are not in progress.
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.
Yes, Currently no db is in gc state, this new state will be set only when the gc is started. And current codebase does not use this state.
50ece24
to
84d4f20
Compare
256d203
to
d02481b
Compare
If `gc_in_progress` is set, no un-drop can be done on this database. Because the related data may already have been deleted. This commit does not use this flag yet, and will be used in next commit. - Part of databendlabs#16433
d02481b
to
cf11f09
Compare
I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/
Summary
refactor: add DatabaseMeta.gc_in_progress
If
gc_in_progress
is set, no un-drop can be done on this database.Because the related data may already have been deleted.
This commit does not use this flag yet, and will be used in next commit.
Tests
Type of change
Related Issues
This change is