unbridled-41 opened a new pull request, #4873:
URL: https://github.com/apache/rocketmq-dashboard/pull/4873

   ## Problem / Evidence
   
   `AlertService.findRelatedAlerts` queried the ±30-minute correlation window 
with `transition="FIRING"` and page size 100 (single page). Two observable gaps:
   
   1. A cluster incident that fired more than 30 minutes ago and is still 
active only through its in-window REMINDER events is invisible to the 
related-alerts panel — even though 
`AlertNotificationSuppressionService.findSuppressingClusterAlert` deliberately 
treats that same incident as active, with an explicit comment: "REMINDER is 
emitted only while the state stays FIRING, so an incident whose latest 
in-window event is a REMINDER is still active."
   2. When more than 100 candidate events exist in the window, everything 
beyond the first page was silently dropped (the suppression counterpart pages 
until `total` is reached).
   
   Reproduced by a regression test: cluster incident with FIRING at T−40min and 
REMINDER at T−10min, business alert at T → the related panel omitted the 
incident before the fix.
   
   ## Root cause / Fix
   
   The window query was written for a narrower case than the suppression 
counterpart, which shares the same correlation-window semantics. The query no 
longer constrains `transition`; candidates are filtered in memory against 
`FIRING || REMINDER` (same rule and comment as 
`AlertNotificationSuppressionService`), and the query now pages through the 
window like the suppression service.
   
   ## Priority / scoring
   
   PRIORITY 55 = impact 20 (user-visible correlation gap: a live incident is 
missing from the panel while suppression acts on it) + blast radius 15 
(system-alerts related panel for every cross-domain alert) + reproducibility 15 
(deterministic once a reminder-only incident exists) + maintenance value 5 
(aligns the two implementations of one semantic). FIX_CONFIDENCE 85.
   
   ## Tests
   
   - `mvn test 
-Dtest='AlertServiceTest#relatedAlertsShouldIncludeAnIncidentWhoseInWindowEventIsAReminderTest+relatedAlertsShouldReturnOtherDomainFiringEventsInTheSameInstanceAndScopeTest'`
     - pre-fix (fix stashed): `Tests run: 2, Failures: 2` (new test failed with 
the reminder-only incident missing; the existing test failed on the now-removed 
transition query argument)
     - post-fix: both pass
   - `mvn test 
-Dtest='AlertServiceTest,AlertNotificationSuppressionServiceTest,SystemAlertControllerTest'`
 → `Tests run: 102, Failures: 0, Errors: 0` (post-fix), BUILD SUCCESS
   
   ## Risk
   
   Low. Adds REMINDER-only incidents (which are genuinely active) to the panel 
and removes the 100-row ceiling; RESOLVED/other transitions are still excluded. 
No API shape change.
   


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