sryanyuan commented on code in PR #3378:
URL: https://github.com/apache/kvrocks/pull/3378#discussion_r2882352985


##########
src/commands/cmd_server.cc:
##########
@@ -611,9 +639,24 @@ class CommandClient : public Commander {
         *output = redis::RESP_OK;
       }
       return Status::OK();
+    } else if (subcommand_ == "pause") {
+      if (!conn->IsAdmin()) {
+        return {Status::RedisExecErr, errAdminPermissionRequired};
+      }
+      uint64_t now_ms = util::GetTimeStampMS();
+      srv->PauseConns(now_ms + pause_timeout_ms_, pause_mode_);
+      *output = redis::RESP_OK;

Review Comment:
   I’d suggest adding a warning-level log when CLIENT PAUSE is executed, given 
it’s a critical command. Including contextual details (e.g., the client’s IP 
address) would help with auditing and security. What do you think?



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