Improve low load latency

Former-commit-id: f5ac2432cf58c697a6da101d63423679cbd08021
This commit is contained in:
John Sully 2021-09-21 21:15:21 +00:00
parent af1c51dc53
commit 9c48bfbca1

View File

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