Commit ac6de571 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 e2ebbb1f
...@@ -216,9 +216,17 @@ int toku_logger_commit (TOKUTXN txn, int nosync) { ...@@ -216,9 +216,17 @@ int toku_logger_commit (TOKUTXN txn, int nosync) {
// panic handled in log_commit // panic handled in log_commit
int r = toku_log_commit(txn->logger, txn->txnid64); int r = toku_log_commit(txn->logger, txn->txnid64);
if (r!=0) goto free_and_return; if (r!=0) goto free_and_return;
if (txn->parent && !nosync) { if (txn->parent==0) {
r = toku_logger_fsync(txn->logger); if (!nosync) {
if (r!=0) toku_logger_panic(txn->logger, r); 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*/; free_and_return: /*nothing*/;
struct log_entry *item; 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