mdbx: cleanup after last pull-request.

Cleanup after 4e40af60e7 (Merge pull request #20 from rouzier/feature/txn_try).
This commit is contained in:
Leo Yuriev
2017-10-26 20:51:46 +03:00
parent 875d22ff38
commit 17b8e48bf4
6 changed files with 20 additions and 13 deletions

View File

@@ -20,7 +20,14 @@
#define ACTOR_ID_MAX INT16_MAX
enum actor_testcase { ac_none, ac_hill, ac_deadread, ac_deadwrite, ac_jitter, ac_try };
enum actor_testcase {
ac_none,
ac_hill,
ac_deadread,
ac_deadwrite,
ac_jitter,
ac_try
};
enum actor_status {
as_unknown,

View File

@@ -178,17 +178,18 @@ void testcase::db_close() {
}
void testcase::txn_begin(unsigned flags) {
log_trace(">> txn_begin(%s)", flags & MDBX_RDONLY ? "read-only" : "read-write");
log_trace(">> txn_begin(%s)",
flags & MDBX_RDONLY ? "read-only" : "read-write");
assert(!txn_guard);
MDBX_txn *txn = nullptr;
int rc =
mdbx_txn_begin(db_guard.get(), nullptr, flags, &txn);
int rc = mdbx_txn_begin(db_guard.get(), nullptr, flags, &txn);
if (unlikely(rc != MDBX_SUCCESS))
failure_perror("mdbx_txn_begin()", rc);
txn_guard.reset(txn);
log_trace("<< txn_begin(%s)", flags & MDBX_RDONLY ? "read-only" : "read-write");
log_trace("<< txn_begin(%s)",
flags & MDBX_RDONLY ? "read-only" : "read-write");
}
void testcase::txn_end(bool abort) {

View File

@@ -15,8 +15,7 @@ bool testcase_try::run() {
MDBX_txn *txn = nullptr;
MDBX_txn *txn2 = nullptr;
int rc =
mdbx_txn_begin(db_guard.get(), nullptr, 0, &txn);
int rc = mdbx_txn_begin(db_guard.get(), nullptr, 0, &txn);
if (unlikely(rc != MDBX_SUCCESS))
failure_perror("mdbx_txn_begin(MDBX_TRYTXN)", rc);
else {