chore(cache): Make exprimental messages more clear for cache. (#6219)

Currently we see following message when any of the experimental feature is used for cache (say fifocache or redis).
But the problem it doesn't say __what_kind__ of cache is it exactly.

So this leads to confusion to track what kind of cache is the source of the experiment feature.

This PR fixes it by adding more clear message.

Signed-off-by: Kaviraj <kavirajkanagaraj@gmail.com>
pull/6255/head
Kaviraj Kanagaraj 4 years ago committed by GitHub
parent 410c1a0d38
commit a795b93897
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      pkg/storage/chunk/cache/fifo_cache.go
  2. 3
      pkg/storage/chunk/cache/redis_cache.go

@ -4,6 +4,7 @@ import (
"container/list"
"context"
"flag"
"fmt"
"sync"
"time"
"unsafe"
@ -98,7 +99,7 @@ type cacheEntry struct {
// NewFifoCache returns a new initialised FifoCache of size.
func NewFifoCache(name string, cfg FifoCacheConfig, reg prometheus.Registerer, logger log.Logger) *FifoCache {
util_log.WarnExperimentalUse("In-memory (FIFO) cache", logger)
util_log.WarnExperimentalUse(fmt.Sprintf("In-memory (FIFO) cache - %s", name), logger)
if cfg.DeprecatedSize > 0 {
flagext.DeprecatedFlagsUsed.Inc()

@ -2,6 +2,7 @@ package cache
import (
"context"
"fmt"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
@ -18,7 +19,7 @@ type RedisCache struct {
// NewRedisCache creates a new RedisCache
func NewRedisCache(name string, redisClient *RedisClient, logger log.Logger) *RedisCache {
util_log.WarnExperimentalUse("Redis cache", logger)
util_log.WarnExperimentalUse(fmt.Sprintf("Redis cache - %s", name), logger)
cache := &RedisCache{
name: name,
redis: redisClient,

Loading…
Cancel
Save