You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "coder999o (via GitHub)" <gi...@apache.org> on 2026/10/12 01:18:29 UTC

[PR] fix(clients): preserve field boundaries in duplicate diagnostics [rocketmq-dashboard]

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

   ## What is the purpose of the change
   
   Client connection diagnostics use `|` to join and later split identity fields. Pipes inside Client IDs or resource names can make different records appear identical and corrupt the evidence for actual duplicates.
   
   Fixes #6302
   
   ## Brief changelog
   
   - Encode the normalized connection identity as a JSON array and decode it without losing field boundaries.
   - Preserve duplicate counts, normalization and severity; diagnostic IDs remain opaque table keys.
   - Add regressions for distinct tuples that previously collided and complete evidence for actual duplicates.
   
   ## Verifying this change
   
   - `cd web && npm test -- src/utils/clientConnectionDiagnostics.test.ts src/pages/cluster/__tests__/ClientsPage.test.tsx src/pages/cluster/__tests__/clientsSearch.test.ts` (36 passed).
   - `cd web && npx tsc -p tsconfig.app.json --noEmit --composite false --incremental false` (passed).
   - `cd web && npx eslint src/utils/clientConnectionDiagnostics.ts src/utils/clientConnectionDiagnostics.test.ts` (passed).
   - `cd web && npx prettier --check src/utils/clientConnectionDiagnostics.ts src/utils/clientConnectionDiagnostics.test.ts` (passed).
   - `git diff --check` (passed).
   
   Both new regressions failed before the fix and passed afterward. The tests used frontend fixtures and mocked APIs; the full frontend suite and live Broker integration were not run.
   


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(clients): preserve field boundaries in duplicate diagnostics [rocketmq-dashboard]

Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins commented on PR #6303:
URL: https://github.com/apache/rocketmq-dashboard/pull/6303#issuecomment-6120497162

   Thanks — this is merged, as part of [`7df91fde3`](https://github.com/apache/rocketmq-dashboard/commit/7df91fde36241973ee604b763e5edfae5f26c40f) on `rocketmq-studio`.
   
   Your change went in together with #6064 and #6207 — all yours, all in the same area — so we folded them into a single commit instead of landing several near-identical entries for the same subsystem. Nothing was dropped.
   
   The commit message calls this one out explicitly:
   
   > #6303 `clientConnectionDiagnostics.ts:156-162` built the duplicate-detection identity with `[type, clientId, groupOrTopic, address].join('|')` and `:267` decoded it with `split('|')`, but `|` is a legal topic and group character — the kernel's `TopicValidator` sets `VALID_CHAR_BIT_MAP['|'] = true` — and a client `instanceName` is arbitrary, so two distinct quadruples could collapse into one `identityCounts` key and raise a false `EXACT_DUPLICATE_CONNECTION`, while the `clientId`, `resource` and `evidence: address=` reported to the operator were shifted out of their fields → both sides switch to `JSON.stringify` / `JSON.parse` at the same two points, leaving the duplicate counts, `normalizeText` normalisation, `info` severity, evidence shape and the opaque table `id` unchanged; `connectionIdentity` has exactly one call site (`:242`) and `connectionsByClient` keys off `normalizeText(clientId)`, so nothing else needed to move.
   
   Closing as folded, not rejected.
   


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(clients): preserve field boundaries in duplicate diagnostics [rocketmq-dashboard]

Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins closed pull request #6303: fix(clients): preserve field boundaries in duplicate diagnostics
URL: https://github.com/apache/rocketmq-dashboard/pull/6303


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org