ensure sync

Signed-off-by: Alex Chi <iskyzh@gmail.com>
This commit is contained in:
Alex Chi
2024-01-20 11:16:55 +08:00
parent b1458a66b2
commit 4928ececba
4 changed files with 39 additions and 3 deletions

View File

@@ -0,0 +1,17 @@
use crate::lsm_storage::MiniLsm;
impl MiniLsm {
pub fn dump_structure(&self) {
let snapshot = self.inner.state.read();
if !snapshot.l0_sstables.is_empty() {
println!(
"L0 ({}): {:?}",
snapshot.l0_sstables.len(),
snapshot.l0_sstables,
);
}
for (level, files) in &snapshot.levels {
println!("L{level} ({}): {:?}", files.len(), files);
}
}
}