You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by anmolnar <gi...@git.apache.org> on 2018/07/09 09:43:53 UTC
[GitHub] zookeeper pull request #562: [ZOOKEEPER-3084] Exit when ZooKeeper cannot bin...
Github user anmolnar commented on a diff in the pull request:
https://github.com/apache/zookeeper/pull/562#discussion_r200941862
--- Diff: src/java/main/org/apache/zookeeper/server/quorum/QuorumCnxManager.java ---
@@ -905,6 +908,12 @@ public void run() {
+ "I won't be able to participate in leader "
+ "election any longer: "
+ self.getElectionAddress());
+ if (exitException instanceof BindException) {
+ // After leaving listener thread, the host cannot join the
+ // quorum anymore, this is a severe error that we cannot
+ // recover from, so we need to exit
+ System.exit(14);
--- End diff --
It would be great to track these exit codes at a common place somewhere. Would you mind creating constant fields for them?
If there're too many, we might want to create a separate Jira for the refactoring.
Documenting them would also be very helpful. It seems like we don't list them in the docs yet, so that might also be part of the new Jira.
---