Skip to content

Commit

Permalink
swarm/network/stream: Debug log instead of Warn for retrieval failure (
Browse files Browse the repository at this point in the history
  • Loading branch information
holisticode authored and cryptomental committed Jan 9, 2019
1 parent bbe6640 commit f2077e1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion swarm/network/stream/delivery.go
Expand Up @@ -39,6 +39,7 @@ const (
var (
processReceivedChunksCount = metrics.NewRegisteredCounter("network.stream.received_chunks.count", nil)
handleRetrieveRequestMsgCount = metrics.NewRegisteredCounter("network.stream.handle_retrieve_request_msg.count", nil)
retrieveChunkFail = metrics.NewRegisteredCounter("network.stream.retrieve_chunks_fail.count", nil)

requestFromPeersCount = metrics.NewRegisteredCounter("network.stream.request_from_peers.count", nil)
requestFromPeersEachCount = metrics.NewRegisteredCounter("network.stream.request_from_peers_each.count", nil)
Expand Down Expand Up @@ -169,7 +170,8 @@ func (d *Delivery) handleRetrieveRequestMsg(ctx context.Context, sp *Peer, req *
go func() {
chunk, err := d.chunkStore.Get(ctx, req.Addr)
if err != nil {
log.Warn("ChunkStore.Get can not retrieve chunk", "peer", sp.ID().String(), "addr", req.Addr, "hopcount", req.HopCount, "err", err)
retrieveChunkFail.Inc(1)
log.Debug("ChunkStore.Get can not retrieve chunk", "peer", sp.ID().String(), "addr", req.Addr, "hopcount", req.HopCount, "err", err)
return
}
if req.SkipCheck {
Expand Down

0 comments on commit f2077e1

Please sign in to comment.