Skip to content

Commit 5f4b8fc

Browse files
authored
fix: Fix panic in BloomStore initialisation (#13457)
The initialisation of the `BloomStore` service failed with a panic if the index gateways were configured to use `ring` mode. This happened, because the bloom store requires to wire up the configuration for the shipper store, see https://github.com/grafana/loki/blob/1a508b0aa/pkg/loki/modules.go#L864-L867 At this time, the index gateway ring manager wasn't initialized yet, leading to a `nil` pointer dereference. This PR fixes the issue by adding the index gateway ring as dependency of the bloom store so it gets initialised first. Signed-off-by: Christian Haudum <[email protected]>
1 parent 1a508b0 commit 5f4b8fc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/loki/loki.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ func (t *Loki) setupModuleManager() error {
673673
mm.RegisterModule(RuleEvaluator, t.initRuleEvaluator, modules.UserInvisibleModule)
674674
mm.RegisterModule(TableManager, t.initTableManager)
675675
mm.RegisterModule(Compactor, t.initCompactor)
676-
mm.RegisterModule(BloomStore, t.initBloomStore)
676+
mm.RegisterModule(BloomStore, t.initBloomStore, modules.UserInvisibleModule)
677677
mm.RegisterModule(BloomCompactor, t.initBloomCompactor)
678678
mm.RegisterModule(BloomCompactorRing, t.initBloomCompactorRing, modules.UserInvisibleModule)
679679
mm.RegisterModule(BloomPlanner, t.initBloomPlanner)
@@ -718,6 +718,7 @@ func (t *Loki) setupModuleManager() error {
718718
BloomCompactor: {Server, BloomStore, BloomCompactorRing, Analytics, Store},
719719
BloomPlanner: {Server, BloomStore, Analytics, Store},
720720
BloomBuilder: {Server, BloomStore, Analytics, Store},
721+
BloomStore: {IndexGatewayRing},
721722
PatternIngester: {Server, MemberlistKV, Analytics},
722723
PatternRingClient: {Server, MemberlistKV, Analytics},
723724
IngesterRF1RingClient: {Server, MemberlistKV, Analytics},

0 commit comments

Comments
 (0)