lizhimins commented on PR #4124: URL: https://github.com/apache/rocketmq-dashboard/pull/4124#issuecomment-5602180895
Closed as folded into #4119, merged into `rocketmq-studio` as f04dea2b. Your change shipped as-is: `MybatisPlusAlertStateRepository.findActive` now filters with `StringUtils.trimWhitespace(rule.getMetric())`. Your framing of the gap was the part that made this easy to accept — `AlertRuleEvaluator` already matched samples against `rule.getMetric().trim()`, so the caller and the callee normalised differently, `scopedRules` came back empty, and `reconcileMissingActiveStates` concluded there was nothing active, leaving a stale FIRING alert that could never resolve. Confirming that `findActive` has exactly one production caller is what bounds the blast radius. Recorded as a follow-up rather than fixed here: this is the third place that trims a metric key individually. The durable fix is to normalise once at the read boundary (`MybatisPlusAlertRepository`), which would make this change, #4126 and the existing trim in `AlertRuleEvaluator` all redundant and would also cover the sites that still do not trim (`NativeAlertRulePolicy`, `AlertService`, `NativeAlertProcessor`). For context on the grouping: these four all sit on the native alert evaluation path and each one alone leaves the others still misfiring, so they were integrated as one change on the target PR's branch, each kept as its own commit with you as the author. -- 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]
