unbridled-41 opened a new issue, #5968: URL: https://github.com/apache/rocketmq-dashboard/issues/5968
### Studio Version branch: `rocketmq-studio` @ `7e7aa344` ### Runtime Environment Backend tests: `cd server && mvn -o -B -ntp test -Dtest='NativeAlertProcessorTest'`. ### Describe the Bug A PENDING state is the anchor for the "must hold for `duration` / N samples" contract, but nothing ends it when the metric stops arriving: the reconcile loop iterated `findActive(...)`, which selected only FIRING and ACKED, and it persisted only a RESOLVED transition. A rule with `duration=5m` that hit once (`firstPendingAt=T0`) and whose metric then disappeared from every collection kept that anchor, so the first sample that returned five minutes later fired the alert (`now >= firstPendingAt + duration`) after two isolated readings instead of five continuous minutes. Before it fires, the rules page shows a permanent PENDING badge for a metric nobody collects. Prometheus's `for:`, which the export maps this field to, restarts its timer when the series stops matching. ### Steps to Reproduce 1. Create a rule with `duration=5m` on `broker.disk.usage_ratio`, let one matching sample arrive (state PENDING, firstPendingAt=T0). 2. Stop that metric from being collected for 10 minutes. 3. Send one matching sample: it fires immediately. ### What Did You Expect to See? The episode ends when the fingerprint is no longer collected; a later sample starts a new pending window. ### What Did You See Instead? A pending anchor that survived the gap and fired on the first sample back. ### Impact False FIRING alerts (and notifications) plus a permanent PENDING badge for metrics that are no longer collected. ### Acceptance Criteria A pending state whose fingerprint is missing from a successful collection is reset (without a lifecycle event), and the query that finds active states includes it, with regression tests. **Corresponding PR:** #ISSUEPR# -- 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]
