Skip to content

Commit b8d7018

Browse files
committed
more meta sync logs
1 parent 0950d01 commit b8d7018

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

pkg/block/fetcher.go

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,13 @@ func (f *ConcurrentLister) GetActiveAndPartialBlockIDs(ctx context.Context, ch c
308308
metaFile := path.Join(uid.String(), MetaFilename)
309309
ok, err := f.bkt.Exists(gCtx, metaFile)
310310
if err != nil {
311+
if f.logger != nil {
312+
level.Error(f.logger).Log(
313+
"msg", "concurrent block lister worker failed to check meta.json file existence",
314+
"meta_file", metaFile,
315+
"err", err,
316+
)
317+
}
311318
return errors.Wrapf(err, "meta.json file exists: %v", uid)
312319
}
313320
if !ok {
@@ -317,8 +324,8 @@ func (f *ConcurrentLister) GetActiveAndPartialBlockIDs(ctx context.Context, ch c
317324
continue
318325
}
319326
select {
320-
case <-ctx.Done():
321-
return ctx.Err()
327+
case <-gCtx.Done():
328+
return gCtx.Err()
322329
case ch <- uid:
323330
}
324331
}
@@ -331,9 +338,12 @@ func (f *ConcurrentLister) GetActiveAndPartialBlockIDs(ctx context.Context, ch c
331338
if !ok {
332339
return nil
333340
}
341+
if f.logger != nil {
342+
level.Info(f.logger).Log("msg", "concurrent block lister found block", "block", id)
343+
}
334344
select {
335-
case <-ctx.Done():
336-
return ctx.Err()
345+
case <-gCtx.Done():
346+
return gCtx.Err()
337347
case metaChan <- id:
338348
}
339349
return nil

0 commit comments

Comments
 (0)