public void Commit()
{
if (BtreeRoot == null)
{
throw new BTDBException("Transaction already commited or disposed");
}
InvalidateCurrentKey();
var currentBtreeRoot = _btreeRoot;
_btreeRoot = null;
if (_preapprovedWritting)
{
_preapprovedWritting = false;
_keyValueDB.RevertWrittingTransaction();
}
else if (_writting)
{
_keyValueDB.CommitWrittingTransaction(currentBtreeRoot);
_writting = false;
}
}