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


##########
src/commands/cmd_server.cc:
##########
@@ -1493,6 +1493,43 @@ class CommandSST : public Commander {
   rocksdb::IngestExternalFileOptions ingest_options_;
 };
 
+// command format: flushmemtables wait [yes|no]
+class CommandFlushMemTables : public Commander {
+  public:
+    Status Parse([[maybe_unused]] const std::vector<std::string> &args) 
override {
+      CommandParser parser(args, 1);
+
+      const std::string cmd = GET_OR_RET(parser.TakeStr());
+      if (!util::EqualICase(cmd, "wait")) {
+        return {Status::RedisParseErr, "unknown parameter: " + args[1]};
+      }
+
+      const std::string wait_option = GET_OR_RET(parser.TakeStr());
+      if (util::EqualICase(wait_option, "yes")) {
+        flush_options_.wait = true;
+      } else if (util::EqualICase(wait_option, "no")) {
+        flush_options_.wait = false;
+      } else {

Review Comment:
   We're using `sync|async` to determine whether to wait for the response or 
not. So we could keep them consistent.



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