mirror of
https://github.com/MariaDB/server.git
synced 2025-02-01 19:41:47 +01:00
closes #5783, rename txn->recovered_from_checkpoint to txn->for_recovery
git-svn-id: file:///svn/toku/tokudb@51081 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
67eb050b40
commit
b43de53fd3
4 changed files with 14 additions and 14 deletions
|
@ -3168,7 +3168,7 @@ void toku_ft_maybe_insert (FT_HANDLE ft_h, DBT *key, DBT *val, TOKUTXN txn, bool
|
|||
// do nothing
|
||||
} else {
|
||||
TXNID oldest_referenced_xid = (txn) ? txn->oldest_referenced_xid : TXNID_NONE;
|
||||
toku_ft_send_insert(ft_h, key, val, message_xids, type, oldest_referenced_xid, make_gc_info(!txn->recovered_from_checkpoint));
|
||||
toku_ft_send_insert(ft_h, key, val, message_xids, type, oldest_referenced_xid, make_gc_info(!txn->for_recovery));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3179,7 +3179,7 @@ ft_send_update_msg(FT_HANDLE brt, FT_MSG_S *msg, TOKUTXN txn) {
|
|||
: xids_get_root_xids());
|
||||
|
||||
TXNID oldest_referenced_xid = (txn) ? txn->oldest_referenced_xid : TXNID_NONE;
|
||||
toku_ft_root_put_cmd(brt->ft, msg, oldest_referenced_xid, make_gc_info(!txn->recovered_from_checkpoint));
|
||||
toku_ft_root_put_cmd(brt->ft, msg, oldest_referenced_xid, make_gc_info(!txn->for_recovery));
|
||||
}
|
||||
|
||||
void toku_ft_maybe_update(FT_HANDLE ft_h, const DBT *key, const DBT *update_function_extra,
|
||||
|
@ -3313,7 +3313,7 @@ void toku_ft_maybe_delete(FT_HANDLE ft_h, DBT *key, TOKUTXN txn, bool oplsn_vali
|
|||
// do nothing
|
||||
} else {
|
||||
TXNID oldest_referenced_xid = (txn) ? txn->oldest_referenced_xid : TXNID_NONE;
|
||||
toku_ft_send_delete(ft_h, key, message_xids, oldest_referenced_xid, make_gc_info(!txn->recovered_from_checkpoint));
|
||||
toku_ft_send_delete(ft_h, key, message_xids, oldest_referenced_xid, make_gc_info(!txn->for_recovery));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -143,7 +143,7 @@ struct tokutxn {
|
|||
const uint64_t ancestor_txnid64; // this is the lsn of root transaction
|
||||
const uint64_t snapshot_txnid64; // this is the lsn of the snapshot
|
||||
const TXN_SNAPSHOT_TYPE snapshot_type;
|
||||
const bool recovered_from_checkpoint;
|
||||
const bool for_recovery;
|
||||
const TOKULOGGER logger;
|
||||
const TOKUTXN parent;
|
||||
// These don't either but they're created in a way that's hard to make
|
||||
|
|
16
ft/roll.cc
16
ft/roll.cc
|
@ -43,7 +43,7 @@ toku_commit_fdelete (FILENUM filenum,
|
|||
// is not an error, but a missing file outside of recovery is.
|
||||
r = toku_cachefile_of_filenum(ct, filenum, &cf);
|
||||
if (r == ENOENT) {
|
||||
assert(txn->recovered_from_checkpoint);
|
||||
assert(txn->for_recovery);
|
||||
r = 0;
|
||||
goto done;
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ toku_rollback_fcreate (FILENUM filenum,
|
|||
// is not an error, but a missing file outside of recovery is.
|
||||
r = toku_cachefile_of_filenum(ct, filenum, &cf);
|
||||
if (r == ENOENT) {
|
||||
assert(txn->recovered_from_checkpoint);
|
||||
assert(txn->for_recovery);
|
||||
r = 0;
|
||||
goto done;
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ static int do_insertion (enum ft_msg_type type, FILENUM filenum, BYTESTRING key,
|
|||
h = NULL;
|
||||
r = txn->open_fts.find_zero<FILENUM, find_ft_from_filenum>(filenum, &h, NULL);
|
||||
if (r == DB_NOTFOUND) {
|
||||
assert(txn->recovered_from_checkpoint);
|
||||
assert(txn->for_recovery);
|
||||
r = 0;
|
||||
goto done;
|
||||
}
|
||||
|
@ -177,7 +177,7 @@ static int do_insertion (enum ft_msg_type type, FILENUM filenum, BYTESTRING key,
|
|||
? toku_fill_dbt(&data_dbt, data->data, data->len)
|
||||
: toku_init_dbt(&data_dbt) } } };
|
||||
|
||||
toku_ft_root_put_cmd(h, &ftcmd, txn->oldest_referenced_xid, make_gc_info(!txn->recovered_from_checkpoint));
|
||||
toku_ft_root_put_cmd(h, &ftcmd, txn->oldest_referenced_xid, make_gc_info(!txn->for_recovery));
|
||||
if (reset_root_xid_that_created) {
|
||||
TXNID new_root_xid_that_created = xids_get_outermost_xid(xids);
|
||||
toku_reset_root_xid_that_created(h, new_root_xid_that_created);
|
||||
|
@ -385,7 +385,7 @@ toku_commit_load (FILENUM old_filenum,
|
|||
// is not an error, but a missing file outside of recovery is.
|
||||
r = toku_cachefile_of_filenum(ct, old_filenum, &old_cf);
|
||||
if (r == ENOENT) {
|
||||
invariant(txn->recovered_from_checkpoint);
|
||||
invariant(txn->for_recovery);
|
||||
r = 0;
|
||||
goto done;
|
||||
}
|
||||
|
@ -469,7 +469,7 @@ toku_commit_dictionary_redirect (FILENUM UU(old_filenum),
|
|||
LSN UU(oplsn)) //oplsn is the lsn of the commit
|
||||
{
|
||||
//Redirect only has meaning during normal operation (NOT during recovery).
|
||||
if (!txn->recovered_from_checkpoint) {
|
||||
if (!txn->for_recovery) {
|
||||
//NO-OP
|
||||
}
|
||||
return 0;
|
||||
|
@ -483,7 +483,7 @@ toku_rollback_dictionary_redirect (FILENUM old_filenum,
|
|||
{
|
||||
int r = 0;
|
||||
//Redirect only has meaning during normal operation (NOT during recovery).
|
||||
if (!txn->recovered_from_checkpoint) {
|
||||
if (!txn->for_recovery) {
|
||||
CACHEFILE new_cf = NULL;
|
||||
r = toku_cachefile_of_filenum(txn->logger->ct, new_filenum, &new_cf);
|
||||
assert(r == 0);
|
||||
|
@ -520,7 +520,7 @@ toku_rollback_change_fdescriptor(FILENUM filenum,
|
|||
int r;
|
||||
r = toku_cachefile_of_filenum(txn->logger->ct, filenum, &cf);
|
||||
if (r == ENOENT) { //Missing file on recovered transaction is not an error
|
||||
assert(txn->recovered_from_checkpoint);
|
||||
assert(txn->for_recovery);
|
||||
r = 0;
|
||||
goto done;
|
||||
}
|
||||
|
|
|
@ -118,7 +118,7 @@ void toku_txn_create_txn (
|
|||
TXN_SNAPSHOT_TYPE snapshot_type,
|
||||
DB_TXN *container_db_txn,
|
||||
XIDS xids,
|
||||
bool for_checkpoint
|
||||
bool for_recovery
|
||||
)
|
||||
{
|
||||
assert(logger->rollback_cachefile);
|
||||
|
@ -144,7 +144,7 @@ void toku_txn_create_txn (
|
|||
.ancestor_txnid64 = TXNID_NONE,
|
||||
.snapshot_txnid64 = TXNID_NONE,
|
||||
.snapshot_type = snapshot_type,
|
||||
.recovered_from_checkpoint = for_checkpoint,
|
||||
.for_recovery = for_recovery,
|
||||
.logger = logger,
|
||||
.parent = parent_tokutxn,
|
||||
.container_db_txn = container_db_txn,
|
||||
|
|
Loading…
Add table
Reference in a new issue