Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
eddf5deb
Commit
eddf5deb
authored
Feb 13, 2018
by
antirez
Browse files
More verbose logging when slave sends errors to master.
See #3832.
parent
c09cc0a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/networking.c
View file @
eddf5deb
...
@@ -376,8 +376,12 @@ void addReplyErrorLength(client *c, const char *s, size_t len) {
...
@@ -376,8 +376,12 @@ void addReplyErrorLength(client *c, const char *s, size_t len) {
addReplyString
(
c
,
"-ERR "
,
5
);
addReplyString
(
c
,
"-ERR "
,
5
);
addReplyString
(
c
,
s
,
len
);
addReplyString
(
c
,
s
,
len
);
addReplyString
(
c
,
"
\r\n
"
,
2
);
addReplyString
(
c
,
"
\r\n
"
,
2
);
if
(
c
->
flags
&
CLIENT_MASTER
)
if
(
c
->
flags
&
CLIENT_MASTER
)
{
serverLog
(
LL_WARNING
,
"Error sent to master: %s"
,
s
);
char
*
cmdname
=
c
->
lastcmd
?
c
->
lastcmd
->
name
:
"<unknown>"
;
serverLog
(
LL_WARNING
,
"== CRITICAL == This slave is sending an error "
"to its master: '%s' after processing the command "
"'%s'"
,
s
,
cmdname
);
}
}
}
void
addReplyError
(
client
*
c
,
const
char
*
err
)
{
void
addReplyError
(
client
*
c
,
const
char
*
err
)
{
...
...
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