From 9e4665b8854aa78041e314425fdd7018ef1a0eb6 Mon Sep 17 00:00:00 2001 From: liuhu Date: Tue, 9 Jul 2024 16:14:18 +0800 Subject: [PATCH] use user key for compaction filter --- db/compaction/compaction_iterator.cc | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/db/compaction/compaction_iterator.cc b/db/compaction/compaction_iterator.cc index c37e4f6ed50..e11067e43c0 100644 --- a/db/compaction/compaction_iterator.cc +++ b/db/compaction/compaction_iterator.cc @@ -215,14 +215,9 @@ bool CompactionIterator::InvokeFilterIfNeeded(bool* need_skip, CompactionFilter::ValueType value_type = ikey_.type == kTypeValue ? CompactionFilter::ValueType::kValue : CompactionFilter::ValueType::kBlobIndex; - // Hack: pass internal key to BlobIndexCompactionFilter since it needs - // to get sequence number. + // Hack: we don't use BlobIndexCompactionFilter, so we pass the user key to filter assert(compaction_filter_); - Slice& filter_key = - (ikey_.type == kTypeValue || - !compaction_filter_->IsStackedBlobDbInternalCompactionFilter()) - ? ikey_.user_key - : key_; + Slice& filter_key = ikey_.user_key; { StopWatchNano timer(clock_, report_detailed_time_); if (kTypeBlobIndex == ikey_.type) {