You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "Wang1rrr (via GitHub)" <gi...@apache.org> on 2026/09/22 11:07:46 UTC
[PR] fix(message): surface incomplete topic queue scans [rocketmq-dashboard]
Wang1rrr opened a new pull request, #4903:
URL: https://github.com/apache/rocketmq-dashboard/pull/4903
## Which Issue(s) Does This PR Fix?
- Fixes #4799
## What problem does this solve?
`RocketMQMessageProvider.queryByTopic` scans every topic queue with bounded pull loops, but several early-abandon paths only logged a warning and then returned a normal `List<MessageRecordVO>`:
- the per-queue pull budget is exhausted;
- the broker returns a null pull result;
- the returned offset does not advance;
- repeated `OFFSET_ILLEGAL` responses force the scan to give up.
A bounded tail scan was also intentionally narrowed without carrying that fact into the detailed result. The service therefore rendered a partial topic query as complete whenever fewer than 200 matching rows happened to survive filtering. This is a read-path completeness invariant violation: operators could act on an apparently complete result while messages in an unscanned queue or offset range were omitted.
## What changed?
- Reuse the existing `MessageQueryResult.mayBeTruncated` signal for topic scans (Option B from #4799), preserving the public API shape.
- Mark the result incomplete for every queue-abandon path and for guarded tail-budget narrowing.
- Treat null `PullStatus` or `FOUND` with a null message list as malformed broker responses rather than an exhausted queue.
- Preserve complete results for normal `NO_NEW_MSG`/terminal responses, retry-topic degradation, and missing-topic responses.
- Update the result Javadoc, web warning, and MCP tool schema so all layers describe the same completeness semantics.
## Verification
Server:
```text
mvn -B -ntp -Dmaven.repo.local=/tmp/rmq-maven.6P98P5/repo \
-DskipITs \
-Dtest=RocketMQMessageProviderTest,MessageServiceTest,ToolCatalogTest,ToolOutputSchemaContractTest test
# Tests run: 90, Failures: 0, Errors: 0
```
Web:
```text
npm run build
npx vitest run src/pages/instance/__tests__/MessagePage.test.tsx \
src/pages/instance/__tests__/MessagePageAsyncState.test.tsx
# Test Files: 2 passed; Tests: 33 passed
```
The targeted provider tests cover stalled offsets, null pull responses, malformed `FOUND` responses, repeated `OFFSET_ILLEGAL`, and guarded tail truncation.
--
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] fix(message): surface incomplete topic queue scans [rocketmq-dashboard]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #4903: fix(message): surface incomplete topic queue scans
URL: https://github.com/apache/rocketmq-dashboard/pull/4903
--
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] fix(message): surface incomplete topic queue scans [rocketmq-dashboard]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4903:
URL: https://github.com/apache/rocketmq-dashboard/pull/4903#issuecomment-5943191608
This pull request has been automatically closed because there has been no activity for 7 days. If you would like to continue working on this, please reopen the PR with updated changes.
--
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