-
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
chore: add assertion to ensure monotonically decreasing user key epoch #14488
Conversation
The check does not pass in e2e test.
|
Just found out the cause. Will fix. |
17a7e5d
to
7de0046
Compare
Fixed by #14494 |
Introduced |
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
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
@@ -427,13 +428,16 @@ pub async fn merge_imms_in_memory( | |||
} | |||
|
|||
let mut merged_payload: Vec<SharedBufferVersionedEntry> = Vec::new(); | |||
let mut pivot = items | |||
let first_item_key = items |
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.
maybe off topic: can we assert that items is non-empty instead of creating an implicit default value?
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.
I planned to do that before but I later realized it is possible that the items are empty when imm only contains range tombstone.
However, I am planning to disallow imm merge when there are range tombstones in imm, which can simplify the logic a lot.
91dd648
to
9781d5f
Compare
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
This PR adds assertion in the following places to ensure monotonically decreasing user key epoch:
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.