From a509871c558c36753b471aa93ecd78d706b1cf2e Mon Sep 17 00:00:00 2001 From: Ed Welch Date: Sun, 31 Mar 2024 22:14:21 -0400 Subject: [PATCH] chore: remove experimental flags for l2 cache and memcached "addresses" config (#12410) --- docs/sources/configure/_index.md | 15 ++++++++++++--- pkg/storage/chunk/cache/memcached_client.go | 6 ++---- pkg/storage/config/store.go | 8 ++++---- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/docs/sources/configure/_index.md b/docs/sources/configure/_index.md index 82cb0ecadea03..cf81dd561cf37 100644 --- a/docs/sources/configure/_index.md +++ b/docs/sources/configure/_index.md @@ -2404,6 +2404,10 @@ The `chunk_store_config` block configures how chunks will be cached and how long # The CLI flags prefix for this block configuration is: store.chunks-cache [chunk_cache_config: ] +# The cache block configures the cache backend. +# The CLI flags prefix for this block configuration is: store.chunks-cache-l2 +[chunk_cache_config_l2: ] + # Write dedupe cache is deprecated along with legacy index types (aws, # aws-dynamo, bigtable, bigtable-hashed, cassandra, gcp, gcp-columnkey, # grpc-store). @@ -2411,6 +2415,11 @@ The `chunk_store_config` block configures how chunks will be cached and how long # The CLI flags prefix for this block configuration is: store.index-cache-write [write_dedupe_cache_config: ] +# Chunks will be handed off to the L2 cache after this duration. 0 to disable L2 +# cache. +# CLI flag: -store.chunks-cache-l2.handoff +[l2_chunk_cache_handoff: | default = 0s] + # Cache index entries older than this period. 0 to disable. # CLI flag: -store.cache-lookups-older-than [cache_lookups_older_than: | default = 0s] @@ -4488,6 +4497,7 @@ The cache block configures the cache backend. The supported CLI flags `` - `frontend.series-results-cache` - `frontend.volume-results-cache` - `store.chunks-cache` +- `store.chunks-cache-l2` - `store.index-cache-read` - `store.index-cache-write` @@ -4534,9 +4544,8 @@ memcached_client: # CLI flag: -.memcached.service [service: | default = "memcached"] - # EXPERIMENTAL: Comma separated addresses list in DNS Service Discovery - # format: - # https://cortexmetrics.io/docs/configuration/arguments/#dns-service-discovery + # Comma separated addresses list in DNS Service Discovery format: + # https://grafana.com/docs/mimir/latest/configure/about-dns-service-discovery/#supported-discovery-modes # CLI flag: -.memcached.addresses [addresses: | default = ""] diff --git a/pkg/storage/chunk/cache/memcached_client.go b/pkg/storage/chunk/cache/memcached_client.go index ca355e8f4e244..f2dc35bbe08f5 100644 --- a/pkg/storage/chunk/cache/memcached_client.go +++ b/pkg/storage/chunk/cache/memcached_client.go @@ -22,7 +22,6 @@ import ( "github.com/sony/gobreaker" "github.com/grafana/loki/pkg/util/constants" - util_log "github.com/grafana/loki/pkg/util/log" ) // MemcachedClient interface exists for mocking memcacheClient. @@ -75,7 +74,7 @@ type memcachedClient struct { type MemcachedClientConfig struct { Host string `yaml:"host"` Service string `yaml:"service"` - Addresses string `yaml:"addresses"` // EXPERIMENTAL. + Addresses string `yaml:"addresses"` Timeout time.Duration `yaml:"timeout"` MaxIdleConns int `yaml:"max_idle_conns"` MaxItemSize int `yaml:"max_item_size"` @@ -96,7 +95,7 @@ type MemcachedClientConfig struct { func (cfg *MemcachedClientConfig) RegisterFlagsWithPrefix(prefix, description string, f *flag.FlagSet) { f.StringVar(&cfg.Host, prefix+"memcached.hostname", "", description+"Hostname for memcached service to use. If empty and if addresses is unset, no memcached will be used.") f.StringVar(&cfg.Service, prefix+"memcached.service", "memcached", description+"SRV service used to discover memcache servers.") - f.StringVar(&cfg.Addresses, prefix+"memcached.addresses", "", description+"EXPERIMENTAL: Comma separated addresses list in DNS Service Discovery format: https://cortexmetrics.io/docs/configuration/arguments/#dns-service-discovery") + f.StringVar(&cfg.Addresses, prefix+"memcached.addresses", "", description+"Comma separated addresses list in DNS Service Discovery format: https://grafana.com/docs/mimir/latest/configure/about-dns-service-discovery/#supported-discovery-modes") f.IntVar(&cfg.MaxIdleConns, prefix+"memcached.max-idle-conns", 16, description+"Maximum number of idle connections in pool.") f.DurationVar(&cfg.Timeout, prefix+"memcached.timeout", 100*time.Millisecond, description+"Maximum time to wait before giving up on memcached requests.") f.DurationVar(&cfg.UpdateInterval, prefix+"memcached.update-interval", 1*time.Minute, description+"Period with which to poll DNS for memcache servers.") @@ -180,7 +179,6 @@ func NewMemcachedClient(cfg MemcachedClientConfig, name string, r prometheus.Reg } if len(cfg.Addresses) > 0 { - util_log.WarnExperimentalUse("DNS-based memcached service discovery", logger) newClient.addresses = strings.Split(cfg.Addresses, ",") } diff --git a/pkg/storage/config/store.go b/pkg/storage/config/store.go index 75bdaa2ace8dc..14218bb9cfb12 100644 --- a/pkg/storage/config/store.go +++ b/pkg/storage/config/store.go @@ -11,10 +11,10 @@ import ( type ChunkStoreConfig struct { ChunkCacheConfig cache.Config `yaml:"chunk_cache_config"` - ChunkCacheConfigL2 cache.Config `yaml:"chunk_cache_config_l2" doc:"hidden"` + ChunkCacheConfigL2 cache.Config `yaml:"chunk_cache_config_l2"` WriteDedupeCacheConfig cache.Config `yaml:"write_dedupe_cache_config" doc:"description=Write dedupe cache is deprecated along with legacy index types (aws, aws-dynamo, bigtable, bigtable-hashed, cassandra, gcp, gcp-columnkey, grpc-store).\nConsider using TSDB index which does not require a write dedupe cache."` - L2ChunkCacheHandoff time.Duration `yaml:"l2_chunk_cache_handoff" doc:"hidden"` + L2ChunkCacheHandoff time.Duration `yaml:"l2_chunk_cache_handoff"` CacheLookupsOlderThan model.Duration `yaml:"cache_lookups_older_than"` // Not visible in yaml because the setting shouldn't be common between ingesters and queriers. @@ -34,8 +34,8 @@ func (cfg *ChunkStoreConfig) ChunkCacheStubs() bool { // RegisterFlags adds the flags required to configure this flag set. func (cfg *ChunkStoreConfig) RegisterFlags(f *flag.FlagSet) { cfg.ChunkCacheConfig.RegisterFlagsWithPrefix("store.chunks-cache.", "", f) - cfg.ChunkCacheConfigL2.RegisterFlagsWithPrefix("experimental.store.chunks-cache-l2.", "", f) - f.DurationVar(&cfg.L2ChunkCacheHandoff, "experimental.store.chunks-cache-l2.handoff", 0, "Experimental, subject to change or removal. Chunks will be handed off to the L2 cache after this duration. 0 to disable L2 cache.") + cfg.ChunkCacheConfigL2.RegisterFlagsWithPrefix("store.chunks-cache-l2.", "", f) + f.DurationVar(&cfg.L2ChunkCacheHandoff, "store.chunks-cache-l2.handoff", 0, "Chunks will be handed off to the L2 cache after this duration. 0 to disable L2 cache.") f.BoolVar(&cfg.chunkCacheStubs, "store.chunks-cache.cache-stubs", false, "If true, don't write the full chunk to cache, just a stub entry.") cfg.WriteDedupeCacheConfig.RegisterFlagsWithPrefix("store.index-cache-write.", "", f)