Merge pull request #4953 from soloestoy/fix-memory-overhead

MEMORY: fix the missing of monitor clients buffers
This commit is contained in:
Salvatore Sanfilippo 2018-05-31 17:31:24 +02:00 committed by GitHub
commit 5bf08449f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -968,7 +968,7 @@ struct redisMemOverhead *getMemoryOverheadData(void) {
listRewind(server.clients,&li);
while((ln = listNext(&li))) {
client *c = listNodeValue(ln);
if (c->flags & CLIENT_SLAVE)
if (c->flags & CLIENT_SLAVE && !(c->flags & CLIENT_MONITOR))
continue;
mem += getClientOutputBufferMemoryUsage(c);
mem += sdsAllocSize(c->querybuf);