furkan-bilgin commented on code in PR #2495:
URL: https://github.com/apache/kvrocks/pull/2495#discussion_r1722477455
##########
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:
[Looking at the Redis
codebase](https://github.com/redis/redis/blob/3264deb24e3b01ad7b2777bc68b9d91f0f41aa3b/src/server.c#L4186),
it seems to me that the server allows read commands to pass through when we
are in `PAUSE WRITE` mode, and `PAUSE ALL` is when we defer all. Let me know if
I got it right.
Also slaves should be kept exempt from this as per Redis, so I'll be working
on that.
--
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]