Skip to content

Commit 9bb3435

Browse files
authored
Merge branch 'release' into db_main
Signed-off-by: HC Zhu (Databricks) <[email protected]>
2 parents 6cfda61 + 4f3085e commit 9bb3435

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pkg/block/fetcher.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,9 @@ func (f *RecursiveLister) GetActiveAndPartialBlockIDs(ctx context.Context, ch ch
263263
}
264264
return nil
265265
}, objstore.WithRecursiveIter())
266+
if f.logger != nil {
267+
level.Info(f.logger).Log("msg", "recursive block lister ended", "duration", time.Since(start))
268+
}
266269
return partialBlocks, err
267270
}
268271

@@ -291,6 +294,7 @@ func (f *ConcurrentLister) GetActiveAndPartialBlockIDs(ctx context.Context, ch c
291294
level.Info(f.logger).Log("msg", "concurrent block lister end", "duration", time.Since(start))
292295
}()
293296
}
297+
294298
const concurrency = 64
295299

296300
partialBlocks = make(map[ulid.ULID]bool)
@@ -546,7 +550,9 @@ func (f *BaseFetcher) fetchMetadata(ctx context.Context) (interface{}, error) {
546550
ch = make(chan ulid.ULID, f.concurrency)
547551
mtx sync.Mutex
548552
)
549-
level.Info(f.logger).Log("msg", "fetching meta data", "concurrency", f.concurrency, "cache_dir", f.cacheDir)
553+
if f.logger != nil {
554+
level.Info(f.logger).Log("msg", "fetching meta data", "concurrency", f.concurrency, "cache_dir", f.cacheDir)
555+
}
550556
for i := 0; i < f.concurrency; i++ {
551557
eg.Go(func() error {
552558
numBlocks := 0

0 commit comments

Comments
 (0)