Reuse DB::get() at compact_as_needed()

This commit is contained in:
Roman Zeyde 2018-04-16 11:32:02 +03:00
parent 6b9d38df49
commit 390d4d0290
No known key found for this signature in database
GPG Key ID: 87CAE5FA46917CBB

View File

@ -69,8 +69,8 @@ impl Store {
}
pub fn compact_if_needed(&self) {
let key = b"F"; // full compaction
if self.db.get(key).unwrap().is_some() {
let key = b"F"; // full compaction marker
if self.get(key).is_some() {
return;
}
info!("full compaction");