Alerting: Support concurrent queries for saving alert instances (#70525)
This commit adds support for concurrent queries when saving alert instances to the database. This is an experimental feature in response to some customers experiencing delays between rule evaluation and sending alerts to Alertmanager, resulting in flapping. It is disabled by default.
This commit is contained in:
@@ -79,12 +79,13 @@ func (srv TestingApiSrv) RouteTestGrafanaRuleConfig(c *contextmodel.ReqContext,
|
||||
}
|
||||
|
||||
cfg := state.ManagerCfg{
|
||||
Metrics: nil,
|
||||
ExternalURL: srv.appUrl,
|
||||
InstanceStore: nil,
|
||||
Images: &backtesting.NoopImageService{},
|
||||
Clock: clock.New(),
|
||||
Historian: nil,
|
||||
Metrics: nil,
|
||||
ExternalURL: srv.appUrl,
|
||||
InstanceStore: nil,
|
||||
Images: &backtesting.NoopImageService{},
|
||||
Clock: clock.New(),
|
||||
Historian: nil,
|
||||
MaxStateSaveConcurrency: 1,
|
||||
}
|
||||
manager := state.NewManager(cfg)
|
||||
includeFolder := !srv.cfg.ReservedLabels.IsReservedLabelDisabled(models.FolderTitleLabel)
|
||||
|
||||
Reference in New Issue
Block a user