Skip to content
Permalink
Browse files
Log NoLedgerException on debug level (#3117)
NoLedgerException does not signify an error in the Bookie that needs
to be fixed. Instead it is - at most - a user error that the user is
notified about via the status code ENOLEDGER.
Logging this problem at error level introduces an odd difference
between the behavior of readLac using v2 versus v3 protocol version.
In the former case ReadEntryProcessor logs the same problem at debug
level. As a result changing protocol version appers to be introducing
an error.
  • Loading branch information
andrasbeni committed Mar 21, 2022
1 parent 7bb0bfc commit edffdd6dc261c3a9222751187a9f5ac601e9b1fa
Showing 1 changed file with 2 additions and 2 deletions.
@@ -75,7 +75,7 @@ private ReadLacResponse getReadLacResponse() {
}
} catch (Bookie.NoLedgerException e) {
status = StatusCode.ENOLEDGER;
logger.error("No ledger found while performing readLac from ledger: {}", ledgerId, e);
logger.debug("No ledger found while performing readLac from ledger: {}", ledgerId, e);
} catch (BookieException.DataUnknownException e) {
status = StatusCode.EUNKNOWNLEDGERSTATE;
logger.error("Ledger {} in unknown state and cannot serve reacLac requests", ledgerId, e);
@@ -93,7 +93,7 @@ private ReadLacResponse getReadLacResponse() {
}
} catch (Bookie.NoLedgerException e) {
status = StatusCode.ENOLEDGER;
logger.warn("No ledger found while trying to read last entry: {}", ledgerId, e);
logger.debug("No ledger found while trying to read last entry: {}", ledgerId, e);
} catch (Bookie.NoEntryException e) {
status = StatusCode.ENOENTRY;
logger.warn("No Entry found while trying to read last entry: {}", ledgerId, e);

0 comments on commit edffdd6

Please sign in to comment.