Skip to content

Commit ee37467

Browse files
Mixficsolwuxianrong
andauthored
Divide the auth command into the command thread pool in pipeling mode (OpenAtomFoundation#3098)
Co-authored-by: wuxianrong <[email protected]>
1 parent 673b847 commit ee37467

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/pika_client_conn.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,13 @@ void PikaClientConn::ProcessRedisCmds(const std::vector<net::RedisCmdArgsType>&
305305
bool is_slow_cmd = g_pika_conf->is_slow_cmd(opt);
306306
bool is_admin_cmd = g_pika_conf->is_admin_cmd(opt);
307307

308+
309+
// Special handling for auth command in pipeline
310+
if (is_admin_cmd && opt == kCmdNameAuth && argvs.size() > 1) {
311+
// This is a pipeline with auth as first command
312+
// Force it to use client processor pool
313+
is_admin_cmd = false;
314+
}
308315
// we don't intercept pipeline batch (argvs.size() > 1)
309316
if (g_pika_conf->rtc_cache_read_enabled() && argvs.size() == 1 && IsInterceptedByRTC(opt) &&
310317
PIKA_CACHE_NONE != g_pika_conf->cache_mode() && !IsInTxn()) {

0 commit comments

Comments
 (0)