You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2018/01/17 15:07:25 UTC

[GitHub] jiazhai closed pull request #989: ISSUE #988: more log lines for replication status changes

jiazhai closed pull request #989: ISSUE #988: more log lines for replication status changes
URL: https://github.com/apache/bookkeeper/pull/989
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/ZkLedgerUnderreplicationManager.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/ZkLedgerUnderreplicationManager.java
index 35b76d5fd..3fa0dafc3 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/ZkLedgerUnderreplicationManager.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/ZkLedgerUnderreplicationManager.java
@@ -672,6 +672,8 @@ public void notifyLedgerReplicationEnabled(final GenericCallback<Void> cb)
         Watcher w = new Watcher() {
             public void process(WatchedEvent e) {
                 if (e.getType() == Watcher.Event.EventType.NodeDeleted) {
+                    LOG.info("LedgerReplication is enabled externally through Zookeeper, "
+                            + "since DISABLE_NODE ZNode is deleted");
                     cb.operationComplete(0, null);
                 }
             }
@@ -679,6 +681,8 @@ public void process(WatchedEvent e) {
         try {
             if (null == zkc.exists(basePath + '/'
                     + BookKeeperConstants.DISABLE_NODE, w)) {
+                LOG.info("LedgerReplication is enabled externally through Zookeeper, "
+                        + "since DISABLE_NODE ZNode is deleted");
                 cb.operationComplete(0, null);
                 return;
             }
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 453afdcd8..188ce71b2 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
@@ -419,6 +419,8 @@ private void waitIfLedgerReplicationDisabled() throws UnavailableException,
             InterruptedException {
         ReplicationEnableCb cb = new ReplicationEnableCb();
         if (!ledgerUnderreplicationManager.isLedgerReplicationEnabled()) {
+            LOG.info("LedgerReplication is disabled externally through Zookeeper, "
+                    + "since DISABLE_NODE ZNode is created, so waiting untill it is enabled");
             ledgerUnderreplicationManager.notifyLedgerReplicationEnabled(cb);
             cb.await();
         }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services