From c1cba7f486c9a68ee3cd070c59266bc96a3623a7 Mon Sep 17 00:00:00 2001 From: gloomy-7164 Date: Tue, 16 Apr 2024 23:39:22 -0700 Subject: [PATCH] Fix blocking evictions when flash is enabled --- src/evict.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/evict.cpp b/src/evict.cpp index 432b807d6..261434a99 100644 --- a/src/evict.cpp +++ b/src/evict.cpp @@ -454,10 +454,6 @@ int getMaxmemoryState(size_t *total, size_t *logical, size_t *tofree, float *lev /* Compute how much memory we need to free. */ mem_tofree = mem_used - maxmemory; - if (g_pserver->m_pstorageFactory && !fQuickCycle) - { - mem_tofree += static_cast(maxmemory * 0.05); // if we have a storage provider be much more aggressive - } if (logical) *logical = mem_used; if (tofree) *tofree = mem_tofree; @@ -893,7 +889,7 @@ int performEvictions(bool fPreSnapshot) { /* After some time, exit the loop early - even if memory limit * hasn't been reached. If we suddenly need to free a lot of * memory, don't want to spend too much time here. */ - if (g_pserver->m_pstorageFactory == nullptr && elapsedUs(evictionTimer) > eviction_time_limit_us) { + if (elapsedUs(evictionTimer) > eviction_time_limit_us) { // We still need to free memory - start eviction timer proc if (!isEvictionProcRunning && serverTL->el != nullptr) { isEvictionProcRunning = 1;