apache / apache/rocketmq-dashboard
[Studio][Bug] Aliyun message queries do not report truncated results
- Dominant language
- Java
- Stars
- 1.4k
- Forks
- 683
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 58
Description
## Description
The Aliyun provider bounds message queries to five pages of 20 records, but it only implements the legacy `queryMessages` method. The default `queryMessagesDetailed` implementation therefore wraps every bounded result as complete, even when the Aliyun API reports more records than the provider scanned.
This is especially misleading for Tag queries because Aliyun `ListMessages` does not expose a Tag request parameter. Studio filters Tags locally after fetching each page, so a bounded scan can return no matching rows while matching messages still exist beyond the first 100 records.
## Actual behavior
- Aliyun message queries stop after at most 100 source records.
- `MessageQueryResult.mayBeTruncated` remains `false`.
- The message page can present the bounded result, including an empty Tag-filtered result, without the existing truncation warning.
## Expected behavior
The provider should report `mayBeTruncated=true` when it reaches the five-page budget before the query is known to be exhausted. A short page or a trustworthy `totalCount` showing that all source rows were fetched should remain a complete result.
## Code location
- `server/src/main/java/org/apache/rocketmq/studio/provider/alibaba/AliyunInstanceProvider.java`
## Proposed scope
- Override `queryMessagesDetailed` in the Aliyun provider.
- Track raw source rows independently of rows retained by the local Tag filter.
- Use short-page and `totalCount` evidence to distinguish complete results from budget exhaustion.
- Add regression coverage for over-budget, Tag-filtered, exact-boundary, and short-page queries.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in server/src/main/java/org/apache/rocketmq/studio/provider/alibaba/AliyunInstanceProvider.java and trace the existing queryMessages behavior and default queryMessagesDetailed wrapper. Add regression coverage for over-budget, Tag-filtered, exact-boundary, and short-page queries. Done means raw source-row limits are distinguished from locally retained Tag rows, and mayBeTruncated is true only when the five-page budget may have hidden records.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100