You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by si...@apache.org on 2018/06/07 06:03:55 UTC

[bookkeeper] branch master updated: [TABLE SERVICE] dlog configuration settings are not propagated

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

sijie 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 3a663e4  [TABLE SERVICE] dlog configuration settings are not propagated
3a663e4 is described below

commit 3a663e491e92c4f329dfde091f937f41dbb2cace
Author: Sijie Guo <si...@apache.org>
AuthorDate: Wed Jun 6 23:03:48 2018 -0700

    [TABLE SERVICE] dlog configuration settings are not propagated
    
    Descriptions of the changes in this PR:
    
    *Motivation*
    
    When stream storage server starts the bookie watcher service, it waits for at least `ensembleSize` bookies
    available before starting other components. However the dlog settings are not propagated correctly. so when
    using this component in an environment that only has 1 bookie (e.g. pulsar standalone). Startup will be hanging
    on waiting 3 bookies.
    
    *Solution*
    
    load the dlog settings from the base configuration.
    
    Author: Sijie Guo <si...@apache.org>
    
    Reviewers: Enrico Olivelli <eo...@gmail.com>, Jia Zhai <None>
    
    This closes #1486 from sijie/fix_loading_dlog_configuration
---
 .../main/java/org/apache/bookkeeper/stream/server/StorageServer.java | 1 +
 .../apache/bookkeeper/stream/server/service/BookieWatchService.java  | 5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/stream/server/src/main/java/org/apache/bookkeeper/stream/server/StorageServer.java b/stream/server/src/main/java/org/apache/bookkeeper/stream/server/StorageServer.java
index e0774de..ad8491e 100644
--- a/stream/server/src/main/java/org/apache/bookkeeper/stream/server/StorageServer.java
+++ b/stream/server/src/main/java/org/apache/bookkeeper/stream/server/StorageServer.java
@@ -226,6 +226,7 @@ public class StorageServer {
         BookieWatchService bkWatchService;
         {
             DistributedLogConfiguration dlogConf = new DistributedLogConfiguration();
+            dlogConf.loadConf(dlConf);
             bkWatchService = new BookieWatchService(
                 dlogConf.getEnsembleSize(),
                 bkConf,
diff --git a/stream/server/src/main/java/org/apache/bookkeeper/stream/server/service/BookieWatchService.java b/stream/server/src/main/java/org/apache/bookkeeper/stream/server/service/BookieWatchService.java
index cfac0da..5a645d3 100644
--- a/stream/server/src/main/java/org/apache/bookkeeper/stream/server/service/BookieWatchService.java
+++ b/stream/server/src/main/java/org/apache/bookkeeper/stream/server/service/BookieWatchService.java
@@ -81,8 +81,9 @@ public class BookieWatchService
         while (bookies.size() < minNumBookies) {
             TimeUnit.SECONDS.sleep(1);
             bookies = FutureUtils.result(client.getWritableBookies()).getValue();
-            log.info("Only {} bookies are live since {} seconds elapsed, wait for another 1 second",
-                bookies.size(), stopwatch.elapsed(TimeUnit.SECONDS));
+            log.info("Only {} bookies are live since {} seconds elapsed, "
+                + "wait for another {} bookies for another 1 second",
+                bookies.size(), minNumBookies - bookies.size(), stopwatch.elapsed(TimeUnit.SECONDS));
         }
     }
 

-- 
To stop receiving notification emails like this one, please contact
sijie@apache.org.