unbridled-41 opened a new issue, #5974:
URL: https://github.com/apache/rocketmq-dashboard/issues/5974
### Studio Version
branch: `rocketmq-studio` @ `7e7aa344`
### Runtime Environment
Backend tests: `cd server && mvn -o -B -ntp test
-Dtest='RocketMQMetadataProviderTest'`.
### Connected RocketMQ Cluster
Not involved. Reproduced and pinned by Studio's own test suite (`cd server
&& mvn -o -B -ntp test -Dtest='RocketMQMetadataProviderTest'`); no live
RocketMQ cluster participates.
### Describe the Bug
When the batch deadline cancels a group's enrichment task before it runs,
the snapshot keeps its initial value (`onlineInstances = 0`), which reaches the
API as a measured "this group has no online clients" - while the same class
maps a failed lookup to the documented -1 sentinel (`ConsumerGroupVO`: "-1 when
the connection inventory is unavailable"). The consumer page renders a green 0
for the client column (the sentinel renders as 不可用) and the health verdict
turns the zero into a critical "有堆积但无在线客户端" issue for a group whose inventory
was never read.
### Steps to Reproduce
Make the connection lookup block past the 3 s batch deadline (the existing
`timedOutGroupEnrichmentMustNotMutateReturnedGroupTest` setup) and read the
returned group's `onlineInstances`.
### What Did You Expect to See?
The -1 "unavailable" value, like the failure path.
### What Did You See Instead?
A fabricated 0, rendered and graded as a measurement.
### Evidence
```
// RocketMQMetadataProvider (before)
AtomicReference<GroupLiveSnapshot> snapshot = new
AtomicReference<>(GroupLiveSnapshot.empty());
private static GroupLiveSnapshot empty() { return new
GroupLiveSnapshot(List.of(), 0, false, 0L, 0, false); }
```
Pinned by `cd server && mvn -o -B -ntp test
-Dtest='RocketMQMetadataProviderTest'` (fails before the change, passes after
it). The code path and the full observed output are in the PR's "Problem /
Evidence" section.
### Impact
A cancelled read is presented as "no clients online" and can raise a
critical alert from no data.
### Acceptance Criteria
The initial snapshot carries the sentinel, worker-written snapshots are
untouched, and the timeout test asserts -1.
**Corresponding PR:** #5975
--
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]