Skip to content
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

fix key boundaries in compaction filter context #318

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Remove ExtractUserKey of start、end in CreateCompactionFilter
Signed-off-by: zhangguangchao <[email protected]>
zgcbj committed Sep 29, 2022
commit 1117ec5bab95b0f95243c76afdea2edbb947fa84
6 changes: 2 additions & 4 deletions db/compaction/compaction.cc
Original file line number Diff line number Diff line change
@@ -545,10 +545,8 @@ std::unique_ptr<CompactionFilter> Compaction::CreateCompactionFilter(
context.is_full_compaction = is_full_compaction_;
context.is_manual_compaction = is_manual_compaction_;
context.is_bottommost_level = bottommost_level_;
context.start_key =
(start == nullptr) ? GetSmallestUserKey() : ExtractUserKey(*start);
context.end_key =
(end == nullptr) ? GetLargestUserKey() : ExtractUserKey(*end);
context.start_key = (start == nullptr) ? GetSmallestUserKey() : *start;
context.end_key = (end == nullptr) ? GetLargestUserKey() : *end;
context.is_end_key_inclusive = (end == nullptr);
for (auto l = inputs_.begin(); l != inputs_.end(); ++l) {
for (auto f = l->files.begin(); f != l->files.end(); ++f) {