From af96807eccb3805184c17229d1c99955114022e5 Mon Sep 17 00:00:00 2001 From: Joseph Koshakow Date: Sat, 7 Jun 2025 07:27:52 -0400 Subject: [PATCH] Replace a predicate that was always false with a literal (#151) * Replace a predicate that was always false with a literal * comment + fix mvcc version Signed-off-by: Alex Chi --------- Signed-off-by: Alex Chi Co-authored-by: Alex Chi --- mini-lsm-mvcc/src/compact/tiered.rs | 3 ++- mini-lsm/src/compact/tiered.rs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mini-lsm-mvcc/src/compact/tiered.rs b/mini-lsm-mvcc/src/compact/tiered.rs index 56ace89..4059078 100644 --- a/mini-lsm-mvcc/src/compact/tiered.rs +++ b/mini-lsm-mvcc/src/compact/tiered.rs @@ -90,7 +90,8 @@ impl TieredCompactionController { .take(id + 1) .cloned() .collect::>(), - bottom_tier_included: id + 1 >= snapshot.levels.len(), + // Size ratio trigger will never include the bottom level + bottom_tier_included: false, }); } } diff --git a/mini-lsm/src/compact/tiered.rs b/mini-lsm/src/compact/tiered.rs index 56ace89..4059078 100644 --- a/mini-lsm/src/compact/tiered.rs +++ b/mini-lsm/src/compact/tiered.rs @@ -90,7 +90,8 @@ impl TieredCompactionController { .take(id + 1) .cloned() .collect::>(), - bottom_tier_included: id + 1 >= snapshot.levels.len(), + // Size ratio trigger will never include the bottom level + bottom_tier_included: false, }); } }