-
Notifications
You must be signed in to change notification settings - Fork 591
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
feat(log-store): log store support truncates at given offset #12263
Conversation
Codecov Report
@@ Coverage Diff @@
## main #12263 +/- ##
==========================================
+ Coverage 69.64% 69.66% +0.02%
==========================================
Files 1422 1422
Lines 235747 236089 +342
==========================================
+ Hits 164186 164478 +292
- Misses 71561 71611 +50
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 5 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
inner.consumed_stream_chunk_count = 0; | ||
} | ||
if let Some(offset) = latest_offset { | ||
inner.updated_truncation = Some(offset); |
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.
We use the largest flushed offset <= the provided truncate offset for truncation. Will there be an issue if we blindly use the provided truncate offset for truncation?
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 provided truncate offset is truncate at a provided chunk id, while in the state store we will truncate at seq id. The code above is to turn the chunk id offset into the seq id offset.
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
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
In this PR, we support log store truncate at a given offset. Previously, a truncate call means all previous item has been consumed, which lacks the ability to receive more data before previous batches of data have been consumed.
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.