Skip to content

[ISSUE #10291] fix queryMessage default index type#10292

Merged
yx9o merged 4 commits into
apache:developfrom
yuz10:develop8
May 15, 2026
Merged

[ISSUE #10291] fix queryMessage default index type#10292
yx9o merged 4 commits into
apache:developfrom
yuz10:develop8

Conversation

@yuz10
Copy link
Copy Markdown
Member

@yuz10 yuz10 commented May 7, 2026

Which Issue(s) This PR Fixes

Brief Description

How Did You Test This Change?

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 48.88%. Comparing base (c6fc39a) to head (b8ca7d9).

Files with missing lines Patch % Lines
...a/org/apache/rocketmq/client/impl/MQAdminImpl.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@              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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a regression in the client-side admin query path where queryMessage(clusterName, ..., isUniqKey=false) could return “no message” because the default indexType was null, causing local result filtering to drop all returned messages.

Changes:

  • Default indexType based on isUniqKey when calling the underlying queryMessage(..., indexType, lastKey) overload.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 321 to 324
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);
}
@yx9o yx9o merged commit c625406 into apache:develop May 15, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] query message by key return no message since 5.5.0

4 participants