mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-23 23:00:59 +00:00
fix: Compact the whole database for each WriteBatch injected
This commit is contained in:
@ -266,6 +266,7 @@ impl DatabaseIndex {
|
||||
fn commit_update(&self, update: Update) -> Result<Arc<DatabaseView<Arc<DB>>>, Box<Error>> {
|
||||
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)?);
|
||||
|
Reference in New Issue
Block a user