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


##########
src/commands/cmd_server.cc:
##########
@@ -826,7 +826,11 @@ class CommandScan : public CommandScanBase {
 
     ParseCursor(args[1]);
     if (args.size() >= 4) {
-      Status s = ParseMatchAndCountParam(util::ToLower(args[2]), args_[3]);
+      std::string match_flag = util::ToLower(args[2]);

Review Comment:
   https://redis.io/docs/latest/commands/scan/
   
   The third parameter from the scan command documentation can also be 
TYPE/COUNT. We can improve the `ParseMatchAndCountParam` instead of a temporary 
fix here.
   
   My initial idea is like below:
   ```
   struct ScanParameters {
     std::string Match;
     int64_t count;
     RedisType type; // only allowed in SCAN command
   }
   
   Status ParseScanParameters(const std::vector<std::string> &args, 
ScanParameters *params) {
      // ...
   }
   ```
   
   



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