summaryrefslogtreecommitdiff
path: root/src/aof.c
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2013-04-24 10:57:07 +0200
committerantirez <antirez@gmail.com>2013-04-24 10:57:07 +0200
commitd264122f6af7082755efa624e36ad199851d1c7f (patch)
tree326950000dc05621ae048b9d0b665be008764afe /src/aof.c
parent336d722fbaa6beb3ef65a7a7df8bbda73dcc9fe9 (diff)
downloadredis-d264122f6af7082755efa624e36ad199851d1c7f.tar.gz
Config option to turn AOF rewrite incremental fsync on/off.
Diffstat (limited to 'src/aof.c')
-rw-r--r--src/aof.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/aof.c b/src/aof.c
index ac50d572d..56a985e72 100644
--- a/src/aof.c
+++ b/src/aof.c
@@ -855,7 +855,8 @@ int rewriteAppendOnlyFile(char *filename) {
}
rioInitWithFile(&aof,fp);
- rioSetAutoSync(&aof,REDIS_AOF_AUTOSYNC_BYTES);
+ if (server.aof_rewrite_incremental_fsync)
+ rioSetAutoSync(&aof,REDIS_AOF_AUTOSYNC_BYTES);
for (j = 0; j < server.dbnum; j++) {
char selectcmd[] = "*2\r\n$6\r\nSELECT\r\n";
redisDb *db = server.db+j;