[v11.3.x] Alerting: Update state manager to have immutable state in cache (#96843)
* Alerting: Update state manager to have immutable state in cache (#95985)
* create a new state and set at the end
* propagate labels datasource_uid and ref_id from current state if it's error
* copy the state when apply to all
(cherry picked from commit 420db99d16)
* Remove unused states variables
---------
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
This commit is contained in:
co-authored by
Yuri Tseretyan
parent
9c7c333856
commit
98be4ac047
@@ -43,7 +43,7 @@ func BenchmarkGetOrCreateTest(b *testing.B) {
|
||||
// values := make([]int64, count)
|
||||
b.RunParallel(func(pb *testing.PB) {
|
||||
for pb.Next() {
|
||||
_ = cache.getOrCreate(ctx, log, rule, result, nil, u)
|
||||
_ = cache.create(ctx, log, rule, result, nil, u)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user