unbridled-41 opened a new issue, #5459:
URL: https://github.com/apache/rocketmq-dashboard/issues/5459

   ### Studio Version
   branch: `rocketmq-studio` @ `6a68042f` (the revision verified; the branch is 
based on it)
   deployed as: built from source (unit test)
   
   ### Runtime Environment
   
   Not environment-specific: the defect is in the Aliyun response converter, 
verified with unit tests.
   
   ### Connected RocketMQ Cluster
   
   An Aliyun (cloud) instance registered in Studio; any topic with consumer 
groups.
   
   ### Describe the Bug
   
   `GET /api/topics/{name}/consumers` on an Aliyun instance returns every 
subscribed group with `diffTotal = 0`, `consumeTps = 0` and `metricsAvailable = 
true`, i.e. fabricated measurements:
   
   - `provider/alibaba/AliyunConverters.java` `toTopicConsumerVO` sets only 
`group`, `consumeType` and `messageModel`, leaving 
`instance/topic/TopicConsumerVO.java`'s field defaults (`@Builder.Default 
metricsAvailable = true`).
   - The Aliyun `ListTopicSubscriptions` response has no lag or TPS field at 
all: `javap` on `alibabacloud-rocketmq20220801-5.0.8.jar` shows 
`ListTopicSubscriptionsResponseBody$Data` carries only `consistency, 
consumerGroupId, filterExpression, filterExpressionType, messageModel, 
subscriptionStatus, topicName`.
   - The console renders the number whenever `metricsAvailable` is not `false` 
(`web/src/pages/instance/topic.tsx`), and the Apache provider already flags 
exactly this gap with `metricsAvailable(false)` when consume stats cannot be 
read.
   
   ### Steps to Reproduce
   
   1. Register an Aliyun instance and open a topic's consumer list in the 
console.
   2. Observe the TPS and backlog columns show `0` rather than "unavailable", 
although the cloud API response contains no such values.
   
   ### What Did You Expect to See?
   
   The lag and TPS columns report unavailable for an Aliyun topic-consumer row, 
as they already do for the Apache provider when stats cannot be read.
   
   ### What Did You See Instead?
   
   They show `0`, indistinguishable from a group with nothing in flight.
   
   ### Evidence
   
   - `provider/alibaba/AliyunConverters.java` `toTopicConsumerVO`; 
`instance/topic/TopicConsumerVO.java` (field defaults); SDK field list above.
   - `cd server && mvn -o test 
-Dtest='AliyunConvertersTest,AliyunInstanceProviderTest,AliyunConvertersLagTest,AliyunConvertersBodyEncodingTest'`
 — the added case 
`toTopicConsumerVoShouldMarkTheUngettableLagAndTpsUnavailableTest` fails before 
the change and passes after (`Tests run: 60, Failures: 0`).
   
   ### Impact
   
   An operator diagnosing consumer lag on an Aliyun instance reads "0 backlog / 
0 TPS" as authoritative data for a group that may be falling behind; the hosted 
agent's topic-detail output inherits the same values.
   
   ### Acceptance Criteria
   
   - Aliyun topic-consumer rows mark lag and TPS unavailable.
   - A regression test pins the flag.
   
   Related: #1207 (the same convention, established for the Apache provider).
   
   **Corresponding PR:** #5423
   


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