summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2020-03-31 17:10:09 +0200
committerantirez <antirez@gmail.com>2020-03-31 17:10:09 +0200
commit1d13ff0b397797b34973b4c33b0fd60e8ca4bccc (patch)
tree4dd58028292a2c55b808389a29b35e51fde70523
parent0c52ce6c8eefc2c891a81aa7d30061dc20bcfaeb (diff)
downloadredis-1d13ff0b397797b34973b4c33b0fd60e8ca4bccc.tar.gz
Minor changes to #7037.
-rw-r--r--src/networking.c17
-rw-r--r--src/server.c2
2 files changed, 14 insertions, 5 deletions
diff --git a/src/networking.c b/src/networking.c
index fcaa164a9..3c754c376 100644
--- a/src/networking.c
+++ b/src/networking.c
@@ -374,10 +374,19 @@ void addReplyErrorLength(client *c, const char *s, size_t len) {
* they are rare and may hint at errors in a script or a bug in Redis. */
int ctype = getClientType(c);
if (ctype == CLIENT_TYPE_MASTER || ctype == CLIENT_TYPE_SLAVE || c->id == CLIENT_ID_AOF) {
- char* to = c->id == CLIENT_ID_AOF ? "AOF-client" :
- ctype == CLIENT_TYPE_MASTER ? "master" : "replica";
- char* from = c->id == CLIENT_ID_AOF ? "server" :
- ctype == CLIENT_TYPE_MASTER ? "replica" : "master";
+ char *to, *from;
+
+ if (c->id == CLIENT_ID_AOF) {
+ to = "AOF-loading-client";
+ from = "server";
+ } else if (ctype == CLIENT_TYPE_MASTER) {
+ to = "master";
+ from = "replica";
+ } else {
+ to = "replica";
+ from = "master";
+ }
+
char *cmdname = c->lastcmd ? c->lastcmd->name : "<unknown>";
serverLog(LL_WARNING,"== CRITICAL == This %s is sending an error "
"to its %s: '%s' after processing the command "
diff --git a/src/server.c b/src/server.c
index 6f1913e4d..4fdbf30ec 100644
--- a/src/server.c
+++ b/src/server.c
@@ -3976,7 +3976,7 @@ sds genRedisInfoString(const char *section) {
"client_recent_max_output_buffer:%zu\r\n"
"blocked_clients:%d\r\n"
"tracking_clients:%d\r\n"
- "clients_in_timeout_table:%ld\r\n",
+ "clients_in_timeout_table:%llu\r\n",
listLength(server.clients)-listLength(server.slaves),
maxin, maxout,
server.blocked_clients,