PragmaTwice commented on code in PR #2943:
URL: https://github.com/apache/kvrocks/pull/2943#discussion_r2078797436


##########
src/commands/cmd_server.cc:
##########
@@ -497,15 +508,26 @@ class CommandClient : public Commander {
           *output = redis::RESP_OK;
       }
       return Status::OK();
+    } else if (subcommand_ == "reply") {
+      if (reply_mode_arg_ == "on") {
+        conn->SetReplyMode(Connection::ReplyMode::ON);
+      } else if (reply_mode_arg_ == "off") {
+        conn->SetReplyMode(Connection::ReplyMode::OFF);
+      } else if (reply_mode_arg_ == "skip") {
+        conn->SetReplyMode(Connection::ReplyMode::SKIP_ONCE_PENDING);
+      }
+      *output = redis::RESP_OK;
+      return Status::OK();
     }
 
-    return {Status::RedisInvalidCmd, "Syntax error, try CLIENT LIST|INFO|KILL 
ip:port|GETNAME|SETNAME"};
+    return {Status::RedisInvalidCmd, "Syntax error, try CLIENT LIST|INFO|KILL 
ip:port|GETNAME|SETNAME|REPLY"};
   }
 
  private:
   std::string addr_;
   std::string conn_name_;
   std::string subcommand_;
+  std::string reply_mode_arg_;

Review Comment:
   maybe we can parse it in `Parse()` and store a `ReplyMode reply_mode_` here?



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