X-LightYear opened a new issue, #7338:
URL: https://github.com/apache/rocketmq-dashboard/issues/7338

   ## Problem
   
   The paginated consumer-group endpoint is not provider-native for Aliyun and 
Tencent instances.
   `MetadataService.listConsumerGroupsPage` delegates to 
`InstanceProvider.listConsumerGroupsPage`,
   but neither cloud provider overrides the default implementation. The default 
first loads and
   enriches the complete consumer-group inventory, then slices one page in 
memory.
   
   This makes a request such as `GET /api/groups/page?page=1&pageSize=20` 
perform work proportional
   to every matching group. On Tencent, the full listing also enriches each 
group through a detail
   call, so the page request can fan out to one additional remote call per 
group before returning
   the first page.
   
   ## Expected behavior
   
   Aliyun and Tencent paginated consumer-group requests should use the provider 
OpenAPI page
   parameters and the service-reported total when available. Only the requested 
page should be
   converted and enriched. Existing search behavior and the fallback path for 
responses without a
   usable total should remain unchanged.
   
   ## Actual behavior
   
   Aliyun and Tencent inherit the generic in-memory pagination fallback. The 
full inventory is fetched
   and enriched before the requested page and total are produced.
   
   ## Reproduction
   
   1. Configure an Aliyun or Tencent RocketMQ instance with more consumer 
groups than one page.
   2. Open the consumer-group page or call `GET /api/groups/page` with a small 
`pageSize`.
   3. Observe that the provider first enumerates the complete inventory rather 
than requesting the
      requested page from the cloud API.
   
   The deterministic regression tests added for this change reproduce the 
contract with a response
   reporting `totalCount=201` for page 3. Before the fix, Aliyun returns the 
fallback total `1` and
   an empty page; Tencent throws `BusinessException: Tencent Cloud returned an 
incomplete consumer
   group page` from the full-list path.
   
   ## Scope
   
   Implement native consumer-group page handling for Aliyun and Tencent while 
preserving the generic
   fallback for unsupported or incomplete provider responses. The existing 
Apache/database-backed
   pagination work is outside this change.
   
   ## Validation
   
   - Aliyun and Tencent provider regression tests assert page parameters, 
returned items, and totals.
   - Pre-fix baseline: both regression tests fail for the reasons above.
   - Post-fix provider tests: 132 passed.
   - Provider plus MetadataService tests: passed.
   - Checkstyle: passed with 0 violations.
   - Server package compilation completed; the environment's existing `python3` 
binary-license gate
     is unavailable on Windows (exit code 9009).
   


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