Commit 1d9a0313 authored by Yoni Fogel's avatar Yoni Fogel

Addresses #1079

Final changes to make DB_TXN->parent public.

git-svn-id: file:///svn/tokudb@5619 c7de825b-a66e-492c-adef-691d508d4ae1
parent 7c124bce
......@@ -73,7 +73,6 @@ struct __toku_db_txn_internal {
//TXNID txnid64; /* A sixty-four bit txn id. */
TOKUTXN tokutxn;
toku_lth* lth;
DB_TXN *parent;
};
struct __toku_dbc_internal {
......
......@@ -1028,13 +1028,13 @@ static int toku_txn_begin(DB_ENV *env, DB_TXN * stxn, DB_TXN ** txn, u_int32_t f
result->abort = locked_txn_abort;
result->commit = locked_txn_commit;
result->id = locked_txn_id;
result->parent = stxn;
MALLOC(result->i);
if (!result->i) {
toku_free(result);
return ENOMEM;
}
memset(result->i, 0, sizeof *result->i);
result->i->parent = stxn;
int r;
if (env->i->open_flags & DB_INIT_LOCK) {
......@@ -1236,7 +1236,7 @@ static inline void toku_swap_flag(u_int32_t* flag, u_int32_t* get_flag,
a node has two non-completed txns at any time.
*/
static inline DB_TXN* toku_txn_ancestor(DB_TXN* txn) {
while (txn && txn->i->parent) txn = txn->i->parent;
while (txn && txn->parent) txn = txn->parent;
return txn;
}
......
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