This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix that Trigger page might freeze for high cardinality detectors (#230)
* Fix that Trigger page might freeze for high cardinality detectors We can define triggers for an AD monitor using AD preview results. The trigger page runs fine for a single-stream detector where the preview results are few. For a high-cardinality detector, the trigger page is likely freezing simply because React needs to draw too many preview results on the page. This PR fixes the issue by holding a worst-case bound on the preview results to show. Specifically, when the number of preview results exceeded the bound, we split the preview time range into small chunks and only kept the maximum anomaly grade results within each chunk. The reduction can keep important results (i.e., the anomalies) intact while speeding up the trigger page rendering. We have also seen null pointer exceptions during trigger evaluation when the anomaly result index does not exist. The exception can arise when anomaly result indices are deleted by index rollover, and there is no new result index generated. Monitors will send out alerts for the exception. This PR fixes the issue by installing extra null checks. Testing done: 1. Added/modified unit tests for the above 2 fixes. 2. Manually verified the above 2 issues are fixed.
- Loading branch information
Showing
5 changed files
with
168 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters