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

   Fixes #6872
   
   ## The defect
   
   `duplicateClientIds` counted rows per client id, and the producer scan keeps 
one row per producer group — with no system-group filter on that path, unlike 
the consumer path — so a Java client's own group plus the shared inner producer 
group produced two rows at one address and the summary reported 
`DUPLICATE_CLIENT_ID` with readiness `WARNING`. The console's own client 
diagnostics define the collision as one id at **more than one address** 
(`clientConnectionDiagnostics.ts:246-263`), so the two surfaces disagreed about 
a cluster that is fine.
   
   ## The fix
   
   The method groups the rows by client id and compares the addresses each id 
was seen at: an id at several addresses is still a duplicate, a multi-group 
client at one address is not. `getUniqueAddressCount()` already exists on the 
summary, so no data was missing.
   
   ## Tests
   
   Red before the change:
   
   ```
   [ERROR] 
ProducerConnectionSummaryVOTest.fromShouldNotFlagOneClientAsDuplicateAcrossItsGroups:103
   Expecting empty but was: ["producer-a"]
   ```
   
   The new case feeds the same client id twice at the same address and pins 
`duplicateClientIds` empty, no warnings and `READY`. The existing 
`fromShouldReportMixedVersionsAndDuplicateClients` (same id at two 
**different** addresses) is untouched and still green, so the genuine collision 
keeps its warning.
   
   Green after:
   
   ```
   [INFO] Tests run: 6, Failures: 0, Errors: 0 -- 
ProducerConnectionSummaryVOTest
   [INFO] Tests run: 43, Failures: 0, Errors: 0 -- RocketMQClientProviderTest
   [INFO] You have 0 Checkstyle violations.
   ```
   
   ## Scope
   
   Unrelated to the open #6320 (which is about the *clients* page counting 
de-duplicated clients against the table's rows) and to #2454 (placeholder 
client ids): this is the producer summary's duplicate rule and the address 
dimension it was missing.
   


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