You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by mm...@apache.org on 2022/03/21 15:06:09 UTC

[bookkeeper] branch master updated: Log NoLedgerException on debug level (#3117)

This is an automated email from the ASF dual-hosted git repository.

mmerli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git


The following commit(s) were added to refs/heads/master by this push:
     new edffdd6  Log NoLedgerException on debug level (#3117)
edffdd6 is described below

commit edffdd6dc261c3a9222751187a9f5ac601e9b1fa
Author: Andras Beni <an...@streamnative.io>
AuthorDate: Mon Mar 21 16:06:01 2022 +0100

    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.
---
 .../src/main/java/org/apache/bookkeeper/proto/ReadLacProcessorV3.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/ReadLacProcessorV3.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/ReadLacProcessorV3.java
index 16f2471..97c79f1 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/ReadLacProcessorV3.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/ReadLacProcessorV3.java
@@ -75,7 +75,7 @@ class ReadLacProcessorV3 extends PacketProcessorBaseV3 implements Runnable {
             }
         } 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 @@ class ReadLacProcessorV3 extends PacketProcessorBaseV3 implements Runnable {
             }
         } 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);