Commit d4e09942 authored by Yoni Fogel's avatar Yoni Fogel

Addresses #1757 Merge fix 'checkpoints do not happen during abort/commit' from 2.0.0 to main

git-svn-id: file:///svn/toku/tokudb@11986 c7de825b-a66e-492c-adef-691d508d4ae1
parent bc6e35bd
......@@ -1145,11 +1145,17 @@ static int locked_txn_stat (DB_TXN *txn, struct txn_stat **txn_stat) {
}
static int locked_txn_commit(DB_TXN *txn, u_int32_t flags) {
toku_ydb_lock(); int r = toku_txn_commit(txn, flags); toku_ydb_unlock(); return r;
env_checkpointing_begin_atomic_operation(txn->mgrp); //Cannot checkpoint during a commit.
toku_ydb_lock(); int r = toku_txn_commit(txn, flags); toku_ydb_unlock();
env_checkpointing_end_atomic_operation(txn->mgrp); //Cannot checkpoint during a commit.
return r;
}
static int locked_txn_abort(DB_TXN *txn) {
toku_ydb_lock(); int r = toku_txn_abort(txn); toku_ydb_unlock(); return r;
env_checkpointing_begin_atomic_operation(txn->mgrp); //Cannot checkpoint during an abort.
toku_ydb_lock(); int r = toku_txn_abort(txn); toku_ydb_unlock();
env_checkpointing_end_atomic_operation(txn->mgrp); //Cannot checkpoint during an abort.
return r;
}
static int toku_txn_begin(DB_ENV *env, DB_TXN * stxn, DB_TXN ** txn, u_int32_t flags) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment