You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "yyqdbngt (via GitHub)" <gi...@apache.org> on 2026/08/31 15:36:09 UTC
[PR] fix(message): treat negative trace time values as unavailable [rocketmq-dashboard]
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(message): treat negative trace time values as unavailable [rocketmq-dashboard]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #2855: fix(message): treat negative trace time values as unavailable
URL: https://github.com/apache/rocketmq-dashboard/pull/2855
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(message): treat negative trace time values as unavailable [rocketmq-dashboard]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #2855:
URL: https://github.com/apache/rocketmq-dashboard/pull/2855#issuecomment-5577097619
This pull request has been automatically closed because there has been no activity for 7 days. If you would like to continue working on this, please reopen the PR with updated changes.
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org