From fcd92f10dd00a0fde844fb8a46d84fa46ac45c32 Mon Sep 17 00:00:00 2001 From: Aaron Date: Fri, 4 Nov 2016 22:10:27 +1100 Subject: [PATCH] Fixes issue with master killing client connections while redis is write load. reply_bytes was being wrapped to huge values, e.g.omem=18446744073709551601 causing redis to close the connection as it thought the client buffer limit had been exceeded. See https://github.com/antirez/redis/blob/3.0/src/networking.c#L827 --- src/networking.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/networking.c b/src/networking.c index 7fc6917f665..5292caf6056 100644 --- a/src/networking.c +++ b/src/networking.c @@ -895,7 +895,7 @@ void sendReplyToClient(aeEventLoop *el, int fd, void *privdata, int mask) { } else { o = listNodeValue(ln); objlen = (int)sdslen(o->ptr); - objmem = zmalloc_size_sds(o->ptr); + objmem = getStringObjectSdsUsedMemory(o); if (objlen == 0) { listDelNode(c->reply,ln);