From aaff167eb9f62e0fcf98d69e0efe80a85556d6eb Mon Sep 17 00:00:00 2001 From: John Sully Date: Sun, 24 May 2020 01:53:43 -0400 Subject: [PATCH] race calculating client overhead Former-commit-id: 2d27c8ecdb5242284301f135b1d542f9ead5b8f2 --- src/evict.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/evict.cpp b/src/evict.cpp index ffd241446..23d873975 100644 --- a/src/evict.cpp +++ b/src/evict.cpp @@ -33,6 +33,7 @@ #include "server.h" #include "bio.h" #include "atomicvar.h" +#include /* ---------------------------------------------------------------------------- * Data structures @@ -375,6 +376,7 @@ size_t freeMemoryGetNotCountedMemory(void) { listRewind(g_pserver->slaves,&li); while((ln = listNext(&li))) { client *replica = (client*)listNodeValue(ln); + std::unique_lock(replica->lock); overhead += getClientOutputBufferMemoryUsage(replica); } }