fix: call lsm::close when closing the cli (#60)

This commit is contained in:
dimbtp
2024-03-19 05:58:37 +08:00
committed by GitHub
parent 0b19c806fe
commit afad25b6fd

View File

@@ -121,7 +121,10 @@ impl ReplHandler {
self.lsm.force_full_compaction()?; self.lsm.force_full_compaction()?;
println!("full compaction success"); println!("full compaction success");
} }
Command::Quit | Command::Close => std::process::exit(0), Command::Quit | Command::Close => {
self.lsm.close()?;
std::process::exit(0);
}
}; };
self.epoch += 1; self.epoch += 1;