You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "yyqdbngt (via GitHub)" <gi...@apache.org> on 2026/09/01 14:50:35 UTC

[PR] fix(alert): tolerate unknown alert state statuses [rocketmq-dashboard]

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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(alert): tolerate unknown alert state statuses [rocketmq-dashboard]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #2885:
URL: https://github.com/apache/rocketmq-dashboard/pull/2885#issuecomment-5593761937

   This pull request has been automatically closed because there has been no activity for 7 days. If you would like to continue working on this, please reopen the PR with updated changes.


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(alert): tolerate unknown alert state statuses [rocketmq-dashboard]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #2885: fix(alert): tolerate unknown alert state statuses
URL: https://github.com/apache/rocketmq-dashboard/pull/2885


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org