You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by "dlg99 (via GitHub)" <gi...@apache.org> on 2023/02/22 23:46:03 UTC

[GitHub] [bookkeeper] dlg99 commented on a diff in pull request #3799: Support retry logic for auto recovery

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: commits-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org