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


##########
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:
   @furkan-bilgin Yes, what I mean is that the client should be pending once it 
occurred the WRITE command. However, the current implementation will let READ 
commands go through. 
[Redis](https://github.com/redis/redis/blob/3264deb24e3b01ad7b2777bc68b9d91f0f41aa3b/src/server.c#L4186)
 will pause the client once found the WRITE command.



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