Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

Commit

Permalink
storage: address comments by elad
Browse files Browse the repository at this point in the history
  • Loading branch information
nonsense committed Jun 14, 2019
1 parent dfd0589 commit 0301823
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions storage/netstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ func (n *NetStore) Put(ctx context.Context, mode chunk.ModePut, ch Chunk) (bool,
metrics.GetOrRegisterResettingTimer(fmt.Sprintf("netstore.fetcher.lifetime.%s", fii.CreatedBy), nil).UpdateSince(fii.CreatedAt)

// helper snippet to log if a chunk took way to long to be delivered
if time.Since(fii.CreatedAt) > 5*time.Second {
slowChunkDeliveryThreshold := 5 * time.Second
if time.Since(fii.CreatedAt) > slowChunkDeliveryThreshold {
log.Trace("netstore.put slow chunk delivery", "ref", ch.Address().String())
}

Expand Down Expand Up @@ -199,8 +200,6 @@ func (n *NetStore) Get(ctx context.Context, mode chunk.ModeGet, req *Request) (C

log.Trace("netstore.singleflight returned", "ref", ref.String(), "err", err)

log.Trace("netstore return", "ref", ref.String(), "chunk len", len(c.Data()))

return c, nil
}

Expand Down Expand Up @@ -296,7 +295,6 @@ func (n *NetStore) GetOrCreateFetcher(ctx context.Context, ref Address, interest
f = v.(*Fetcher)
} else {
f.CreatedBy = interestedParty

n.fetchers.Add(ref.String(), f)
}

Expand Down

0 comments on commit 0301823

Please sign in to comment.