summaryrefslogtreecommitdiff
path: root/src/aof.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/aof.c')
-rw-r--r--src/aof.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/aof.c b/src/aof.c
index 823759f24..55d9990bc 100644
--- a/src/aof.c
+++ b/src/aof.c
@@ -572,6 +572,16 @@ int writeAofManifestFile(sds buf) {
tmp_am_name, am_name, strerror(errno));
ret = C_ERR;
+ goto cleanup;
+ }
+
+ /* Also sync the AOF directory as new AOF files may be added in the directory */
+ if (fsyncFileDir(am_filepath) == -1) {
+ serverLog(LL_WARNING, "Fail to fsync AOF directory %s: %s.",
+ am_filepath, strerror(errno));
+
+ ret = C_ERR;
+ goto cleanup;
}
cleanup: