From da4cac6770be930fafbc87b1af7d3a0719b6b3a5 Mon Sep 17 00:00:00 2001 From: John Sully Date: Fri, 8 May 2020 00:14:55 -0400 Subject: [PATCH] Fix bug where we don't correctly process maxmemory during bgsave Former-commit-id: a0f2694d15784628df5d5ecb72b42c2979100f93 --- src/evict.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/evict.cpp b/src/evict.cpp index 1178921c4..afd42a9d9 100644 --- a/src/evict.cpp +++ b/src/evict.cpp @@ -433,7 +433,7 @@ int getMaxmemoryState(size_t *total, size_t *logical, size_t *tofree, float *lev if (fPreSnapshot) maxmemory = static_cast(maxmemory * 0.9); // derate memory by 10% since we won't be able to free during snapshot if (g_pserver->FRdbSaveInProgress()) - maxmemory *= static_cast(maxmemory*1.9); + maxmemory = static_cast(maxmemory*1.5); /* We may return ASAP if there is no need to compute the level. */ int return_ok_asap = !maxmemory || mem_reported <= maxmemory;