From 4cce207c6ab767f13cf55347b9cfe0a3a595b8d9 Mon Sep 17 00:00:00 2001 From: jxie <95172247+xiejian06033218@users.noreply.github.com> Date: Thu, 5 Dec 2024 20:39:06 +1100 Subject: [PATCH] fix(blooms): Enable metas cache on backend when running in ssd mode (#15275) --- pkg/loki/modules.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/loki/modules.go b/pkg/loki/modules.go index c4c4a6b0412c5..6ad0adde14cb6 100644 --- a/pkg/loki/modules.go +++ b/pkg/loki/modules.go @@ -784,7 +784,7 @@ func (t *Loki) initBloomStore() (services.Service, error) { bsCfg := t.Cfg.StorageConfig.BloomShipperConfig var metasCache cache.Cache - if t.Cfg.isTarget(IndexGateway) && cache.IsCacheConfigured(bsCfg.MetasCache) { + if (t.Cfg.isTarget(IndexGateway) || t.Cfg.isTarget(Backend)) && cache.IsCacheConfigured(bsCfg.MetasCache) { metasCache, err = cache.New(bsCfg.MetasCache, reg, logger, stats.BloomMetasCache, constants.Loki) // always enable LRU cache