git-hulk commented on code in PR #2222:
URL: https://github.com/apache/kvrocks/pull/2222#discussion_r1589908503
##########
src/config/config.cc:
##########
@@ -152,6 +153,7 @@ Config::Config() {
{"pidfile", true, new StringField(&pidfile, kDefaultPidfile)},
{"max-io-mb", false, new IntField(&max_io_mb, 0, 0, INT_MAX)},
{"max-bitmap-to-string-mb", false, new
IntField(&max_bitmap_to_string_mb, 16, 0, INT_MAX)},
+ {"max-scan-num", false, new IntField(&max_scan_num, 2, 0, INT_MAX)},
Review Comment:
Seems `2` is too smaller to be as the `max_scan_num`?
##########
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,
Review Comment:
`scan_matched_limt` and `scan_mismatched_limit` should be a better name in
this scenario.
##########
.gitignore:
##########
@@ -40,9 +40,13 @@ version.h
.idea
.vscode
.cache
+.gitignore
compactdb
+test
testdb
build
cmake-build-*
+debug-build
+test
Review Comment:
duplicate line, it has been added in previous section.
##########
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,
Review Comment:
The parameter of the SCAN command is too long now, it's time to group the
scan parameters into a struct.
--
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]