From 57852ff207bbd9d1b4c2f365b8736bbbc42728b6 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 5008644a2..e2aa3b875 100644 --- a/src/aof.c +++ b/src/aof.c @@ -991,7 +991,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