Skip to content

Commit

Permalink
Disable metadata fetcher on-disk cache
Browse files Browse the repository at this point in the history
  • Loading branch information
kolesnikovae committed Nov 2, 2023
1 parent 372f898 commit 071f796
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/storegateway/bucket_index_metadata_fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package storegateway

import (
"context"
"path/filepath"
"time"

"github.com/go-kit/log"
Expand Down Expand Up @@ -59,7 +58,11 @@ func NewBucketIndexMetadataFetcher(
func (f *BucketIndexMetadataFetcher) fallbackFetch(ctx context.Context) (metas map[ulid.ULID]*block.Meta, partial map[ulid.ULID]error, err error) {
if f.fallback == nil {
userBucket := objstore.NewTenantBucketClient(f.userID, f.bkt, f.cfgProvider)
fetcher, err := block.NewMetaFetcherWithMetrics(f.logger, 16, userBucket, filepath.Join("./data-store-gateway", f.userID), f.metrics, f.filters)
// Empty cache dir path disables on-disk cache.
// Provided that an in-memory cache is maintained,
// and store gateway does not have a persistent
// file system, on-disk cache is not helpful.
fetcher, err := block.NewMetaFetcherWithMetrics(f.logger, 16, userBucket, "", f.metrics, f.filters)
if err != nil {
return nil, nil, err
}
Expand Down

0 comments on commit 071f796

Please sign in to comment.