You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "LiuQhahah (via GitHub)" <gi...@apache.org> on 2025/08/12 06:12:04 UTC
[PR] fix(hscan): HSCAN support NOVALUES [kvrocks]
LiuQhahah opened a new pull request, #3109:
URL: https://github.com/apache/kvrocks/pull/3109
It closes https://github.com/apache/kvrocks/issues/3103
```
127.0.0.1:6666> HMSET langhash lang1 "PHP" lang2 "JavaScript" lang3 "Python" lang4 "GoLanguage"
OK
127.0.0.1:6666> HSCAN langhash 0
1) "0"
2) 1) "lang1"
2) "PHP"
3) "lang2"
4) "JavaScript"
5) "lang3"
6) "Python"
7) "lang4"
8) "GoLanguage"
127.0.0.1:6666> HSCAN langhash 0 NOVALUES
1) "0"
2) 1) "lang1"
2) "lang2"
3) "lang3"
4) "lang4"
```
@git-hulk Please review the code, thank you.
--
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: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(hscan): HSCAN support NOVALUES [kvrocks]
Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on PR #3109:
URL: https://github.com/apache/kvrocks/pull/3109#issuecomment-3177904684
@LiuQhahah Could you please also add the Go tests to ensure it works as expected.
--
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: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(hscan): HSCAN support NOVALUES [kvrocks]
Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
PragmaTwice merged PR #3109:
URL: https://github.com/apache/kvrocks/pull/3109
--
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: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(hscan): HSCAN support NOVALUES [kvrocks]
Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on code in PR #3109:
URL: https://github.com/apache/kvrocks/pull/3109#discussion_r2268749604
##########
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:
Good suggestion.
--
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: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(hscan): HSCAN support NOVALUES [kvrocks]
Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
PragmaTwice commented on PR #3109:
URL: https://github.com/apache/kvrocks/pull/3109#issuecomment-3181930872
BTW we should also support NOVALUES for zset and set, since now `*SCAN` accepts the parameter `NOVALUES`.
--
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: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(hscan): HSCAN support NOVALUES [kvrocks]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #3109:
URL: https://github.com/apache/kvrocks/pull/3109#issuecomment-3178610379
## [](https://sonarcloud.io/dashboard?id=apache_kvrocks&pullRequest=3109) **Quality Gate failed**
Failed conditions
 [22.9% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=3109&metric=new_duplicated_lines_density&view=list) (required ≤ 20%)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_kvrocks&pullRequest=3109)
--
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: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(hscan): HSCAN support NOVALUES [kvrocks]
Posted by "LiuQhahah (via GitHub)" <gi...@apache.org>.
LiuQhahah commented on PR #3109:
URL: https://github.com/apache/kvrocks/pull/3109#issuecomment-3177947262
> @LiuQhahah Could you please also add the Go tests to ensure it works as expected.
got it , i will add go test
--
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: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(hscan): HSCAN support NOVALUES [kvrocks]
Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
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: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org