feat(dashboard): Org-aware cache for schema migration (#115025)

* fix: use dsIndexProvider cache on migrations

* chore: use same comment as before

* feat: org-aware TTL cache for schemaversion migration and warmup for single tenant

* chore: use LRU cache

* chore: change DefaultCacheTTL to 1 minute

* chore: address copilot reviews

* chore: use expirable cache

* chore: remove unused import
This commit is contained in:
Rafael Bortolon Paulovic
2025-12-10 16:09:16 +01:00
committed by GitHub
parent 85c643ece9
commit 8c6ccdd1ab
20 changed files with 1398 additions and 153 deletions
+7 -5
View File
@@ -247,11 +247,12 @@ type Cfg struct {
MetricsGrafanaEnvironmentInfo map[string]string
// Dashboards
DashboardVersionsToKeep int
MinRefreshInterval string
DefaultHomeDashboardPath string
DashboardPerformanceMetrics []string
PanelSeriesLimit int
DashboardVersionsToKeep int
MinRefreshInterval string
DefaultHomeDashboardPath string
DashboardPerformanceMetrics []string
PanelSeriesLimit int
DashboardSchemaMigrationCacheTTL time.Duration
// Auth
LoginCookieName string
@@ -1237,6 +1238,7 @@ func (cfg *Cfg) parseINIFile(iniFile *ini.File) error {
cfg.DefaultHomeDashboardPath = dashboards.Key("default_home_dashboard_path").MustString("")
cfg.DashboardPerformanceMetrics = util.SplitString(dashboards.Key("dashboard_performance_metrics").MustString(""))
cfg.PanelSeriesLimit = dashboards.Key("panel_series_limit").MustInt(0)
cfg.DashboardSchemaMigrationCacheTTL = dashboards.Key("schema_migration_cache_ttl").MustDuration(time.Minute)
if err := readUserSettings(iniFile, cfg); err != nil {
return err