Introduced options to ignore old indexes based on build time and build version. (#111168)

This commit is contained in:
Peter Štibraný
2025-09-17 10:59:59 +02:00
committed by GitHub
parent 1a035094e5
commit 48250a1605
5 changed files with 234 additions and 101 deletions
+2
View File
@@ -579,6 +579,8 @@ type Cfg struct {
IndexMinCount int
IndexRebuildInterval time.Duration
IndexCacheTTL time.Duration
MaxFileIndexAge time.Duration // Max age of file-based indexes. Index older than this will not be reused between restarts.
MinFileIndexBuildVersion string // Minimum version of Grafana that built the file-based index. If index was built with older Grafana, it will not be reused between restarts.
EnableSharding bool
QOSEnabled bool
QOSNumberWorker int
+3
View File
@@ -76,4 +76,7 @@ func (cfg *Cfg) setUnifiedStorageConfig() {
cfg.SprinklesApiServerPageLimit = section.Key("sprinkles_api_server_page_limit").MustInt(10000)
cfg.CACertPath = section.Key("ca_cert_path").String()
cfg.HttpsSkipVerify = section.Key("https_skip_verify").MustBool(false)
cfg.MaxFileIndexAge = section.Key("max_file_index_age").MustDuration(0)
cfg.MinFileIndexBuildVersion = section.Key("min_file_index_build_version").MustString("")
}