Discards the transaction's writes and ends it. Aborting is idempotent: doing
it to an already-finished transaction does nothing, so it is safe to register
with on.exit() alongside an explicit mdbx_txn_commit().
Arguments
- txn
An
mdbx_txnobject, frommdbx_txn_begin().
Examples
path <- tempfile(fileext = ".mdbx")
env <- mdbx_env_open(path)
txn <- mdbx_txn_begin(env, write = TRUE)
mdbx_txn_abort(txn)
mdbx_txn_abort(txn) # already aborted; does nothing
mdbx_env_close(env)
unlink(c(path, paste0(path, "-lck")))