Skip to content

Commit

Permalink
fix(backend): don't over-allocate groups in dedup code
Browse files Browse the repository at this point in the history
  • Loading branch information
prymitive committed Jul 1, 2020
1 parent b1fb3ab commit 63fb49d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/alertmanager/dedup.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func DedupAlerts() []models.AlertGroup {
groups := am.Alerts()
for _, ag := range groups {
if _, found := uniqueGroups[ag.ID]; !found {
uniqueGroups[ag.ID] = make([]models.AlertGroup, 0, len(groups))
uniqueGroups[ag.ID] = []models.AlertGroup{}
}
uniqueGroups[ag.ID] = append(uniqueGroups[ag.ID], ag)
}
Expand Down

0 comments on commit 63fb49d

Please sign in to comment.