Skip to content

Commit 4d0ac1b

Browse files
author
wuxianrong
committed
Divide the auth command into the command thread pool in pipeling mode
1 parent 0379392 commit 4d0ac1b

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/pika_client_conn.cc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,13 @@ void PikaClientConn::ProcessRedisCmds(const std::vector<net::RedisCmdArgsType>&
306306
pstd::StringToLower(opt);
307307
bool is_slow_cmd = g_pika_conf->is_slow_cmd(opt);
308308
bool is_admin_cmd = g_pika_conf->is_admin_cmd(opt);
309-
309+
310+
// Special handling for auth command in pipeline
311+
if (is_admin_cmd && opt == kCmdNameAuth && argvs.size() > 1) {
312+
// This is a pipeline with auth as first command
313+
// Force it to use client processor pool
314+
is_admin_cmd = false;
315+
}
310316
// we don't intercept pipeline batch (argvs.size() > 1)
311317
if (g_pika_conf->rtc_cache_read_enabled() && argvs.size() == 1 && IsInterceptedByRTC(opt) &&
312318
PIKA_CACHE_NONE != g_pika_conf->cache_mode() && !IsInTxn()) {

0 commit comments

Comments
 (0)