dlg99 commented on code in PR #3799:
URL: https://github.com/apache/bookkeeper/pull/3799#discussion_r1115095866


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/AuditorElector.java:
##########
@@ -191,8 +192,14 @@ public void run() {
                         Thread.currentThread().interrupt();
                         submitShutdownTask();
                     } catch (Exception e) {
-                        LOG.error("Exception while performing auditor 
election", e);
-                        submitShutdownTask();
+                        if (e.getCause() instanceof 
KeeperException.ConnectionLossException

Review Comment:
   IIRC ConnectionLoss is a non-recoverable exception.
   To handle it properly, one has to re-create ZK client and deal with the 
watchers/cached state. Ephemeral nodes expire as result of such error too.
   Re-initializing the client at random place when error happens is a rather 
big chunk of work IIRC and it easier to bounce the service in this case, hence 
https://github.com/apache/bookkeeper/pull/3374 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to