mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
- Add a changelog entry
- Improve variable name of the map produced by the series set Signed-off-by: gotjosh <josue.abreu@gmail.com>
This commit is contained in:
parent
fa75985c1c
commit
6cfc584308
|
@ -3,6 +3,7 @@
|
||||||
## unreleased
|
## unreleased
|
||||||
|
|
||||||
* [CHANGE] TSDB: Fix the predicate checking for blocks which are beyond the retention period to include the ones right at the retention boundary. #9633
|
* [CHANGE] TSDB: Fix the predicate checking for blocks which are beyond the retention period to include the ones right at the retention boundary. #9633
|
||||||
|
* [CHANGE] Rules: Execute 1 query instead of N (where N is the number of alerts within alert rule) when restoring alerts. #13980
|
||||||
* [ENHANCEMENT] Rules: Add `rule_group_last_restore_duration_seconds` to measure the time it takes to restore a rule group. #13974
|
* [ENHANCEMENT] Rules: Add `rule_group_last_restore_duration_seconds` to measure the time it takes to restore a rule group. #13974
|
||||||
|
|
||||||
## 2.51.2 / 2024-04-09
|
## 2.51.2 / 2024-04-09
|
||||||
|
|
|
@ -681,15 +681,15 @@ func (g *Group) RestoreForState(ts time.Time) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
result := map[string]storage.Series{}
|
seriesByLabels := map[string]storage.Series{}
|
||||||
for sset.Next() {
|
for sset.Next() {
|
||||||
result[sset.At().Labels().DropMetricName().String()] = sset.At()
|
seriesByLabels[sset.At().Labels().DropMetricName().String()] = sset.At()
|
||||||
}
|
}
|
||||||
|
|
||||||
alertRule.ForEachActiveAlert(func(a *Alert) {
|
alertRule.ForEachActiveAlert(func(a *Alert) {
|
||||||
var s storage.Series
|
var s storage.Series
|
||||||
|
|
||||||
s, ok := result[a.Labels.String()]
|
s, ok := seriesByLabels[a.Labels.String()]
|
||||||
if !ok {
|
if !ok {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue