baobaomaomeng commented on code in PR #2222:
URL: https://github.com/apache/kvrocks/pull/2222#discussion_r1589936573


##########
src/storage/redis_db.cc:
##########
@@ -309,10 +314,12 @@ rocksdb::Status Database::Keys(const std::string &prefix, 
std::vector<std::strin
   return rocksdb::Status::OK();
 }
 
-rocksdb::Status Database::Scan(const std::string &cursor, uint64_t limit, 
const std::string &prefix,
-                               std::vector<std::string> *keys, std::string 
*end_cursor, RedisType type) {
+rocksdb::Status Database::Scan(const std::string &cursor, uint64_t 
scan_success_limit, uint64_t scan_false_limit,
+                               const std::string &match_str, 
std::vector<std::string> *keys, std::string *end_cursor,
+                               RedisType type, const MatchType match_mode) {

Review Comment:
   I just added two matching patterns.
   such as
   *llo matches ello,hello,eeeello
   *l* matches l,ll,llo,ello,hello
   
   And,i add scan_false_time limit to config,beacasue if we use 
suffix,substring match, we need scan one by one, and the potentially long time 
may be unacceptable. so I add this argument in scan,zsan,sscan,hscan command。I 
found that the three scan methods to get the last scanned key are all 
different, which is not convenient for me to modify,so i add a string value  in 
 CommandSubkeyScanBase to represented the last key that was scanned。



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