提交 4c683193 编写于 作者: A antirez

Use fsync instead of aof_fsync in final AOF sync.

This happens in the child process so we don't care about latency:
better to sync metadata as well.
上级 f3eab7a9
......@@ -990,7 +990,7 @@ int rewriteAppendOnlyFile(char *filename) {
/* Make sure data will not remain on the OS's output buffers */
if (fflush(fp) == EOF) goto werr;
if (aof_fsync(fileno(fp)) == -1) goto werr;
if (fsync(fileno(fp)) == -1) goto werr;
if (fclose(fp) == EOF) goto werr;
/* Use RENAME to make sure the DB file is changed atomically only
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册