You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "yuz10 (via GitHub)" <gi...@apache.org> on 2026/05/07 12:28:23 UTC
[PR] [ISSUE #10291] fix queryMessage default index type [rocketmq]
yuz10 opened a new pull request, #10292:
URL: https://github.com/apache/rocketmq/pull/10292
<!-- Please make sure the target branch is right. In most case, the target branch should be `develop`. -->
### Which Issue(s) This PR Fixes
<!-- Please ensure that the related issue has already been created, and [link this pull request to that issue using keywords](<https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword>) to ensure automatic closure. -->
- Fixes #10291
### Brief Description
<!-- Write a brief description for your pull request to help the maintainer understand the reasons behind your changes. -->
### How Did You Test This Change?
<!-- In order to ensure the code quality of Apache RocketMQ, we expect every pull request to have undergone thorough testing. -->
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE #10291] fix queryMessage default index type [rocketmq]
Posted by "yx9o (via GitHub)" <gi...@apache.org>.
yx9o merged PR #10292:
URL: https://github.com/apache/rocketmq/pull/10292
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE #10291] fix queryMessage default index type [rocketmq]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #10292:
URL: https://github.com/apache/rocketmq/pull/10292#discussion_r3213391958
##########
client/src/main/java/org/apache/rocketmq/client/impl/MQAdminImpl.java:
##########
@@ -320,7 +320,7 @@ public MessageExt queryMessageByUniqKey(String clusterName, String topic,
public QueryResult queryMessage(String clusterName, String topic, String key, int maxNum, long begin, long end, boolean isUniqKey) throws MQClientException,
InterruptedException {
- return queryMessage(clusterName, topic, key, maxNum, begin, end, isUniqKey, null, null);
+ return queryMessage(clusterName, topic, key, maxNum, begin, end, isUniqKey, isUniqKey ? MessageConst.INDEX_UNIQUE_TYPE : MessageConst.INDEX_KEY_TYPE, null);
}
Review Comment:
Add unit coverage for the `queryMessage(String clusterName, ..., boolean isUniqKey)` overload to ensure the defaulted `indexType` behavior is correct (e.g., when `isUniqKey=false` it should behave like `INDEX_KEY_TYPE`). Current `MQAdminImplTest` only exercises the topic-only overload and uniqKey helpers, so this regression path would not be caught.
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE #10291] fix queryMessage default index type [rocketmq]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #10292:
URL: https://github.com/apache/rocketmq/pull/10292#issuecomment-4397335207
## [Codecov](https://app.codecov.io/gh/apache/rocketmq/pull/10292?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `0%` with `1 line` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 48.88%. Comparing base ([`c6fc39a`](https://app.codecov.io/gh/apache/rocketmq/commit/c6fc39ab5f1661cab5e2d6ff0c215c0add9c6d1d?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`b8ca7d9`](https://app.codecov.io/gh/apache/rocketmq/commit/b8ca7d90b678211e10cf1fbfbfda0ced7475c8a3?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
| [Files with missing lines](https://app.codecov.io/gh/apache/rocketmq/pull/10292?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...a/org/apache/rocketmq/client/impl/MQAdminImpl.java](https://app.codecov.io/gh/apache/rocketmq/pull/10292?src=pr&el=tree&filepath=client%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Fclient%2Fimpl%2FMQAdminImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9NUUFkbWluSW1wbC5qYXZh) | 0.00% | [1 Missing :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/10292?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## develop #10292 +/- ##
=============================================
- Coverage 48.96% 48.88% -0.08%
+ Complexity 13464 13439 -25
=============================================
Files 1375 1375
Lines 100450 100450
Branches 12973 12973
=============================================
- Hits 49183 49104 -79
- Misses 45268 45326 +58
- Partials 5999 6020 +21
```
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/rocketmq/pull/10292?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
</details>
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org