From b25779149892733e4a943c95e1f06a5ce755d047 Mon Sep 17 00:00:00 2001 From: Jiri Peinlich Date: Fri, 26 Aug 2022 02:38:42 +0100 Subject: [PATCH] Reducing verbosity during BWS errors (#4311) Stacktrace can be retrieved by increasing the log level Signed-off-by: Jiri Peinlich Co-authored-by: Sally MacFarlane --- .../backwardsync/BackwardSyncContext.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/sync/backwardsync/BackwardSyncContext.java b/ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/sync/backwardsync/BackwardSyncContext.java index 25a6a9582b..78576b105d 100644 --- a/ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/sync/backwardsync/BackwardSyncContext.java +++ b/ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/sync/backwardsync/BackwardSyncContext.java @@ -202,24 +202,24 @@ public class BackwardSyncContext { backwardSyncException -> { if (backwardSyncException.shouldRestart()) { LOG.info( - "Backward sync failed ({}). Current Peers: {}. Retrying in " - + millisBetweenRetries - + " milliseconds...", - backwardSyncException.getMessage(), - ethContext.getEthPeers().peerCount()); - return; + "Backward sync failed ({}). Current Peers: {}. Retrying in {} milliseconds...", + throwable.getMessage(), + ethContext.getEthPeers().peerCount(), + millisBetweenRetries); } else { debugLambda( LOG, "Not recoverable backward sync exception {}", throwable::getMessage); throw backwardSyncException; } }, - () -> - LOG.warn( - "There was an uncaught exception during Backwards Sync. Retrying in " - + millisBetweenRetries - + " milliseconds...", - throwable)); + () -> { + LOG.warn( + "Backward sync failed ({}). Current Peers: {}. Retrying in {} milliseconds...", + throwable.getMessage(), + ethContext.getEthPeers().peerCount(), + millisBetweenRetries); + LOG.debug("Exception details:", throwable); + }); } private Optional extractBackwardSyncException(final Throwable throwable) {