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

   ## Problem
   
   Both Tencent message-query converters hardcode `.size(0)` — the detail path 
`toRecordVO(DescribeMessageResponse)` (`:861`) and the list path 
`toRecordVO(MessageItem, topic)` (`:881`) — so **every row of a Tencent message 
query renders "0 B"** (`message.tsx:901-907`, `formatBytes`). The detail path 
has the body in hand (a real size is computable); the list path genuinely lacks 
the datum (the SDK models expose no size field — verified). Aliyun sets the 
real size (`AliyunConverters.java:265`) and Apache the store size 
(`RocketMQMessageProvider.java:974`).
   
   ## Fix
   
   - Detail path: the real UTF-8 byte length of the body (mirroring how the 
sibling providers derive size).
   - List path: the unknown sentinel `MessageRecordVO.UNKNOWN_SIZE = -1` 
(mirroring `QueueProgressVO.UNKNOWN_OFFSET` and the lag-sentinel convention), 
rendered by a new `isSizeAvailable` as 不可用 in both the column and the drawer; 
the `-1` contract is documented in `message.yaml` the same way `group.yaml` 
documents the lag sentinel.
   
   ## Verification
   
   - Server: `queryMessagesByMsgIdShouldReportTheRealBodySizeTest` (multibyte 
body — size is byte length, not char count) and 
`queryMessagesByTopicShouldMarkListRowSizeUnknownTest` — both RED first 
(`expected: 5/-1 but was: 0`), GREEN after; maven `TencentInstanceProviderTest` 
→ 65 pass, catalog/registrar tests → 11 pass.
   - Web: `renders an unknown message size as unavailable instead of 0 B` — RED 
first (rendered `-1 B`), GREEN after; `MessagePage` 31 pass, `format.test` 32 
pass; eslint 0; `tsc -b --noEmit` exit 0.
   
   ## Risk / conflict disclosure
   
   None identified. Sibling PRs of mine touch other methods of 
`TencentInstanceProvider` (group-lag sentinel, topic-consumer TPS); different 
methods, happy to rebase in merge order.


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