yyqdbngt opened a new pull request, #2885: URL: https://github.com/apache/rocketmq-dashboard/pull/2885
## Summary - parse stored alert-state statuses through a guarded helper in `MybatisPlusAlertStateRepository` - trim and root-locale uppercase the value; unknown or blank statuses fall back to `OK` in both `find` and the runtime listing ## Why `toState` is on the hot path of `NativeAlertProcessor.process`: every sample, for every rule, loads the persisted state and calls `AlertStateStatus.valueOf(entity.getStatus())`. One legacy or corrupted status value in `rmq_alert_state` threw `IllegalArgumentException` inside the collection transaction, aborting the whole alert evaluation cycle for every rule and fingerprint. The runtime listing (`/api/alert-rules/runtime`) had the same unguarded parse. Unknown values now fall back to the idle `OK` state so the next sample re-advances the state machine from a safe baseline. ## Testing - `cd server && mvn -q -Dtest=MybatisPlusAlertStateRepositoryTest test` — all tests pass, including the new `findToleratesUnknownStoredStatusValuesTest` (stored `FIRED` → `OK`) and `runtimeListingToleratesUnknownStoredStatusValuesTest` (stored `FIRED` → `OK`, stored ` firing ` → `FIRING`) -- 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]
