Skip to content

Commit

Permalink
feat(conn): avoid to check the command name directly
Browse files Browse the repository at this point in the history
  • Loading branch information
PragmaTwice committed Nov 16, 2024
1 parent 185bfc6 commit a7da7ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/redis_connection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ void Connection::ExecuteCommands(std::deque<CommandTokens> *to_process_cmds) {
// that can guarantee other threads can't come into critical zone, such as DEBUG,
// CLUSTER subcommand, CONFIG SET, MULTI, LUA (in the immediate future).
// Otherwise, we just use 'ConcurrencyGuard' to allow all workers to execute commands at the same time.
if (is_multi_exec && cmd_name != "exec") {
if (is_multi_exec && !(cmd_flags & kCmdEndMulti)) {
// No lock guard, because 'exec' command has acquired 'WorkExclusivityGuard'
} else if (cmd_flags & kCmdExclusive) {
exclusivity = srv_->WorkExclusivityGuard();
Expand Down

0 comments on commit a7da7ae

Please sign in to comment.