From 6a7f44cc8e535704177d47d4ad903f7c0f3bc20f Mon Sep 17 00:00:00 2001 From: SungJin1212 Date: Tue, 1 Oct 2024 06:33:09 +0900 Subject: [PATCH] [Chore] return nil when inmemory index cache init fail (#6246) --- pkg/storage/tsdb/index_cache.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/storage/tsdb/index_cache.go b/pkg/storage/tsdb/index_cache.go index 24dcd09411..7450689652 100644 --- a/pkg/storage/tsdb/index_cache.go +++ b/pkg/storage/tsdb/index_cache.go @@ -208,7 +208,7 @@ func NewIndexCache(cfg IndexCacheConfig, logger log.Logger, registerer prometheu case IndexCacheBackendInMemory: c, err := newInMemoryIndexCache(cfg.InMemory, logger, iReg) if err != nil { - return c, err + return nil, err } caches = append(caches, c) enabledItems = append(enabledItems, cfg.InMemory.EnabledItems)