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)
|
if (active)
|
||||||
{
|
{
|
||||||
auto status (mdb_txn_commit (handle));
|
auto status = mdb_txn_commit (handle);
|
||||||
release_assert (status == MDB_SUCCESS, mdb_strerror (status));
|
if (status != MDB_SUCCESS)
|
||||||
|
{
|
||||||
|
release_assert (false && "Unable to write to the LMDB database", mdb_strerror (status));
|
||||||
|
}
|
||||||
txn_callbacks.txn_end (this);
|
txn_callbacks.txn_end (this);
|
||||||
active = false;
|
active = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,10 @@ void nano::write_rocksdb_txn::commit ()
|
||||||
++attempt_num;
|
++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;
|
active = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue