jishengming1 commented on code in PR #2608:
URL: https://github.com/apache/kvrocks/pull/2608#discussion_r2137079243
##########
src/storage/redis_db.cc:
##########
@@ -366,6 +368,10 @@ rocksdb::Status Database::Scan(engine::Context &ctx, const
std::string &cursor,
if (metadata.Expired()) continue;
std::tie(std::ignore, user_key) =
ExtractNamespaceKey<std::string>(iter->key(), storage_->IsSlotIdEncoded());
+
+ if (!util::StringMatch(suffix_glob, user_key.substr(prefix.size()))) {
+ continue;
+ }
keys->emplace_back(user_key);
cnt++;
Review Comment:
In this code, we replace `user_key.substr(prefix.size())` with
`std::string_view(user_key).substr(prefix.size())`, which seems to offer better
performance, right?
--
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]