Commit f3dcb78e authored by Rik Prohaska's avatar Rik Prohaska

DB-817 add a txn method to get the child of the txn if any

parent ab9d79bc
......@@ -586,6 +586,7 @@ static void print_db_txn_struct (void) {
"void (*set_client_id)(DB_TXN *, uint64_t client_id)",
"uint64_t (*get_client_id)(DB_TXN *)",
"bool (*is_prepared)(DB_TXN *)",
"DB_TXN *(*get_child)(DB_TXN *)",
NULL};
sort_and_dump_fields("db_txn", false, extra);
}
......
......@@ -428,6 +428,10 @@ static bool toku_txn_is_prepared(DB_TXN *txn) {
return toku_txn_get_state(ttxn) == TOKUTXN_PREPARING;
}
static DB_TXN *toku_txn_get_child(DB_TXN *txn) {
return db_txn_struct_i(txn)->child;
}
static inline void txn_func_init(DB_TXN *txn) {
#define STXN(name) txn->name = locked_txn_ ## name
STXN(abort);
......@@ -445,6 +449,7 @@ static inline void txn_func_init(DB_TXN *txn) {
#undef SUTXN
txn->id64 = toku_txn_id64;
txn->is_prepared = toku_txn_is_prepared;
txn->get_child = toku_txn_get_child;
}
//
......
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