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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user