dengzhhu653 commented on code in PR #6621:
URL: https://github.com/apache/hive/pull/6621#discussion_r3626234590


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/leader/LeaderElectionContext.java:
##########
@@ -117,6 +125,7 @@ public void start() throws Exception {
           throw new RuntimeException("Error claiming to be leader: " + 
leaderElection.getName(), e);
         }
       });
+      
daemon.setUncaughtExceptionHandler(newAbortOnElectionFailureHandler(leaderElection));

Review Comment:
   Thank you for the PR!
   
   If `startAsDaemon` is false, this hander might not be able to react to the 
election failure, an idea is to remove `daemon.run` in else branch, make every 
candidate run the election in their own thread.
   
   Also please take care of the error message in `HiveMetaStore`.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to