No need to flush logs before commit point if we flush after each write.

Also document that logs are flushed before sending a commit point
even when flushing is disabled.
This commit is contained in:
Todd C. Miller
2021-10-16 07:58:44 -06:00
parent a554629d84
commit 15b4427b9a
3 changed files with 10 additions and 3 deletions

View File

@@ -1164,7 +1164,10 @@ server_commit_cb(int unused, int what, void *v)
commit_point.tv_nsec = closure->elapsed_time.tv_nsec;
if (!schedule_commit_point(&commit_point, closure))
connection_close(closure);
iolog_flush_all(closure);
/* Flush I/O logs before sending commit point if needed. */
if (!iolog_get_flush())
iolog_flush_all(closure);
debug_return;
}