Commit ac7abc7f authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul Committed by Yoni Fogel

close[t:4684] Add comment. Closes #4684.

git-svn-id: file:///svn/toku/tokudb@41565 c7de825b-a66e-492c-adef-691d508d4ae1
parent 32d18a22
......@@ -503,11 +503,12 @@ int toku_txn_abort_with_lsn(TOKUTXN txn, YIELDF yield, void *yieldv, LSN oplsn,
int toku_txn_prepare_txn (TOKUTXN txn, GID gid) {
assert(txn->state==TOKUTXN_LIVE);
txn->state = TOKUTXN_PREPARING;
txn->state = TOKUTXN_PREPARING; // This state transition must be protected against begin_checkpoint. Right now it uses the ydb lock.
if (txn->parent) return 0; // nothing to do if there's a parent.
// Do we need to do an fsync?
txn->do_fsync = (txn->force_fsync_on_commit || txn->num_rollentries>0);
txn->gid.gid = toku_memdup(gid.gid, DB_GID_SIZE);
// This list will go away with #4683, so we wn't need the ydb lock for this anymore.
toku_list_push(&txn->logger->prepared_txns, &txn->prepared_txns_link);
return toku_log_xprepare(txn->logger, &txn->do_fsync_lsn, 0, txn->txnid64, gid);
}
......
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