From 8d0859bbc77a4f8cb0714c3f8038873d6b8d2ad4 Mon Sep 17 00:00:00 2001 From: Christopher Berner Date: Sun, 29 Dec 2024 15:50:10 -0800 Subject: [PATCH] Enable compaction for rocksdb in benchmark --- benches/common.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/benches/common.rs b/benches/common.rs index d182c5c1..dfa46962 100644 --- a/benches/common.rs +++ b/benches/common.rs @@ -485,6 +485,11 @@ impl<'a> BenchDatabase for RocksdbBenchDatabase<'a> { let snapshot = self.db.snapshot(); RocksdbBenchReadTransaction { snapshot } } + + fn compact(&mut self) -> bool { + self.db.compact_range::<&[u8], &[u8]>(None, None); + true + } } pub struct RocksdbBenchWriteTransaction<'a> {