Cleanup of old search functionality (#110861)
* Remove support for initMinSize. Remove support for searchAfterWrite option, now it defaults to true. * Remove reference to deprecated feature toggle. * Remove feature toggle completely. * Remove code related to indexing on watch events. * Fix compilation error. * Remove unused field.
This commit is contained in:
@@ -577,7 +577,6 @@ type Cfg struct {
|
||||
IndexMaxBatchSize int
|
||||
IndexFileThreshold int
|
||||
IndexMinCount int
|
||||
IndexMaxCount int
|
||||
IndexRebuildInterval time.Duration
|
||||
IndexCacheTTL time.Duration
|
||||
EnableSharding bool
|
||||
|
||||
@@ -69,7 +69,6 @@ func (cfg *Cfg) setUnifiedStorageConfig() {
|
||||
cfg.InstanceID = section.Key("instance_id").String()
|
||||
cfg.IndexFileThreshold = section.Key("index_file_threshold").MustInt(10)
|
||||
cfg.IndexMinCount = section.Key("index_min_count").MustInt(1)
|
||||
cfg.IndexMaxCount = section.Key("index_max_count").MustInt(0)
|
||||
// default to 24 hours because usage insights summarizes the data every 24 hours
|
||||
cfg.IndexRebuildInterval = section.Key("index_rebuild_interval").MustDuration(24 * time.Hour)
|
||||
cfg.IndexCacheTTL = section.Key("index_cache_ttl").MustDuration(10 * time.Minute)
|
||||
|
||||
@@ -35,9 +35,6 @@ func TestCfg_setUnifiedStorageConfig(t *testing.T) {
|
||||
_, err = unifiedStorageSection.NewKey("index_min_count", "5")
|
||||
assert.NoError(t, err)
|
||||
|
||||
_, err = unifiedStorageSection.NewKey("index_max_count", "1000")
|
||||
assert.NoError(t, err)
|
||||
|
||||
cfg.setUnifiedStorageConfig()
|
||||
|
||||
value, exists := cfg.UnifiedStorage["playlists.playlist.grafana.app"]
|
||||
@@ -52,7 +49,6 @@ func TestCfg_setUnifiedStorageConfig(t *testing.T) {
|
||||
|
||||
// Test that index settings are correctly parsed
|
||||
assert.Equal(t, 5, cfg.IndexMinCount)
|
||||
assert.Equal(t, 1000, cfg.IndexMaxCount)
|
||||
})
|
||||
|
||||
t.Run("read unified_storage configs with defaults", func(t *testing.T) {
|
||||
@@ -65,6 +61,5 @@ func TestCfg_setUnifiedStorageConfig(t *testing.T) {
|
||||
|
||||
// Test that default index settings are applied
|
||||
assert.Equal(t, 1, cfg.IndexMinCount)
|
||||
assert.Equal(t, 0, cfg.IndexMaxCount)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user