Skip to content

Commit

Permalink
fix: call lsm::close when closing the cli (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimbtp authored Mar 18, 2024
1 parent 0b19c80 commit afad25b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mini-lsm-starter/src/bin/mini-lsm-cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,10 @@ impl ReplHandler {
self.lsm.force_full_compaction()?;
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;
Expand Down

0 comments on commit afad25b

Please sign in to comment.