in commit() function call to ffi::mdb_txn_commit() should be after state change.
mdb_txn_commit() will free handle even in failure case. But TransactionState would be still ‘Nomral’ if call fails and is done before state change. Dropping transaction would then cause silent_abort() to call mdb_txn_abort() and free handle again.
in commit() function call to ffi::mdb_txn_commit() should be after state change. mdb_txn_commit() will free handle even in failure case. But TransactionState would be still ‘Nomral’ if call fails and is done before state change. Dropping transaction would then cause silent_abort() to call mdb_txn_abort() and free handle again.