From e155bbc8736dc684f4f6b8a5f74b5125e3f3c7f6 Mon Sep 17 00:00:00 2001 From: John Sully Date: Wed, 22 Sep 2021 19:26:30 +0000 Subject: [PATCH] We can't evict in an async command Former-commit-id: 39c2903cbca08c2dbfc3275f83d65e6360c61651 --- src/server.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server.cpp b/src/server.cpp index 30a030052..eb50c18f5 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -4777,7 +4777,7 @@ int processCommand(client *c, int callFlags) { * the event loop since there is a busy Lua script running in timeout * condition, to avoid mixing the propagation of scripts with the * propagation of DELs due to eviction. */ - if (g_pserver->maxmemory && !g_pserver->lua_timedout) { + if (g_pserver->maxmemory && !g_pserver->lua_timedout && !(callFlags & CMD_CALL_ASYNC)) { int out_of_memory = (performEvictions(false /*fPreSnapshot*/) == EVICT_FAIL); /* freeMemoryIfNeeded may flush replica output buffers. This may result * into a replica, that may be the active client, to be freed. */