We can't do a command async if there are monitors because we need the lock

Former-commit-id: c5b6ade51251a3f57b69d1f3d9c22b199ec00a69
This commit is contained in:
John Sully 2021-09-22 19:24:39 +00:00
parent 19175ed885
commit 4cd25093a4

View File

@ -2712,7 +2712,7 @@ void readQueryFromClient(connection *conn) {
if (cserver.cthreads > 1) { if (cserver.cthreads > 1) {
parseClientCommandBuffer(c); parseClientCommandBuffer(c);
if (g_pserver->enable_async_commands && (aeLockContention() || g_fTestMode)) if (g_pserver->enable_async_commands && listLength(g_pserver->monitors) == 0 && (aeLockContention() || g_fTestMode))
processInputBuffer(c, false, CMD_CALL_SLOWLOG | CMD_CALL_STATS | CMD_CALL_ASYNC); processInputBuffer(c, false, CMD_CALL_SLOWLOG | CMD_CALL_STATS | CMD_CALL_ASYNC);
if (!c->vecqueuedcmd.empty()) if (!c->vecqueuedcmd.empty())
serverTL->vecclientsProcess.push_back(c); serverTL->vecclientsProcess.push_back(c);