DashboardStore: Use ReplDB and get dashboard quotas from the ReadReplica (#90235)

* Use ReplDB in dashboard store and update all fixtures - no other changes

* just moving dashboard counts for now

* find the missing test fixture
This commit is contained in:
Kristin Laemmert
2024-07-12 10:47:49 -04:00
committed by GitHub
parent e64ef2245c
commit 8a6107cd35
35 changed files with 256 additions and 244 deletions
+6 -1
View File
@@ -1,9 +1,14 @@
package db
import "github.com/grafana/grafana/pkg/services/sqlstore"
import (
"github.com/grafana/grafana/pkg/services/sqlstore"
)
type ReplDB interface {
// DB is the primary database connection.
DB() *sqlstore.SQLStore
// ReadReplica is the read-only database connection. If no read replica is configured, the implementation must return the primary DB.
// TODO: ReadReplica will take a list of replicas and load-balance across them in a future milestone.
ReadReplica() *sqlstore.SQLStore
}