Commit 05fe2780 authored by Barry Perlman's avatar Barry Perlman Committed by Yoni Fogel

[t:4067] Closes #4067 Reorganize roll.c code slightly so that non-thread-safe...

[t:4067] Closes #4067 Reorganize roll.c code slightly so that non-thread-safe variable (treelsn) is only read during recovery (when checkpoint thread does not exist).  This should placate drd.

git-svn-id: file:///svn/toku/tokudb@35949 c7de825b-a66e-492c-adef-691d508d4ae1
parent 432e1edb
......@@ -158,12 +158,13 @@ static int do_insertion (enum brt_msg_type type, FILENUM filenum, BYTESTRING key
assert(r==0);
BRT brt = brtv;
// This is only for recovery. oplsn is nonzero only for recovery
LSN treelsn = toku_brt_checkpoint_lsn(brt);
if (oplsn.lsn != 0 && oplsn.lsn <= treelsn.lsn) {
r = 0;
goto cleanup;
}
if (oplsn.lsn != 0) { // if we are executing the recovery algorithm
LSN treelsn = toku_brt_checkpoint_lsn(brt);
if (oplsn.lsn <= treelsn.lsn) { // if operation was already applied to tree ...
r = 0; // ... do not apply it again.
goto cleanup;
}
}
DBT key_dbt,data_dbt;
XIDS xids = toku_txn_get_xids(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