diff options
author | holisticode <holistic.computing@gmail.com> | 2018-12-05 01:29:51 +0800 |
---|---|---|
committer | Anton Evangelatov <anton.evangelatov@gmail.com> | 2018-12-05 01:29:51 +0800 |
commit | b98d2e9a1c11f797502a3afa711e470a41cbc91d (patch) | |
tree | b80ee6fa940193e7c1805893efd7c09a178a1c4f /swarm | |
parent | 92639b676aaa7f262d19081256c43cdb78aa0efd (diff) | |
download | dexon-b98d2e9a1c11f797502a3afa711e470a41cbc91d.tar.gz dexon-b98d2e9a1c11f797502a3afa711e470a41cbc91d.tar.zst dexon-b98d2e9a1c11f797502a3afa711e470a41cbc91d.zip |
swarm/network/stream: Debug log instead of Warn for retrieval failure (#18246)
Diffstat (limited to 'swarm')
-rw-r--r-- | swarm/network/stream/delivery.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/swarm/network/stream/delivery.go b/swarm/network/stream/delivery.go index a5c9fa7e8..c73298d9a 100644 --- a/swarm/network/stream/delivery.go +++ b/swarm/network/stream/delivery.go @@ -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) @@ -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 { |