NUAAwqy opened a new issue, #7407: URL: https://github.com/apache/rocketmq-dashboard/issues/7407
### Symptom When the native alert collection pass probes proxy availability for an Apache instance, a pass where proxy discovery answers without error but yields no probeable proxy silently marks every `proxy.availability` metric key of the instance as successfully collected with zero samples. Active proxy incidents on that instance are then resolved as healthy on the next reconciliation. Two concrete paths produce the empty result: 1. `clusterService.listClusters(instance)` returns an empty list (cluster enumeration came back empty). 2. Every discovered cluster leaves its proxy list undiscovered (`cluster.getProxies() == null`) or empty. ### Root cause `ApacheRocketMqProxyMetricsCollector.collect` returns the accumulated sample list as-is. When the discovery loop contributes no samples, the collector returns an empty list instead of the whole-scope failure marker. The scheduler then reports `MetricCollectionScope(instance, [proxy.availability])` as a successful collection with zero samples, and `NativeAlertProcessor.reconcileMissingActiveStates` treats "no sample present" as "the value cleared": every FIRING/ACKED proxy-availability alert state for the instance is advanced to RESOLVED. The collector's own discovery-failure branch already handles this correctly — it emits an empty-labels `UNAVAILABLE` marker so `containsWholeScopeFailure` skips reconciliation. The empty-enumeration happy path simply missed the same guard. ### Impact - A transient empty cluster/proxy enumeration (partial discovery response, cluster list not yet loaded, proxies not yet discovered from the endpoint) resolves active proxy incidents that are still ongoing. The incidents only re-fire after the state machine rebuilds its pending streak, so the false resolution is visible to on-call as a spurious RESOLVED event and a missed notification window. - The metric snapshot table also loses the availability row for that pass, so dashboards show the proxy series vanishing rather than unavailable. ### Fix Emit the same whole-scope failure marker (empty-labels `UNAVAILABLE` sample) when discovery yields no probeable proxy, so an enumeration gap is never reported as a successful zero-proxy measurement. Covered by two new tests that fail against the previous behavior. -- 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]
