From 17b221fb4e17398939a1c0ec58f56084e1e4d915 Mon Sep 17 00:00:00 2001 From: lxc Date: Tue, 6 May 2025 21:59:03 +0800 Subject: [PATCH] remove unnecessary compaction condition check for key below watermark (#145) remove unnecessary condition check --- mini-lsm-mvcc/src/compact.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mini-lsm-mvcc/src/compact.rs b/mini-lsm-mvcc/src/compact.rs index 5b9f736..b578d36 100644 --- a/mini-lsm-mvcc/src/compact.rs +++ b/mini-lsm-mvcc/src/compact.rs @@ -161,7 +161,7 @@ impl LsmStorageInner { } if iter.key().ts() <= watermark { - if same_as_last_key && !first_key_below_watermark { + if !first_key_below_watermark { iter.next()?; continue; }