Commit 2cbb1dba authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul

On sync, if there is a parent, put the rollback info into the parent. Addresses #27.

git-svn-id: file:///svn/tokudb@2200 c7de825b-a66e-492c-adef-691d508d4ae1
parent d9f3060f
......@@ -216,9 +216,17 @@ int toku_logger_commit (TOKUTXN txn, int nosync) {
// panic handled in log_commit
int r = toku_log_commit(txn->logger, txn->txnid64);
if (r!=0) goto free_and_return;
if (txn->parent && !nosync) {
r = toku_logger_fsync(txn->logger);
if (r!=0) toku_logger_panic(txn->logger, r);
if (txn->parent==0) {
if (!nosync) {
r = toku_logger_fsync(txn->logger);
if (r!=0) toku_logger_panic(txn->logger, r);
}
goto free_and_return;
} else {
if (txn->parent->oldest_logentry) txn->parent->newest_logentry->next = txn->oldest_logentry;
else txn->parent->oldest_logentry = txn->oldest_logentry;
if (txn->newest_logentry) txn->parent->newest_logentry = txn->newest_logentry;
txn->newest_logentry = txn->oldest_logentry = 0;
}
free_and_return: /*nothing*/;
struct log_entry *item;
......
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