Don't run code in evict unless we really have to
Former-commit-id: b665b1c2b2df96883a6e2237f7bf3f9b1bec2a89
This commit is contained in:
parent
fa244c930e
commit
54fb01e24a
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user