-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Schema: change sort order of history event type enum
This improves the resulting sort order when `ORDER BY event_time, event_type` is used. `state_change` comes first as it can cause many of the other events like trigger downtimes, remove acknowledgements and send notifications. Similarly, `notification` comes last as any other event can result in a notification. This will result in history events for scenarios like state changes, triggers downtime, sends downtime start notification being sorted in that order. Apart from that, end events sort before the corresponding start events as any ack/comment/downtime/flapping period should last for more than a millisecond, therefore if there should be two events within the same millisecond, the end event corresponds to the older period and is sorted first. The remaining order is alphabetically.
- Loading branch information
1 parent
7c7ba9f
commit 5ba31cd
Showing
4 changed files
with
24 additions
and
3 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