iloveeyjafjalla opened a new pull request, #7021:
URL: https://github.com/apache/rocketmq-dashboard/pull/7021

   Fixes #7020
   
   ## The defect
   
   The clear deleted the acknowledged events (the only rows carrying an 
incident's instance and labels) but kept its ACKED runtime state. `findActive` 
then drops that state from reconciliation's input, so the episode never 
resolves and no recovery is announced; a later breach on the same series loads 
the stale ACKED state, advances to NONE, and produces no event or notification.
   
   ## The fix
   
   `clearAcknowledged` now drops the states named by the events it is deleting 
— before the deletion, while those rows still identify them. New repository 
operation `AlertStateRepository.deleteForAcknowledgedAlerts()` (a default 
returning 0, matching the interface's existing `findActive` default) resolves 
the acknowledged `(rule_id, fingerprint)` pairs and deletes those state rows; a 
series that is still breaching starts a fresh incident on the next collection.
   
   ## Tests
   
   Red before the change:
   
   ```
   Wanted but not invoked: alertStateRepository.deleteForAcknowledgedAlerts()
   ```
   
   Green after, with the surrounding suites:
   
   ```
   Tests run: 101 -- AlertServiceTest          Tests run: 8  -- 
MybatisPlusAlertStateRepositoryTest
   Tests run: 20  -- AlertRuleStateLifecycleTest   Tests run: 31 -- 
NativeAlertProcessorTest
   [INFO] You have 0 Checkstyle violations.
   ```
   
   The repository case pins that the acknowledged `(rule_id, fingerprint)` 
pairs drive the state deletes; the service case pins the ordering (states 
first, then the events).
   


-- 
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]

Reply via email to