Kris20030907 opened a new pull request, #6836:
URL: https://github.com/apache/rocketmq-dashboard/pull/6836
issue #6835
## Solution
A probe that cannot complete degrades to a single unavailable placeholder row
carrying what the registry itself knows
(`RegistryProbeRunner.unavailableEntry`):
- `name` / `endpoint` from the registry entry
- `status: warning` with empty `brokers` / `proxies` / `nameServers` /
`tpsHistory`
- `id`, `nsClusterName`, `type`, `version` left null — no live cluster was
discovered; `id == null` marks the row as not an actionable cluster
An empty result now always means "the probe succeeded and found no clusters".
All three failure paths (queue rejection, deadline, probe exception) funnel
into
the same builder, and `probeRegistryEntry` no longer catches `Exception`, so
degradation has a single site instead of three.
Web (small but required to keep the UI honest):
- the NameServer tab status column shows the probe result, so a placeholder
renders as "Warning" instead of the stale status stored at registration
time
- "Config Diff" is enabled only when a cluster id was actually discovered — a
placeholder has no cluster to diff against
The page header counters ("Total 0 ...") are computed from the instance-path
cluster list and are unaffected — pre-existing behavior.
## Tests
- `RegistryProbeRunnerTest`: a failing probe, a timed-out probe and a
saturated
probe queue each keep an unavailable row instead of dropping the entry
- `ClusterServiceRegistryTest`: probe failures degrade to a row instead of
being
skipped; blocked probes still surface per entry while the pool stays
bounded
- `ClusterPage.test.tsx`: an unprobed entry shows "Warning" and keeps
"Config Diff"
disabled
Full server suite: 3738 tests pass. Cluster/clients web suites: 82 tests
pass.
## Verification
Against a local cluster with two registered NameServers (`e2e-ns` alive,
`dead-ns` on a closed port):
- **dead path** (connection refused): `GET /api/clusters/registry` now
returns
both entries — `dead-ns` as
`{"name":"dead-ns","endpoint":"127.0.0.1:9877","status":"warning","id":null,"brokers":[]}`
(before: the row was absent entirely)
- **hung path** (TCP connect succeeds, no response): the same placeholder
row is
produced via the deadline, server log shows
`NameServer registry probe failed for dead-ns ... wait response on the
channel <127.0.0.1:9877> timeout`
Before/after screenshots of the NameServer tab attached: before — both
entries
green "Running"; after — `dead-ns` shows "Warning" with "Config Diff"
disabled.
--
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]