This commit is contained in:
imilinovic 2024-03-13 13:03:15 +01:00
parent 7ceeb3bc6d
commit ec3a772258

View File

@ -1761,12 +1761,12 @@ utils::BasicResult<StorageManipulationError, void> DiskStorage::DiskAccessor::Co
logging::AssertRocksDBStatus(transaction_.disk_transaction_->SetCommitTimestamp(*commit_timestamp_));
}
auto commitStatus = transaction_.disk_transaction_->Commit();
if (!commitStatus.ok()) {
transaction_.disk_transaction_->Rollback();
}
delete transaction_.disk_transaction_;
transaction_.disk_transaction_ = nullptr;
if (!commitStatus.ok()) {
spdlog::error("rocksdb: Commit failed with status {}", commitStatus.ToString());
return StorageManipulationError{SerializationError{}};