-
Notifications
You must be signed in to change notification settings - Fork 596
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(storage): support next_epoch method for StateStoreReadLog #20068
base: main
Are you sure you want to change the base?
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
9eede69
to
7e04746
Compare
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!
@@ -148,12 +203,12 @@ impl<T> TableChangeLogCommon<T> { | |||
|
|||
pub fn truncate(&mut self, truncate_epoch: u64) { | |||
while let Some(change_log) = self.0.front() | |||
&& *change_log.epochs.last().expect("non-empty") <= truncate_epoch | |||
&& *change_log.epochs.last().expect("non-empty") < truncate_epoch |
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.
Is this a bug fix?
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.
Not really. It just delays the truncation of the log on truncate_epoch
, and is not wrong before this PR. After this PR, we need to keep the truncate_epoch
in the change log.
7e04746
to
f2ddc75
Compare
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Support
next_epoch
method forStateStoreReadLog
. The method returns thenext_epoch
of the givenepoch
in the table change log.Checklist
Documentation
Release note