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 20:22:08 UTC

[bookkeeper] branch branch-4.14 updated (c4f2951 -> a80d043)

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

mmerli pushed a change to branch branch-4.14
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git.


    from c4f2951  Add a REST API to get or update bookie readOnly state
     new 43397dc  Auditor should get the LegdgerManagerFactory from the client instance (#3011)
     new a80d043  Log NoLedgerException on debug level (#3117)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../main/java/org/apache/bookkeeper/proto/ReadLacProcessorV3.java | 4 ++--
 .../src/main/java/org/apache/bookkeeper/replication/Auditor.java  | 8 ++------
 2 files changed, 4 insertions(+), 8 deletions(-)

[bookkeeper] 01/02: Auditor should get the LegdgerManagerFactory from the client instance (#3011)

Posted by mm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 43397dcfdb1a48b109629dbb84c102609eebdca3
Author: Matteo Merli <mm...@apache.org>
AuthorDate: Wed Jan 26 10:48:45 2022 -0800

    Auditor should get the LegdgerManagerFactory from the client instance (#3011)
    
    * Auditor should get the LegdgerManagerFactory from the client instance
    
    * Removed unused import
---
 .../src/main/java/org/apache/bookkeeper/replication/Auditor.java  | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/Auditor.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/Auditor.java
index 2c61de3..38a8e39 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/Auditor.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/Auditor.java
@@ -89,7 +89,6 @@ import org.apache.bookkeeper.client.api.LedgerMetadata;
 import org.apache.bookkeeper.common.concurrent.FutureUtils;
 import org.apache.bookkeeper.conf.ClientConfiguration;
 import org.apache.bookkeeper.conf.ServerConfiguration;
-import org.apache.bookkeeper.meta.AbstractZkLedgerManagerFactory;
 import org.apache.bookkeeper.meta.LedgerManager;
 import org.apache.bookkeeper.meta.LedgerManager.LedgerRange;
 import org.apache.bookkeeper.meta.LedgerManager.LedgerRangeIterator;
@@ -480,10 +479,7 @@ public class Auditor implements AutoCloseable {
     private void initialize(ServerConfiguration conf, BookKeeper bkc)
             throws UnavailableException {
         try {
-            LedgerManagerFactory ledgerManagerFactory = AbstractZkLedgerManagerFactory
-                    .newLedgerManagerFactory(
-                        conf,
-                        bkc.getMetadataClientDriver().getLayoutManager());
+            LedgerManagerFactory ledgerManagerFactory = bkc.getLedgerManagerFactory();
             ledgerManager = ledgerManagerFactory.newLedgerManager();
             this.bookieLedgerIndexer = new BookieLedgerIndexer(ledgerManager);
 
@@ -503,7 +499,7 @@ public class Auditor implements AutoCloseable {
         } catch (CompatibilityException ce) {
             throw new UnavailableException(
                     "CompatibilityException while initializing Auditor", ce);
-        } catch (IOException | KeeperException ioe) {
+        } catch (KeeperException ioe) {
             throw new UnavailableException(
                     "Exception while initializing Auditor", ioe);
         } catch (InterruptedException ie) {

[bookkeeper] 02/02: Log NoLedgerException on debug level (#3117)

Posted by mm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit a80d0438c1beeabe1f477836c423d1d1981457b9
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 a3bc311..c7757bb 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
@@ -74,7 +74,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 (IOException e) {
             status = StatusCode.EIO;
             logger.error("IOException while performing readLac from ledger: {}", ledgerId);
@@ -89,7 +89,7 @@ class ReadLacProcessorV3 extends PacketProcessorBaseV3 implements Runnable {
             }
         } catch (Bookie.NoLedgerException e) {
             status = StatusCode.ENOLEDGER;
-            logger.error("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 (IOException e) {
             status = StatusCode.EIO;
             logger.error("IOException while trying to read last entry: {}", ledgerId, e);