Commit 1f01fe28 authored by Yoni Fogel's avatar Yoni Fogel

[t:2692] Restore "write_log_files" check to fsync log on checkpoints

git-svn-id: file:///svn/toku/tokudb@20884 c7de825b-a66e-492c-adef-691d508d4ae1
parent 492ee2b9
...@@ -475,13 +475,15 @@ int toku_logger_fsync (TOKULOGGER logger) ...@@ -475,13 +475,15 @@ int toku_logger_fsync (TOKULOGGER logger)
int int
toku_logger_fsync_if_lsn_not_fsynced (TOKULOGGER logger, LSN lsn) { toku_logger_fsync_if_lsn_not_fsynced (TOKULOGGER logger, LSN lsn) {
int r; int r = 0;
if (logger->is_panicked) return EINVAL; if (logger->is_panicked) r = EINVAL;
r = ml_lock(&logger->input_lock); assert(r==0); else if (logger->write_log_files) {
logger->input_lock_ctr++; r = ml_lock(&logger->input_lock); assert(r==0);
r = toku_logger_maybe_fsync(logger, lsn, TRUE); logger->input_lock_ctr++;
if (r!=0) { r = toku_logger_maybe_fsync(logger, lsn, TRUE);
toku_logger_panic(logger, r); if (r!=0) {
toku_logger_panic(logger, r);
}
} }
return r; return r;
} }
......
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