mirror of
https://github.com/fluencelabs/redis
synced 2025-03-18 16:40:50 +00:00
Cluster: fsync data when saving the cluster config.
This commit is contained in:
parent
026e63392e
commit
03ca903983
@ -231,6 +231,7 @@ int clusterSaveConfig(void) {
|
||||
if ((fd = open(server.cluster_configfile,O_WRONLY|O_CREAT|O_TRUNC,0644))
|
||||
== -1) goto err;
|
||||
if (write(fd,ci,sdslen(ci)) != (ssize_t)sdslen(ci)) goto err;
|
||||
fsync(fd);
|
||||
close(fd);
|
||||
sdsfree(ci);
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user