Skip to content

Commit

Permalink
Remove ExtractUserKey of start、end in CreateCompactionFilter
Browse files Browse the repository at this point in the history
Signed-off-by: zhangguangchao <[email protected]>
  • Loading branch information
zgcbj committed Sep 29, 2022
1 parent ce0ea61 commit 1117ec5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions db/compaction/compaction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 1117ec5

Please sign in to comment.