mirror of
https://github.com/mikedilger/gossip.git
synced 2024-09-29 00:11:01 +00:00
Fix a problem with changes being lost introduced by compact logic
This commit is contained in:
parent
8db63d97d3
commit
3fc008bee3
@ -177,9 +177,14 @@ impl Storage {
|
||||
// Open env
|
||||
let env = Self::new_env(false)?;
|
||||
|
||||
env.force_sync()?;
|
||||
|
||||
// Copy to backup file, compacting
|
||||
tracing::info!("Compacting LMDB...");
|
||||
let _ = env.copy_to_file(&backup, heed::CompactionOption::Enabled)?;
|
||||
|
||||
env.force_sync()?;
|
||||
let _ = env.prepare_for_closing();
|
||||
}
|
||||
|
||||
// Move the data out of the way
|
||||
|
Loading…
Reference in New Issue
Block a user