Paragrf commented on code in PR #3378:
URL: https://github.com/apache/kvrocks/pull/3378#discussion_r2881975539
##########
src/server/redis_connection.cc:
##########
@@ -451,6 +467,13 @@ void Connection::ExecuteCommands(std::deque<CommandTokens>
*to_process_cmds) {
}
auto cmd_flags = attributes->GenerateFlags(cmd_tokens, *config);
+
+ // Push the command back and stop processing; it will be re-executed after
unpause.
+ if (srv_->PauseConnIfNeeded(this, cmd_name, cmd_flags)) {
+ to_process_cmds->push_front(std::move(cmd_tokens));
Review Comment:
At line 413, to_process_cmds->pop_front() removes the head element.
Re-inserting it at the front after the check ensures the original execution
sequence is preserved. Note that "back" in the comment implies restoring the
command to the list.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]