zmuxuny opened a new pull request, #4529: URL: https://github.com/apache/rocketmq-dashboard/pull/4529
### Which Issue(s) This PR Fixes - Fixes #4528 ### Brief Description Tencent RocketMQ 5.x catalog pagination previously treated any null/empty `Data` page as the end of the instance list before consulting `TotalCount`. A short page was also accepted as complete whenever it returned fewer than `PAGE_SIZE` rows. When `TotalCount` says more provider rows exist, either condition represents an incomplete/contradictory page. Returning the rows collected so far makes Studio's cloud-instance catalog look complete even though instances are missing. This change fails closed with a 502-style `BusinessException` when a known `TotalCount` proves rows remain but the current page is short or empty. Genuine empty catalogs remain valid, and missing/negative `TotalCount` keeps the previous short-page fallback behavior. ### Red / Green Verification Baseline: `master@d50ffecc9d7e8f8f46da64198831bd7952e6974e`. Fail-before, Java 21: - Added a regression with `TotalCount=1` and `Data=null`. - `TencentCatalogServiceTest`: **9 tests, exactly 1 failure**. - The new test failed with `Expecting code to raise a throwable`, proving current master returned a successful empty catalog. Green, Java 21: - `TencentCatalogServiceTest`: **11/11 passed**, 0 failures/errors. - Added coverage for an incomplete non-empty short page and for a genuine empty catalog. - Checkstyle: **0 violations**. - `mvn -B -ntp -DskipTests package`: **BUILD SUCCESS**. - `git diff --check`: clean. ### Compatibility / Risk No API, schema, dependency, or frontend changes. Normal full pages, successful final pages, client-side search filtering, count normalization, and genuine empty catalogs are unchanged. Only provider responses that contradict their own known total count now surface as unavailable instead of silently truncating the catalog. AI-assisted source audit, implementation and regression authoring; Tencent's current `DescribeInstanceList` API contract and the pinned Java SDK model were checked before filing. -- 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]
