summaryrefslogtreecommitdiff
path: root/src/networking.c
diff options
context:
space:
mode:
authorQu Chen <QuChen88@users.noreply.github.com>2021-08-08 17:34:11 -0700
committerGitHub <noreply@github.com>2021-08-08 17:34:11 -0700
commite8eeba7bee6add5286afc4d59db074a924fb9209 (patch)
tree68c71e219455df4e8adc0789c60250a4155e108e /src/networking.c
parent3307958bd0fe25d79f48f81f9c4712f920d4956a (diff)
downloadredis-e8eeba7bee6add5286afc4d59db074a924fb9209.tar.gz
Allow master to replicate command longer than replica's query buffer limit (#9340)
Replication client no longer checks incoming command length against the client-query-buffer-limit. This makes the master able to replicate commands longer than replica's configured client-query-buffer-limit
Diffstat (limited to 'src/networking.c')
-rw-r--r--src/networking.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/networking.c b/src/networking.c
index ff14a5a32..9753e3f61 100644
--- a/src/networking.c
+++ b/src/networking.c
@@ -2196,7 +2196,7 @@ void readQueryFromClient(connection *conn) {
c->lastinteraction = server.unixtime;
if (c->flags & CLIENT_MASTER) c->read_reploff += nread;
atomicIncr(server.stat_net_input_bytes, nread);
- if (sdslen(c->querybuf) > server.client_max_querybuf_len) {
+ if (!(c->flags & CLIENT_MASTER) && sdslen(c->querybuf) > server.client_max_querybuf_len) {
sds ci = catClientInfoString(sdsempty(),c), bytes = sdsempty();
bytes = sdscatrepr(bytes,c->querybuf,64);