Skip to content

Commit

Permalink
Increase aleert vacuum quota for L2 analyzer. (#310)
Browse files Browse the repository at this point in the history
This fixes premature 'Resolved' alert sending.
  • Loading branch information
nickeskov authored Dec 5, 2024
1 parent 9b59ccb commit abfc5d2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/analysis/l2/l2analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,14 @@ func vacuumAlerts(
}
}

const defaultAlertVacuumQuota = int(l2NodesSameHeightTimerDuration/heightCollectorTimeout) + 1
// defaultAlertVacuumQuota is a default value for the alerts storage vacuum quota.
// It is calculated as the number of vacuum stages required to vacuum an alert.
// The formula is: l2NodesSameHeightTimerDuration / heightCollectorTimeout + 1 + 4, where:
// - l2NodesSameHeightTimerDuration is the duration of the timer that triggers the alert about the same height of an L2,
// - heightCollectorTimeout is the timeout of the height collector,
// - 1 is added to compensate the first vacuum stage,
// - 2 is added to survive the vacuum stage after the last alert.
const defaultAlertVacuumQuota = int(l2NodesSameHeightTimerDuration/heightCollectorTimeout) + 1 + 2

func analyzerLoop(
ctx context.Context,
Expand Down

0 comments on commit abfc5d2

Please sign in to comment.