mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: Support for optimistic locking for alert rules (#50274)
* add support for optimistic locking for alert_rule table * return 409 in the case of opitimistic lock
This commit is contained in:
@@ -111,7 +111,7 @@ type AlertRule struct {
|
||||
Data []AlertQuery
|
||||
Updated time.Time
|
||||
IntervalSeconds int64
|
||||
Version int64
|
||||
Version int64 `xorm:"version"` // this tag makes xorm add optimistic lock (see https://xorm.io/docs/chapter-06/1.lock/)
|
||||
UID string `xorm:"uid"`
|
||||
NamespaceUID string `xorm:"namespace_uid"`
|
||||
DashboardUID *string `xorm:"dashboard_uid"`
|
||||
|
||||
Reference in New Issue
Block a user