Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shift Sync Warn and Error Messages To Debug #7059

Merged
merged 2 commits into from
Aug 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion beacon-chain/p2p/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ func (s *Service) pingPeers() {
for _, pid := range s.peers.Connected() {
go func(id peer.ID) {
if err := s.pingMethod(s.ctx, id); err != nil {
log.WithField("peer", id).WithError(err).Error("Failed to ping peer")
log.WithField("peer", id).WithError(err).Debug("Failed to ping peer")
}
}(pid)
}
Expand Down
2 changes: 1 addition & 1 deletion beacon-chain/sync/initial-sync/blocks_fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ func (f *blocksFetcher) requestBlocks(
}
defer func() {
if err := streamhelpers.FullClose(stream); err != nil && err.Error() != mux.ErrReset.Error() {
log.WithError(err).Errorf("Failed to close stream with protocol %s", stream.Protocol())
log.WithError(err).Debugf("Failed to close stream with protocol %s", stream.Protocol())
}
}()

Expand Down
10 changes: 5 additions & 5 deletions beacon-chain/sync/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func (s *Service) registerRPC(baseTopic string, handle rpcHandler) {
if err := handle(ctx, base, stream); err != nil {
messageFailedProcessingCounter.WithLabelValues(topic).Inc()
if err != errWrongForkDigestVersion {
log.WithError(err).Warn("Failed to handle p2p RPC")
log.WithError(err).Debug("Failed to handle p2p RPC")
}
traceutil.AnnotateError(span, err)
}
Expand All @@ -117,28 +117,28 @@ func (s *Service) registerRPC(baseTopic string, handle rpcHandler) {
traceutil.AnnotateError(span, err)
return
}
log.WithError(err).Warn("Failed to decode stream message")
log.WithError(err).Debug("Failed to decode stream message")
traceutil.AnnotateError(span, err)
return
}
if err := handle(ctx, msg.Interface(), stream); err != nil {
messageFailedProcessingCounter.WithLabelValues(topic).Inc()
if err != errWrongForkDigestVersion {
log.WithError(err).Warn("Failed to handle p2p RPC")
log.WithError(err).Debug("Failed to handle p2p RPC")
}
traceutil.AnnotateError(span, err)
}
} else {
msg := reflect.New(t)
if err := s.p2p.Encoding().DecodeWithMaxLength(stream, msg.Interface()); err != nil {
log.WithError(err).Warn("Failed to decode stream message")
log.WithError(err).Debug("Failed to decode stream message")
traceutil.AnnotateError(span, err)
return
}
if err := handle(ctx, msg.Elem().Interface(), stream); err != nil {
messageFailedProcessingCounter.WithLabelValues(topic).Inc()
if err != errWrongForkDigestVersion {
log.WithError(err).Warn("Failed to handle p2p RPC")
log.WithError(err).Debug("Failed to handle p2p RPC")
}
traceutil.AnnotateError(span, err)
}
Expand Down