mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-12 15:26:52 +00:00
metadata: Create compact LMDB snapshots
See #1006 LMDB files never shrink, so we can end up with a large database that contains a smaller amount of actual data. Compacting the snapshots is an easy win: it will write faster to disk, take less space, and if needed you can reimport an already-compacted snapshot as the main database.
This commit is contained in:
@@ -109,7 +109,7 @@ impl IDb for LmdbDb {
|
||||
let mut path = to.clone();
|
||||
path.push("data.mdb");
|
||||
self.db
|
||||
.copy_to_path(path, heed::CompactionOption::Disabled)?;
|
||||
.copy_to_path(path, heed::CompactionOption::Enabled)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user