Adding details to the DB commit () release_asserts
This commit is contained in:
parent
ce8c9727a7
commit
cf5a088861
2 changed files with 9 additions and 3 deletions
|
@ -99,8 +99,11 @@ void nano::write_mdb_txn::commit ()
|
|||
{
|
||||
if (active)
|
||||
{
|
||||
auto status (mdb_txn_commit (handle));
|
||||
release_assert (status == MDB_SUCCESS, mdb_strerror (status));
|
||||
auto status = mdb_txn_commit (handle);
|
||||
if (status != MDB_SUCCESS)
|
||||
{
|
||||
release_assert (false && "Unable to write to the LMDB database", mdb_strerror (status));
|
||||
}
|
||||
txn_callbacks.txn_end (this);
|
||||
active = false;
|
||||
}
|
||||
|
|
|
@ -66,7 +66,10 @@ void nano::write_rocksdb_txn::commit ()
|
|||
++attempt_num;
|
||||
}
|
||||
|
||||
release_assert (status.ok (), status.ToString ());
|
||||
if (!status.ok ())
|
||||
{
|
||||
release_assert (false && "Unable to write to the RocksDB database", status.ToString ());
|
||||
}
|
||||
active = false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue