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

   ## Summary
   - Clamp `TencentInstanceProvider.toInteger` (used for topic 
`writeQueues`/`readQueues`
     mapping) to `Integer.MAX_VALUE` for oversized cloud values, replacing the 
unguarded
     `Math.toIntExact`.
   - Added regression test `listTopicsShouldClampOversizedQueueCounts`.
   
   ## Why
   `TopicItem.getQueueNum()` is a `Long` returned by the Tencent Cloud OpenAPI. 
A value
   above `Integer.MAX_VALUE` made `Math.toIntExact` throw `ArithmeticException` 
during
   topic listing — HTTP 500 instead of a degraded view. This was the only 
unguarded
   long→int conversion in the file: the sibling helpers for total counts and 
retry
   counts already saturate at `Integer.MAX_VALUE`, so this brings queue-count 
mapping
   in line with the established pattern.
   
   ## Testing
   - `cd server && mvn -Dtest=TencentInstanceProviderTest test`
     — Tests run: 37, Failures: 0, Errors: 0
   


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