Aias00 opened a new pull request, #4164:
URL: https://github.com/apache/rocketmq-dashboard/pull/4164

   Fixes #4163.
   
   ## Problem
   
   The Aliyun provider scans at most five pages of 20 source messages, but it 
only implemented the legacy `queryMessages` method. The default 
`queryMessagesDetailed` wrapper therefore marked every bounded result as 
complete, even when `totalCount` showed that more than 100 messages existed.
   
   Aliyun `ListMessages` has no Tag request field, so Studio filters Tags 
locally. Using the filtered result size to infer completeness is unsafe: the 
first 100 source rows can contain no matching Tag while matching rows still 
exist beyond the provider budget.
   
   ## Changes
   
   - Implement `AliyunInstanceProvider.queryMessagesDetailed` and keep the 
legacy list method delegating to it.
   - Count raw source rows independently of locally retained Tag matches.
   - Treat a short page or a positive `totalCount` reached by the raw fetch 
count as complete.
   - Return `MessageQueryResult.truncated` when five full pages are consumed 
without evidence that the query ended.
   
   The existing message API and frontend already propagate `mayBeTruncated`, so 
no REST or web change is required.
   
   ## TDD evidence
   
   Before the implementation, the new over-budget and Tag-filtered tests failed 
because `mayBeTruncated` remained false. After the implementation:
   
   ```text
   mvn -B test 
-Dtest='AliyunInstanceProviderTest#queryMessages*,MessageServiceTest'
   Tests run: 22, Failures: 0, Errors: 0, Skipped: 0
   BUILD SUCCESS
   Checkstyle violations: 0
   ```
   
   The four added boundaries cover:
   
   - more than 100 source rows;
   - an empty locally Tag-filtered result after exhausting the source budget;
   - exactly 100 total rows;
   - a short final page with no `totalCount`.
   
   ## Existing target-branch test failure
   
   Running the entire `AliyunInstanceProviderTest` class on the current target 
branch also executes the unrelated `getGroupProgressShouldMapLagRowsTest`, 
whose existing lag-row expectation fails and is specifically addressed by open 
PR #4135. This change does not touch that test or code path; the focused 
message-query suite above is green.
   
   ## Compatibility
   
   The change is limited to the Aliyun provider's existing bounded query path. 
It adds only the truncation metadata already supported by `MessageQueryResult`; 
query parameters, returned message rows, provider budget, persistence, and 
other vendors are unchanged.
   


-- 
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]

Reply via email to