Skip to content

Commit

Permalink
Ensure working dir for bloomstore exists
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Haudum <[email protected]>
  • Loading branch information
chaudum committed Feb 21, 2024
1 parent 65b3ec4 commit 8f772cc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/storage/stores/shipper/bloomshipper/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
v1 "github.com/grafana/loki/pkg/storage/bloom/v1"
"github.com/grafana/loki/pkg/storage/chunk/cache"
"github.com/grafana/loki/pkg/storage/chunk/client"
"github.com/grafana/loki/pkg/storage/chunk/client/util"
"github.com/grafana/loki/pkg/storage/config"
)

Expand Down Expand Up @@ -172,6 +173,10 @@ func NewBloomStore(
numWorkers: storageConfig.BloomShipperConfig.BlocksDownloadingQueue.WorkersCount,
}

if err := util.EnsureDirectory(cfg.workingDir); err != nil {
return nil, errors.Wrap(err, "failed to create working directory for bloom store")
}

for _, periodicConfig := range periodicConfigs {
objectClient, err := storage.NewObjectClient(periodicConfig.ObjectType, storageConfig, clientMetrics)
if err != nil {
Expand Down

0 comments on commit 8f772cc

Please sign in to comment.