From 4c6831937045307fc9e2a368a84bef8c5d838e5f Mon Sep 17 00:00:00 2001 From: antirez Date: Fri, 4 Jul 2014 11:51:30 +0200 Subject: [PATCH] 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. --- src/aof.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aof.c b/src/aof.c index bf83761f..34688766 100644 --- a/src/aof.c +++ b/src/aof.c @@ -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