Wang1rrr opened a new pull request, #5523: URL: https://github.com/apache/rocketmq-dashboard/pull/5523
<!-- Make sure the base branch is `rocketmq-studio`: that is the RocketMQ Studio trunk. --> ### Which Issue(s) This PR Fixes - Fixes #4799 (evaluated as feasible, then closed by the stale bot with no fix landed) This replaces #4903, which the stale bot closed before review and which can no longer be reopened. It is rebased onto the current trunk, and it also adds the regenerated rmqctl catalog that #4903 was missing. ### Brief Description `RocketMQMessageProvider.queryByTopic` scans every queue with bounded pull loops, but several early exits only log a warning and still return the rows as a **complete** result: - the per-queue pull budget (`MAX_PULL_ATTEMPTS_PER_QUEUE`) runs out; - the broker returns a `null` pull result; - `nextBeginOffset` does not advance; - `OFFSET_ILLEGAL` repeats past `MAX_CONSECUTIVE_OFFSET_ILLEGAL`; - the scan plan narrows a long range to the guarded tail budget (`scanPlan.truncated()`). Callers wrap the list in `MessageQueryResult.complete(...)`. Whenever fewer than a page of matching rows survive filtering, the console and the `rmq.message.query_by_topic` tool therefore present a partial scan as exhaustive, with no warning. Changes: - `queryByTopic` returns `MessageQueryResult` and marks it `truncated` on every path above. It also does so for a malformed `FOUND` response with a `null` message list, which is not proof the queue ended. - Normal end-of-queue, a missing topic and the `%RETRY%` degradation stay `complete`. - The `MessageQueryResult` Javadoc, the `messagePage.truncatedWarning` text (zh/en) and the `resultMayBeTruncated` description in `tool-catalog/tools/message.yaml` now describe the wider meaning. `rmqctl/internal/catalog/catalog_gen.go` is regenerated with `make -C rmqctl catalog-generate`. The API shape is unchanged; the existing `mayBeTruncated` signal is reused. ### How Did You Test This Change? - `cd server && mvn -B -ntp test`: all suites pass on JDK 21. `RocketMQMessageProviderTest` (64 tests) includes the three new `queryByTopicMarksResultIncomplete...Test` cases (null pull result, malformed `FOUND`, repeated illegal offsets), plus updated tail-budget assertions. - `make -C rmqctl ci` (gofmt, `go test -race`, vet, catalog-verify, cross-build): pass. - `cd web && npx vitest run src/pages/instance/__tests__/MessagePage src/i18n`: 59 tests pass. ### Checklist - [x] One coherent change; unrelated modifications are not bundled in - [x] Commit subject follows Conventional Commits (`feat:` / `fix:` / `refactor:` / `chore:` / `docs:` / `perf:`) - [x] Tests added or updated for non-trivial changes, test methods named `...Test` - [x] New UI text has both Chinese and English entries under `web/src/i18n/` - [x] Architecture constraints stay green (`mvn test` runs the ArchUnit checks) - [ ] New source files carry the ASF license header (no new files) - [x] Documentation touched where behaviour changed (tool schema description, regenerated CLI catalog) 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
