From 383a49b44f943ade59ce92dd2d0578d930a9de9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Mon, 4 Mar 2019 15:00:53 +0100 Subject: [PATCH] fix: Compact the whole database for each WriteBatch injected --- src/database/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/database/mod.rs b/src/database/mod.rs index 2b7a87f45..d8b1bea79 100644 --- a/src/database/mod.rs +++ b/src/database/mod.rs @@ -266,6 +266,7 @@ impl DatabaseIndex { fn commit_update(&self, update: Update) -> Result>>, Box> { let batch = update.build()?; self.db.write(batch)?; + self.db.compact_range(None, None); let snapshot = Snapshot::new(self.db.clone()); let view = Arc::new(DatabaseView::new(snapshot)?);