Commit c7de0452 authored by Yoni Fogel's avatar Yoni Fogel

refs #5149 added comments

git-svn-id: file:///svn/toku/tokudb@45206 c7de825b-a66e-492c-adef-691d508d4ae1
parent 2cb512d0
......@@ -187,6 +187,8 @@ toku_txn_xa_prepare (DB_TXN *txn, TOKU_XA_XID *xid) {
// Take the mo lock as soon as a non-readonly txn is found
bool holds_mo_lock = false;
if (!toku_txn_is_read_only(db_txn_struct_i(txn)->tokutxn)) {
// A readonly transaction does no logging, and therefore does not
// need the MO lock.
toku_multi_operation_client_lock();
holds_mo_lock = true;
}
......@@ -258,6 +260,8 @@ locked_txn_commit_with_progress(DB_TXN *txn, u_int32_t flags,
}
bool holds_mo_lock = false;
if (!toku_txn_is_read_only(db_txn_struct_i(txn)->tokutxn)) {
// A readonly transaction does no logging, and therefore does not
// need the MO lock.
toku_multi_operation_client_lock();
holds_mo_lock = true;
}
......@@ -279,6 +283,8 @@ locked_txn_abort_with_progress(DB_TXN *txn,
// But released here so we don't have to hold additional state.
bool holds_mo_lock = false;
if (!toku_txn_is_read_only(db_txn_struct_i(txn)->tokutxn)) {
// A readonly transaction does no logging, and therefore does not
// need the MO lock.
toku_multi_operation_client_lock();
holds_mo_lock = true;
}
......
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