We can't evict in an async command

Former-commit-id: 39c2903cbca08c2dbfc3275f83d65e6360c61651
This commit is contained in:
John Sully 2021-09-22 19:26:30 +00:00
parent 978c578433
commit e155bbc873

View File

@ -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. */