diff --git a/meilidb-core/src/database.rs b/meilidb-core/src/database.rs index 79f4d731e..9bd8348b3 100644 --- a/meilidb-core/src/database.rs +++ b/meilidb-core/src/database.rs @@ -35,8 +35,10 @@ fn update_awaiter(receiver: Receiver<()>, env: heed::Env, update_fn: Arc { - if let Err(e) = writer.commit() { - error!("update transaction failed: {}", e) + if status.result.is_ok() { + if let Err(e) = writer.commit() { + error!("update transaction failed: {}", e) + } } if let Some(ref callback) = *update_fn.load() {