Loading src/ydb-internal.h +1 −0 Original line number Diff line number Diff line Loading @@ -215,6 +215,7 @@ struct __toku_db_txn_internal { TOKU_ISOLATION iso; DB_TXN *child; struct toku_list dbs_that_must_close_before_abort; toku_pthread_mutex_t txn_mutex; }; struct __toku_db_txn_external { struct __toku_db_txn external_part; Loading src/ydb_row_lock.c +2 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ static int toku_txn_add_lt(DB_TXN* txn, toku_lock_tree* lt) { int r = ENOSYS; assert(txn && lt); toku_mutex_lock(&db_txn_struct_i(txn)->txn_mutex); toku_lth* lth = db_txn_struct_i(txn)->lth; // we used to initialize the transaction's lth during begin. // Now we initialize the lth only if the transaction needs the lth, here Loading @@ -33,6 +34,7 @@ toku_txn_add_lt(DB_TXN* txn, toku_lock_tree* lt) { toku_lt_add_ref(lt); r = 0; cleanup: toku_mutex_unlock(&db_txn_struct_i(txn)->txn_mutex); return r; } Loading src/ydb_txn.c +2 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ toku_txn_destroy(DB_TXN *txn) { (void) __sync_fetch_and_sub(&txn->mgrp->i->open_txns, 1); assert(txn->mgrp->i->open_txns>=0); toku_txn_destroy_txn(db_txn_struct_i(txn)->tokutxn); toku_mutex_destroy(&db_txn_struct_i(txn)->txn_mutex); #if !TOKUDB_NATIVE_H toku_free(db_txn_struct_i(txn)); #endif Loading Loading @@ -502,6 +503,7 @@ toku_txn_begin(DB_ENV *env, DB_TXN * stxn, DB_TXN ** txn, u_int32_t flags, bool db_txn_struct_i(result->parent)->child = result; } toku_mutex_init(&db_txn_struct_i(result)->txn_mutex, NULL); (void) __sync_fetch_and_add(&env->i->open_txns, 1); *txn = result; Loading Loading
src/ydb-internal.h +1 −0 Original line number Diff line number Diff line Loading @@ -215,6 +215,7 @@ struct __toku_db_txn_internal { TOKU_ISOLATION iso; DB_TXN *child; struct toku_list dbs_that_must_close_before_abort; toku_pthread_mutex_t txn_mutex; }; struct __toku_db_txn_external { struct __toku_db_txn external_part; Loading
src/ydb_row_lock.c +2 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ static int toku_txn_add_lt(DB_TXN* txn, toku_lock_tree* lt) { int r = ENOSYS; assert(txn && lt); toku_mutex_lock(&db_txn_struct_i(txn)->txn_mutex); toku_lth* lth = db_txn_struct_i(txn)->lth; // we used to initialize the transaction's lth during begin. // Now we initialize the lth only if the transaction needs the lth, here Loading @@ -33,6 +34,7 @@ toku_txn_add_lt(DB_TXN* txn, toku_lock_tree* lt) { toku_lt_add_ref(lt); r = 0; cleanup: toku_mutex_unlock(&db_txn_struct_i(txn)->txn_mutex); return r; } Loading
src/ydb_txn.c +2 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ toku_txn_destroy(DB_TXN *txn) { (void) __sync_fetch_and_sub(&txn->mgrp->i->open_txns, 1); assert(txn->mgrp->i->open_txns>=0); toku_txn_destroy_txn(db_txn_struct_i(txn)->tokutxn); toku_mutex_destroy(&db_txn_struct_i(txn)->txn_mutex); #if !TOKUDB_NATIVE_H toku_free(db_txn_struct_i(txn)); #endif Loading Loading @@ -502,6 +503,7 @@ toku_txn_begin(DB_ENV *env, DB_TXN * stxn, DB_TXN ** txn, u_int32_t flags, bool db_txn_struct_i(result->parent)->child = result; } toku_mutex_init(&db_txn_struct_i(result)->txn_mutex, NULL); (void) __sync_fetch_and_add(&env->i->open_txns, 1); *txn = result; Loading