From e4cf5f442aca94e200fbbc3d04490c0087f4ff85 Mon Sep 17 00:00:00 2001 From: John Sully Date: Wed, 2 Jun 2021 02:10:00 +0000 Subject: [PATCH] Fix merge issue with wrong return type Former-commit-id: 1640a2fefb8f09c7b6b335838f14a7fd3a51ae88 --- src/evict.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/evict.cpp b/src/evict.cpp index e3474d733..009713d73 100644 --- a/src/evict.cpp +++ b/src/evict.cpp @@ -777,11 +777,11 @@ cant_free: if (g_pserver->m_pstorageFactory) { if (mem_reported < g_pserver->maxmemory*1.2) { - return C_OK; // Allow us to temporarily go over without OOMing + return EVICT_OK; // Allow us to temporarily go over without OOMing } } - if (!cserver.delete_on_evict && result != C_OK) + if (!cserver.delete_on_evict && result == EVICT_FAIL) { for (int idb = 0; idb < cserver.dbnum; ++idb) { @@ -791,7 +791,7 @@ cant_free: serverLog(LL_WARNING, "Failed to evict keys, falling back to flushing entire cache. Consider increasing maxmemory-samples."); db->removeAllCachedValues(); if (((mem_reported - zmalloc_used_memory()) + mem_freed) >= mem_tofree) - result = C_OK; + result = EVICT_OK; } } }