git-hulk commented on code in PR #2495:
URL: https://github.com/apache/kvrocks/pull/2495#discussion_r1720990717


##########
src/server/redis_connection.cc:
##########
@@ -396,6 +413,13 @@ void Connection::ExecuteCommands(std::deque<CommandTokens> 
*to_process_cmds) {
     auto cmd_name = attributes->name;
     auto cmd_flags = attributes->GenerateFlags(cmd_tokens);
 
+    // Pause the processing of only the write commands, and push them back
+    // to a list that adds them back to the queue to process them when we 
unpause
+    if (srv_->GetCommandPauseType() == kPauseWrite && (cmd_flags & kCmdWrite)) 
{

Review Comment:
   I didn't check the Redis codebase, but it looks like the entire connection 
will be suspended like `PAUSE ALL` once the write command happens according to 
the documentation: https://redis.io/docs/latest/commands/client-pause/
   
   > WRITE: Clients are only blocked if they attempt to execute a write command.
   
   From the current implementation, it will let read commands go through and it 
might cause unmatched responses on the client side. 



-- 
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]

Reply via email to