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

   ## Summary
   - Treat negative time values from broker trace payloads as unavailable (`0`) 
in
     `RocketMQMessageProvider.parseLong`, which feeds trace node `timestamp`,
     `costTime` and consumer `consumeTime`.
   - Added regression test 
`getMessageTraceShouldTreatNegativeTimeValuesAsUnavailable`.
   
   ## Why
   The parser already degrades unparseable fields to `0`, but a *parseable* 
negative
   value passed straight through. The web console's timestamp guard
   (`if (!value) return '-'`) only treats `0` as unavailable, so a negative
   `timestamp` rendered as a 1969/1970 date and a negative `costTime` as a 
negative
   duration — visible garbage instead of the placeholder that unparseable 
fields get.
   Well-formed RocketMQ trace payloads never carry negative epoch-millisecond 
times
   or costs, so clamping them to `0` (the established "unavailable" sentinel) 
restores
   graceful degradation.
   
   ## Testing
   - `cd server && mvn -Dtest=RocketMQMessageProviderTest test`
     — Tests run: 32, 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