btlqql opened a new pull request, #5321:
URL: https://github.com/apache/rocketmq-dashboard/pull/5321
### Which Issue(s) This PR Fixes
- Fixes #5108
### Brief Description
Aliyun's `GetConsumerGroupLag` response carries two per-topic breakdowns,
`data.topicLagMap` and `data.liteTopicLagMap`, but
`AliyunConverters.toQueueProgressRows`
(server/src/main/java/org/apache/rocketmq/studio/provider/alibaba/AliyunConverters.java:194-215)
only iterated `getTopicLagMap()`. A consumer group whose subscriptions are all
LiteTopics therefore produced an empty progress list — the provider had
received a valid lag measurement, but `GET /api/groups/{name}/progress`
returned no row for it, so LiteTopic backlog was invisible on the progress page
and in any downstream backlog aggregation.
The fix converts both breakdowns with one shared topic-level row builder, so
a LiteTopic lag entry yields a progress row with the same unknown queue-offset
sentinel the topic-level rows already use. The `totalLag` aggregate fallback is
untouched and still applies only when neither breakdown is present, so the
aggregate is never counted twice.
### How Did You Test This Change?
Two new tests in `AliyunConvertersLagTest`:
- `liteTopicLagShouldProduceAProgressRowTest` — a response with only
`liteTopicLagMap[lite-orders].readyCount=7` must produce exactly one row for
`lite-orders` with `diffTotal=7` and unknown queue offsets.
- `liteTopicAndTopicBreakdownsShouldBothBeReportedTest` — a response with
both breakdowns (40 + 7, `totalLag=47`) must produce both rows and must not add
the aggregate `total` row.
Red run on the unmodified tree:
```
$ cd server && mvn -B -ntp test -Dtest=AliyunConvertersLagTest
[ERROR] Tests run: 6, Failures: 2, Errors: 0, Skipped: 0, Time elapsed:
0.298 s <<< FAILURE! -- in
org.apache.rocketmq.studio.provider.alibaba.AliyunConvertersLagTest
[ERROR]
AliyunConvertersLagTest.liteTopicLagShouldProduceAProgressRowTest:99
java.lang.AssertionError:
Expected size: 1 but was: 0 in:
[]
[ERROR]
AliyunConvertersLagTest.liteTopicAndTopicBreakdownsShouldBothBeReportedTest:120
java.lang.AssertionError:
Expecting actual:
["orders"]
to contain exactly in any order:
["orders", "lite-orders"]
but could not find the following elements:
["lite-orders"]
[ERROR] Tests run: 6, Failures: 2, Errors: 0, Skipped: 0
[INFO] BUILD FAILURE
```
Green run after the fix (same command, same test class):
```
$ cd server && mvn -B -ntp test -Dtest=AliyunConvertersLagTest
[INFO] You have 0 Checkstyle violations.
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.221
s -- in org.apache.rocketmq.studio.provider.alibaba.AliyunConvertersLagTest
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0
[INFO] BUILD SUCCESS
```
### Checklist
- [x] One coherent change; unrelated modifications are not bundled in
- [x] Commit subject follows Conventional Commits
- [x] Tests added or updated for non-trivial changes
- [x] New UI text has both Chinese and English entries under `web/src/i18n/`
— not applicable, no UI text changed
- [x] Architecture constraints stay green (`mvn test` runs the ArchUnit
checks) — the change stays inside the existing Aliyun converter; no new type or
dependency, and the ArchUnit rules run in the same reactor
- [x] New source files carry the ASF license header — no new source file,
the change is inside an existing file
- [x] Documentation touched where behaviour changed (README / `docs/` /
in-app help) — not applicable: the endpoint and row shape are unchanged, only a
previously dropped breakdown is now reported
--
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]