Commit 0bd44bcf authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

[t:4890], make toku_txn_start_txn be a void function

git-svn-id: file:///svn/toku/tokudb@43734 c7de825b-a66e-492c-adef-691d508d4ae1
parent f16fade4
......@@ -84,7 +84,7 @@ toku_txn_begin_with_xid (
{
int r = toku_txn_create_txn(tokutxn, parent_tokutxn, logger, xid, snapshot_type, container_db_txn);
if (r == 0)
r = toku_txn_start_txn(*tokutxn);
toku_txn_start_txn(*tokutxn);
return r;
}
......@@ -238,7 +238,7 @@ toku_txn_create_txn (
return 0;
}
int
void
toku_txn_start_txn(TOKUTXN txn) {
TOKULOGGER logger = txn->logger;
TOKUTXN parent = txn->parent;
......@@ -322,7 +322,6 @@ toku_txn_start_txn(TOKUTXN txn) {
}
}
toku_mutex_unlock(&logger->txn_list_lock);
return 0;
}
//Used on recovery to recover a transaction.
......
......@@ -35,7 +35,7 @@ int toku_txn_begin_with_xid (
int toku_txn_create_txn(TOKUTXN *txn_ptr, TOKUTXN parent, TOKULOGGER logger, TXNID xid, TXN_SNAPSHOT_TYPE snapshot_type, DB_TXN *container_db_txn);
// Assign a txnid. Log the txn begin in the recovery log. Initialize the txn live lists.
int toku_txn_start_txn(TOKUTXN txn);
void toku_txn_start_txn(TOKUTXN txn);
int toku_txn_load_txninfo (TOKUTXN txn, TXNINFO info);
......
......@@ -489,13 +489,13 @@ toku_txn_begin(DB_ENV *env, DB_TXN * stxn, DB_TXN ** txn, u_int32_t flags, bool
);
if (r != 0)
return r;
if (!holds_ydb_lock)
if (!holds_ydb_lock) {
toku_ydb_lock();
r = toku_txn_start_txn(db_txn_struct_i(result)->tokutxn);
if (!holds_ydb_lock)
}
toku_txn_start_txn(db_txn_struct_i(result)->tokutxn);
if (!holds_ydb_lock) {
toku_ydb_unlock();
if (r != 0)
return r;
}
//Add to the list of children for the parent.
if (result->parent) {
......
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