ivankelly commented on a change in pull request #1192: BP-29 (task 3): use 
metadata service uri for constructing registration client
URL: https://github.com/apache/bookkeeper/pull/1192#discussion_r170879150
 
 

 ##########
 File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/discover/ZKRegistrationClient.java
 ##########
 @@ -133,13 +122,15 @@ public void safeRun() {
         @Override
         public void accept(Versioned<Set<BookieSocketAddress>> bookieSet, 
Throwable throwable) {
             if (throwable != null) {
-                scheduleWatchTask(ZK_CONNECT_BACKOFF_MS);
-                firstRunFuture.completeExceptionally(throwable);
+                if (firstRunFuture.isDone()) {
 
 Review comment:
   ok, so the logic is basically, if the failure has been notified to the 
client, give up, otherwise retry.
   
   Really we should be using something like observables here, but that's not 
for this change. In any case, make the check and completion atomic as above, 
since we're dealing with multiple threads here.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to