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
30c42f12
Commit
30c42f12
authored
Jul 04, 2014
by
antirez
Browse files
Handle write failure in AOF parent -> child ACK.
parent
75ef4105
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/aof.c
View file @
30c42f12
...
...
@@ -1096,7 +1096,14 @@ void aofChildPipeReadable(aeEventLoop *el, int fd, void *privdata, int mask) {
if
(
read
(
fd
,
&
byte
,
1
)
==
1
&&
byte
==
'!'
)
{
redisLog
(
REDIS_NOTICE
,
"AOF rewrite child asks to stop sending diffs."
);
server
.
aof_stop_sending_diff
=
1
;
write
(
server
.
aof_pipe_write_ack_to_child
,
"!"
,
1
);
if
(
write
(
server
.
aof_pipe_write_ack_to_child
,
"!"
,
1
)
!=
1
)
{
/* If we can't send the ack, inform the user, but don't try again
* since in the other side the children will use a timeout if the
* kernel can't buffer our write, or, the children was
* terminated. */
redisLog
(
REDIS_WARNING
,
"Can't send ACK to AOF child: %s"
,
strerror
(
errno
));
}
}
/* Remove the handler since this can be called only one time during a
* rewrite. */
...
...
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