Do not commit transaction on failed updates

This commit is contained in:
Kerollmops
2021-09-30 11:08:41 +02:00
committed by Tamo
parent ed783b67ca
commit 6a691db7f8
2 changed files with 3 additions and 3 deletions

View File

@ -202,7 +202,9 @@ impl Index {
Ok(UpdateResult::DocumentDeletion { deleted })
}
};
txn.commit()?;
if result.is_ok() {
txn.commit()?;
}
result
})();