tju-yxq opened a new pull request, #1600: URL: https://github.com/apache/rocketmq-dashboard/pull/1600
## What is the purpose of the change Fixes #1599 `TencentInstanceProvider.countTopics()` fetched all topics via API (up to 10,000) just to return `.size()`. This caused extreme latency on the instance list page. ## Brief changelog - **`TencentInstanceProvider.java`**: Changed `countTopics` to fetch only 1 item (limit=1) and use the `TotalCount` field from the API response. Falls back to full scan only if `TotalCount` is null. ## Verifying this change 1. Configure a Tencent instance with 500+ topics. 2. Open instance list page. 3. Before fix: takes 5+ seconds (5+ API calls). 4. After fix: instant (1 API call returning count). - [x] Make sure there is a Github issue filed for the change. - [x] Format the pull request title like `[ISSUE #1599] ...`. - [x] Write a pull request description that is detailed enough. - [x] Write necessary unit-test. - [x] Run `mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle`. - [ ] If this contribution is large, please file an Apache Individual Contributor License Agreement. -- 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]
