Commit 8885921d authored by Salvatore Sanfilippo's avatar Salvatore Sanfilippo Committed by GitHub
Browse files

Merge pull request #4311 from oranagra/aof_shutdown_flush

Flush append only buffers before existing.
parents 202c2ebe b122cadc
...@@ -2536,8 +2536,9 @@ int prepareForShutdown(int flags) { ...@@ -2536,8 +2536,9 @@ int prepareForShutdown(int flags) {
"There is a child rewriting the AOF. Killing it!"); "There is a child rewriting the AOF. Killing it!");
kill(server.aof_child_pid,SIGUSR1); kill(server.aof_child_pid,SIGUSR1);
} }
/* Append only file: fsync() the AOF and exit */ /* Append only file: flush buffers and fsync() the AOF at exit */
serverLog(LL_NOTICE,"Calling fsync() on the AOF file."); serverLog(LL_NOTICE,"Calling fsync() on the AOF file.");
flushAppendOnlyFile(1);
aof_fsync(server.aof_fd); aof_fsync(server.aof_fd);
} }
......
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