grafana/pkg/registry
Matthew Jacobson c2efcdde09
Alerting: Fix flaky SQLITE_BUSY when migrating with provisioned dashboards (#76658)
* Alerting: Move migration from background service run to ngalert init

sqlite database write contention between the migration's single transaction and
dashboard provisioning's frequent commits was causing the migration to
 fail with SQLITE_BUSY/SQLITE_BUSY_SNAPSHOT on all retries.

 This is not a new issue for sqlite+grafana, but the discrepancy between the
 length of  the transactions was causing it to be very consistent. In addition,
 since a failed migration has implications on the assumed correctness of the
 alertmanager and alert rule definition state, we cause a server shutdown on
 error. This can make e2e tests as well as some high-load provisioned
 sqlite installations flaky on startup.

 The correct fix for this is better transaction management across various
 services and is out of scope for this change as we're primarily interested in
 mitigating the current bout of server failures in e2e tests when using sqlite.
2023-10-19 10:03:00 -04:00
..
apis K8s: Add example api service (#75911) 2023-10-06 21:55:22 +03:00
backgroundsvcs Alerting: Fix flaky SQLITE_BUSY when migrating with provisioned dashboards (#76658) 2023-10-19 10:03:00 -04:00
corekind Playlist: Use a different go struct for sql service vs k8s (#76393) 2023-10-12 08:29:06 -07:00
usagestatssvcs Chore: Move backgroundsvcs and usagestatssvcs to registry (#72692) 2023-08-02 09:25:55 -04:00
registry.go Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00