Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
03ca9039
Commit
03ca9039
authored
Sep 30, 2013
by
antirez
Browse files
Cluster: fsync data when saving the cluster config.
parent
026e6339
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
03ca9039
...
@@ -231,6 +231,7 @@ int clusterSaveConfig(void) {
...
@@ -231,6 +231,7 @@ int clusterSaveConfig(void) {
if
((
fd
=
open
(
server
.
cluster_configfile
,
O_WRONLY
|
O_CREAT
|
O_TRUNC
,
0644
))
if
((
fd
=
open
(
server
.
cluster_configfile
,
O_WRONLY
|
O_CREAT
|
O_TRUNC
,
0644
))
==
-
1
)
goto
err
;
==
-
1
)
goto
err
;
if
(
write
(
fd
,
ci
,
sdslen
(
ci
))
!=
(
ssize_t
)
sdslen
(
ci
))
goto
err
;
if
(
write
(
fd
,
ci
,
sdslen
(
ci
))
!=
(
ssize_t
)
sdslen
(
ci
))
goto
err
;
fsync
(
fd
);
close
(
fd
);
close
(
fd
);
sdsfree
(
ci
);
sdsfree
(
ci
);
return
0
;
return
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment