PragmaTwice commented on code in PR #3109:
URL: https://github.com/apache/kvrocks/pull/3109#discussion_r2268711218
##########
src/storage/redis_db.cc:
##########
@@ -575,8 +576,10 @@ rocksdb::Status SubKeyScanner::Scan(engine::Context &ctx,
RedisType type, const
}
InternalKey ikey(iter->key(), storage_->IsSlotIdEncoded());
keys->emplace_back(ikey.GetSubKey().ToString());
- if (values != nullptr) {
- values->emplace_back(iter->value().ToString());
+ if (!no_values_) {
+ if (values != nullptr) {
+ values->emplace_back(iter->value().ToString());
+ }
}
Review Comment:
`no_values_` seems useless. We can just pass a `nullptr` as `values` to
indicate that we don't want values.
--
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]