Skip to content

Commit

Permalink
increase lookahead
Browse files Browse the repository at this point in the history
  • Loading branch information
n8maninger committed Mar 13, 2024
1 parent 97d98ec commit b5a4ccb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions renterd/downloader/downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,15 @@ func (bd *BlockDownloader) downloadBlockData(ctx context.Context, c cid.Cid, buc

func (bd *BlockDownloader) queueRelated(c cid.Cid) {
log := bd.log.Named("queueRelated").With(zap.Stringer("cid", c))
siblings, err := bd.store.BlockSiblings(c, 10)
siblings, err := bd.store.BlockSiblings(c, 64)
if err != nil {
log.Error("failed to get block siblings", zap.Error(err))
return
}

children, err := bd.store.BlockChildren(c, 10)
children, err := bd.store.BlockChildren(c, 64)
if err != nil {
log.Error("failed to get block siblings", zap.Error(err))
log.Error("failed to get block children", zap.Error(err))
return
}

Expand All @@ -174,7 +174,7 @@ func (bd *BlockDownloader) queueRelated(c cid.Cid) {
}

if !bd.dataCache.Contains(cidKey(sibling)) {
if _, ok := bd.queueBlock(sibling, bucket, key, downloadPriorityLow); ok {
if _, ok := bd.queueBlock(sibling, bucket, key, downloadPriorityMedium); ok {
log.Debug("queued sibling", zap.Stringer("sibling", sibling))
}
}
Expand Down

0 comments on commit b5a4ccb

Please sign in to comment.