Commit 2ce694e9 authored by Yoni Fogel's avatar Yoni Fogel

refs #5189 xstillopen(prepared) must assert begin was logged, instead of ignoring

git-svn-id: file:///svn/toku/tokudb@45252 c7de825b-a66e-492c-adef-691d508d4ae1
parent 241958b2
......@@ -3083,7 +3083,7 @@ log_open_txn (OMTVALUE txnv, u_int32_t UU(index), void *extra) {
invariant(r==0);
switch (toku_txn_get_state(txn)) {
case TOKUTXN_LIVE:{
r = toku_log_xstillopen(logger, NULL, 0,
r = toku_log_xstillopen(logger, NULL, 0, txn,
toku_txn_get_txnid(txn),
toku_txn_get_txnid(toku_logger_txn_parent(txn)),
txn->roll_info.rollentry_raw_count,
......@@ -3100,7 +3100,7 @@ log_open_txn (OMTVALUE txnv, u_int32_t UU(index), void *extra) {
case TOKUTXN_PREPARING: {
TOKU_XA_XID xa_xid;
toku_txn_get_prepared_xa_xid(txn, &xa_xid);
r = toku_log_xstillopenprepared(logger, NULL, 0,
r = toku_log_xstillopenprepared(logger, NULL, 0, txn,
toku_txn_get_txnid(txn),
&xa_xid,
txn->roll_info.rollentry_raw_count,
......
......@@ -137,7 +137,10 @@ ft_log_suppress_rollback_during_checkpoint (CACHEFILE cf, void *header_v) {
//Only log if useful.
TOKULOGGER logger = toku_cachefile_logger(cf);
FILENUM filenum = toku_cachefile_filenum (cf);
r = toku_log_suppress_rollback(logger, NULL, 0, NULL, filenum, xid);
// We don't have access to the txn here, but the txn is
// necessarily already marked as non-readonly. Use NULL.
TOKUTXN txn = NULL;
r = toku_log_suppress_rollback(logger, NULL, 0, txn, filenum, xid);
}
return r;
}
......
......@@ -124,7 +124,7 @@ const struct logtype logtypes[] = {
{"BLOCKNUM", "spilled_rollback_head", 0},
{"BLOCKNUM", "spilled_rollback_tail", 0},
{"BLOCKNUM", "current_rollback", 0},
NULLFIELD}, IGNORE_LOG_BEGIN}, // record all transactions
NULLFIELD}, ASSERT_BEGIN_WAS_LOGGED}, // record all transactions
// prepared txns need a gid
{"xstillopenprepared", 'p', FA{{"TXNID", "xid", 0},
{"XIDP", "xa_xid", 0}, // prepared transactions need a gid, and have no parentxid.
......@@ -136,7 +136,7 @@ const struct logtype logtypes[] = {
{"BLOCKNUM", "spilled_rollback_head", 0},
{"BLOCKNUM", "spilled_rollback_tail", 0},
{"BLOCKNUM", "current_rollback", 0},
NULLFIELD}, IGNORE_LOG_BEGIN}, // record all transactions
NULLFIELD}, ASSERT_BEGIN_WAS_LOGGED}, // record all transactions
{"suppress_rollback", 'S', FA{{"FILENUM", "filenum", 0},
{"TXNID", "xid", 0},
NULLFIELD}, SHOULD_LOG_BEGIN},
......
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