Frun1na opened a new issue, #6075: URL: https://github.com/apache/rocketmq-dashboard/issues/6075
### Before Creating the Bug Report - [x] I have searched the [open issues](https://github.com/apache/rocketmq-dashboard/issues) of this repository and believe that this is not a duplicate. - [x] This is a defect in RocketMQ Studio, not a usage question and not a defect in another Apache RocketMQ repository. - [x] I can reproduce this on the current `rocketmq-studio` branch, or I have stated the exact version I am running below. ### Studio Version branch: `rocketmq-studio` git commit id: `5e4c39b0` deployed as: reproduced with a stubbed Tencent client in a unit test against that commit ### Runtime Environment OS: Ubuntu on WSL2 MySQL: not applicable — the defect is in the Tencent Cloud provider's paging loop browser (for UI issues): not applicable ### Connected RocketMQ Cluster RocketMQ version: not applicable — the defect is reproduced with a stubbed Tencent Cloud client access mode: not applicable deployment: TDMQ for RocketMQ 5.x (Tencent Cloud), exercised through `TencentClientFactory` stubs ### Describe the Bug `TencentInstanceProvider.getTopicConsumers` pages `DescribeTopic` with `CONSUMER_PAGE_SIZE` rows per call, but the loop treats any page shorter than the requested size as the end of the scan, without consulting the subscription total the same response carries: - `TencentInstanceProvider.java:428` — `if (data.length < CONSUMER_PAGE_SIZE || subscriptionCount != null && fetchedSubscriptions >= subscriptionCount) break;` the short-page test is evaluated first, so it ends the scan even when `SubscriptionCount` says more subscriptions exist. - The guard its three sibling scans use is absent here: #4531 (`34b03320`, `fix(tencent): reject incomplete resource pages`) added `requireCompletePage` to the topic list (`listTopics`), the consumer group list (`listConsumerGroups`) and the group subscriptions (`listTopicSubscriptionsByGroup`); the topic consumer scan was left out and still ends on `data.length < CONSUMER_PAGE_SIZE`. A page that comes back short while `SubscriptionCount` reports more rows therefore returns a truncated consumer list as if it were complete, and the topic detail page (and the AI tool that reads the same provider method) shows fewer consumer groups than actually subscribe to the topic. There is no signal on the response, so the operator has no way to tell the list is incomplete. ### Steps to Reproduce The defect is pinned by a unit test; no live cluster is needed: ``` cd server mvn -B -ntp test -DforkCount=1 -Dtest=TencentInstanceProviderTest ``` `getTopicConsumersShouldRejectIncompletePageWhenSubscriptionCountRequiresMoreTest` stubs one page containing a single subscription while the same `DescribeTopicResponse` reports `SubscriptionCount = 2`, and asserts the provider rejects the contradictory page instead of returning it. Before the fix the provider returns the one subscription and the assertion fails with `Expecting code to raise a throwable.` ### What Did You Expect to See? A short page that contradicts a non-negative `SubscriptionCount` should be rejected, the way the three sibling scans already do it (502, "Tencent Cloud returned an incomplete page"). Null or negative counts, and a genuinely empty page, must keep ending the scan. ### What Did You See Instead? `getTopicConsumers` returns the short page as the complete consumer list, so a truncated inventory is presented as authoritative on the topic detail page. ### Additional Context A fix with a regression test follows in a pull request. -- 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]
