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
No known key found for this signature in database
GPG key ID: 20CD8020AFA88D69
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
})();