-
Notifications
You must be signed in to change notification settings - Fork 599
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(compactor): compaction iterator support filter key with key_range #18031
Conversation
…nto li0k/compactor_iter_key_range
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
assert!( | ||
!self.exceed_key_range_left(key), | ||
"key {:?} key_range_left {:?}", | ||
key, | ||
self.key_range_left.to_ref() | ||
); | ||
|
||
assert!( | ||
!self.exceed_key_range_right(key), | ||
"key {:?} key_range_right {:?} key_range_right_exclusive {}", | ||
key, | ||
self.key_range_right.to_ref(), | ||
self.key_range_right_exclusive | ||
); |
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.
Should this be debug_assert?
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.
For performance.
I think so.
For data correctness.
I think it has to be assert, when the key doesn't satisfy this condition we may give wrong output, and it can't be assumed that the user must have used FullKeyTracker externally to judge the output.
what do you think @hzxa21
…nto li0k/compactor_iter_key_range
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
part 2 of #17898
After PR 17898, SstableStreamIterator will no longer read the whole object, it needs to filter block_metas and keys by key_range to ensure that the k-v pair read belongs to the current SST.
Note: This PR does not implement the logic for fast_compact.
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.