From 54fb01e24a6725c3d8832cdd5a440c015df89d5e Mon Sep 17 00:00:00 2001 From: John Sully Date: Wed, 24 Mar 2021 20:13:42 +0000 Subject: [PATCH] Don't run code in evict unless we really have to Former-commit-id: b665b1c2b2df96883a6e2237f7bf3f9b1bec2a89 --- src/evict.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/evict.cpp b/src/evict.cpp index 31cadeae5..887b100b9 100644 --- a/src/evict.cpp +++ b/src/evict.cpp @@ -587,7 +587,7 @@ int freeMemoryIfNeeded(bool fQuickCycle, bool fPreSnapshot) { /* volatile-random and allkeys-random policy */ if (g_pserver->maxmemory_policy == MAXMEMORY_ALLKEYS_RANDOM || g_pserver->maxmemory_policy == MAXMEMORY_VOLATILE_RANDOM - || fEvictToStorage) + || fFallback) { /* When evicting a random key, we try to evict a key for * each DB, so we use the static 'next_db' variable to