Skip to content

Commit

Permalink
Merge pull request #6931 from onflow/petera/reduce-provider-logging-v…
Browse files Browse the repository at this point in the history
…0.37

[Collection] Reduce log level in provider
  • Loading branch information
peterargue authored Jan 24, 2025
2 parents 9eb49cc + fea0e4f commit dbe46e6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions engine/common/provider/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,14 @@ func (e *Engine) processEntityRequestWorker(ctx irrecoverable.SignalerContext, r
lg.Trace().Msg("worker picked up entity request for processing")
err := e.onEntityRequest(request)
if err != nil {
if engine.IsInvalidInputError(err) || engine.IsNetworkTransmissionError(err) {
lg.Error().Err(err).Msg("worker could not process entity request")
if engine.IsInvalidInputError(err) {
// log at debug level since nodes that recently unstaked are allowed to communicate over
// the network, but not allowed to request entities. Even an honest node may have been
// behind processing blocks and inadvertently continue requesting entities after they
// have left the network.
lg.Debug().Err(err).Msg("could not process entity request: invalid request")
} else if engine.IsNetworkTransmissionError(err) {
lg.Error().Err(err).Msg("could not process entity request: transmit error")
} else {
// this is an unexpected error, we crash the node.
ctx.Throw(err)
Expand Down

0 comments on commit dbe46e6

Please sign in to comment.