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)
int
toku_logger_fsync_if_lsn_not_fsynced (TOKULOGGER logger, LSN lsn) {
int r;
if (logger->is_panicked) return EINVAL;
r = ml_lock(&logger->input_lock); assert(r==0);
logger->input_lock_ctr++;
r = toku_logger_maybe_fsync(logger, lsn, TRUE);
if (r!=0) {
toku_logger_panic(logger, r);
int r = 0;
if (logger->is_panicked) r = EINVAL;
else if (logger->write_log_files) {
r = ml_lock(&logger->input_lock); assert(r==0);
logger->input_lock_ctr++;
r = toku_logger_maybe_fsync(logger, lsn, TRUE);
if (r!=0) {
toku_logger_panic(logger, 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