Frun1na opened a new issue, #6110: URL: https://github.com/apache/rocketmq-dashboard/issues/6110
### Before Creating the Bug Report - [x] I have searched the [open issues](https://github.com/apache/rocketmq-dashboard/issues) of this repository and believe that this is not a duplicate. - [x] This is a defect in RocketMQ Studio, not a usage question and not a defect in another Apache RocketMQ repository. - [x] I can reproduce this on the current `rocketmq-studio` branch, or I have stated the exact version I am running below. ### Studio Version branch: `rocketmq-studio` git commit id: `5e4c39b0` deployed as: reproduced by a unit test against that commit (the affected code is the backend client summary) ### Runtime Environment OS: Ubuntu on WSL2 MySQL: not applicable — the defect is in the producer connection summary, reproduced in a JUnit 5 test browser: not applicable for the reproduction; the Producer page renders the affected fields ### Connected RocketMQ Cluster RocketMQ version: not applicable — reproduced with stubbed producer connections access mode: not applicable deployment: not applicable ### Describe the Bug `ProducerConnectionSummaryVO.from` (`server/src/main/java/org/apache/rocketmq/studio/cluster/client/ProducerConnectionSummaryVO.java:67`) sets `uniqueLanguageCount` / `uniqueVersionCount` to the size of the distribution list, and the distribution contains an `UNKNOWN` bucket for connections that reported no value (`normalizeDimension`, `:153`). A bucket that no client reported therefore counts as a language and a version: - one client that reported version `5.1.0` next to one that reported nothing gives `uniqueVersionCount = 2`, which the Producer page renders as `Versions: 2` (`web/src/pages/studio/Producer.tsx:454`); - `uniqueVersionCount > 1` then adds `MIXED_CLIENT_VERSION` to the warnings (`:124`), rendered as "clients are running different versions" (`producer.warningMixedVersion`), while the same collection already adds `INCOMPLETE_CLIENT_METADATA` — the accurate statement that metadata is missing. Two clients that do report different versions are a real mix and must keep raising the warning. ### Steps to Reproduce 1. Build the summary from two connections in one group: the first with `language=Java`, `versionDesc=5.1.0`, the second with `language=Java` and a null version. 2. Observe `uniqueVersionCount == 2` and both `INCOMPLETE_CLIENT_METADATA` and `MIXED_CLIENT_VERSION`. 3. Or run the regression test: ``` cd server && mvn -B -ntp test -Dtest=ProducerConnectionSummaryVOTest fromShouldNotCountAnUnreportedVersionAsASecondVersionTest: expected: 1 but was: 2 ``` ### What Did You Expect to See? `Versions: 1` and only the `INCOMPLETE_CLIENT_METADATA` warning: one version was reported, one client simply did not report one. `MIXED_CLIENT_VERSION` is reserved for a set that really contains different versions (the same summary's `UNKNOWN` bucket stays in the distribution the page renders). ### What Did You See Instead? `Versions: 2` and an additional "clients are running different versions" warning derived from a missing value. ### Additional Context A fix with a regression test follows in a pull request. ### Are You Willing to Submit a Pull Request? - [x] Yes, I am willing to submit a pull request. -- 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]
