-
Notifications
You must be signed in to change notification settings - Fork 590
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(storage): add SST sanity check during commit epoch #18757
Conversation
@@ -543,7 +543,7 @@ message VacuumTask { | |||
|
|||
// Scan object store to get candidate orphan SSTs. | |||
message FullScanTask { | |||
uint64 sst_retention_time_sec = 1; | |||
uint64 sst_retention_watermark = 1; |
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.
The watermark is meta node's now - SST retention sec.
Previously it's calculated in compute node, which relies on compute node's local clock.
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.
Just a note: the reason why this change is compatible is because the previous sst_retention_time_sec
must be way smaller than sst_retention_watermark
. That means:
- If meta is upgraded before compactor, compactor will be less aggressive to delete objects because
now - sst_retention_watermark
(using old logic to interpret the new field) is way smaller. - If compactor is upgraded before meta, compactor will also be less aggressive to delete objects because
sst_retention_time_sec
(using new logic to interpret the old field) is way smaller
@@ -32,13 +32,14 @@ message BarrierCompleteResponse { | |||
string request_id = 1; | |||
common.Status status = 2; | |||
repeated CreateMviewProgress create_mview_progress = 3; | |||
message GroupedSstableInfo { | |||
message LocalSstableInfo { |
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.
Since SSTs to commit are no longer grouped, I make the pb type name consistent with the corresponding type in mem.
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.
Rest 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!
@@ -543,7 +543,7 @@ message VacuumTask { | |||
|
|||
// Scan object store to get candidate orphan SSTs. | |||
message FullScanTask { | |||
uint64 sst_retention_time_sec = 1; | |||
uint64 sst_retention_watermark = 1; |
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.
Just a note: the reason why this change is compatible is because the previous sst_retention_time_sec
must be way smaller than sst_retention_watermark
. That means:
- If meta is upgraded before compactor, compactor will be less aggressive to delete objects because
now - sst_retention_watermark
(using old logic to interpret the new field) is way smaller. - If compactor is upgraded before meta, compactor will also be less aggressive to delete objects because
sst_retention_time_sec
(using new logic to interpret the old field) is way smaller
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
SstObjectIdTracker
has been used to prevent full GC from deleteing SSTs that has been written to object store but not committed to meta node.In the context of partial checkpoint, the
SstObjectIdTracker
no longer behave correctly in compute node.So #18641 has removed its usage in compute node.
This PR adds additional SST sanity check during commit epoch, to ensure potentially GCed SSTs won't be committed to Hummock Version.
There's a trade-off between the accuracy and IOPS, pls refer to the new comment in
builder.rs
.Checklist
./risedev check
(or alias,./risedev c
)Documentation
Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.