From fa75985c1c4695b077cefdbb9e6fd9ec73ee8c0e Mon Sep 17 00:00:00 2001 From: gotjosh Date: Wed, 24 Apr 2024 14:04:16 +0100 Subject: [PATCH] Use the string representation of the labels instead of the hash Signed-off-by: gotjosh --- rules/group.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rules/group.go b/rules/group.go index 411ca68e2a..4acce6e605 100644 --- a/rules/group.go +++ b/rules/group.go @@ -681,15 +681,15 @@ func (g *Group) RestoreForState(ts time.Time) { continue } - result := map[uint64]storage.Series{} + result := map[string]storage.Series{} for sset.Next() { - result[sset.At().Labels().DropMetricName().Hash()] = sset.At() + result[sset.At().Labels().DropMetricName().String()] = sset.At() } alertRule.ForEachActiveAlert(func(a *Alert) { var s storage.Series - s, ok := result[a.Labels.Hash()] + s, ok := result[a.Labels.String()] if !ok { return }