clintropolis commented on a change in pull request #6740: Zookeeper loss
URL: https://github.com/apache/incubator-druid/pull/6740#discussion_r254080462
 
 

 ##########
 File path: server/src/main/java/org/apache/druid/curator/CuratorModule.java
 ##########
 @@ -127,6 +154,29 @@ public EnsembleProvider 
makeEnsembleProvider(CuratorConfig config, ExhibitorConf
       return new FixedEnsembleProvider(config.getZkHosts());
     }
 
+    RetryPolicy retryPolicy;
+    if (config.getTerminateDruidProcess()) {
+      final Function<Void, Void> exitFunction = new Function<Void, Void>()
+      {
+        @Override
+        public Void apply(Void aVoid)
+        {
+          log.error("Zookeeper can't be reached, forcefully stopping virtual 
machine...");
+          System.exit(1);
 
 Review comment:
   Ok, have looked at this a bit more, and I think it might not matter if 
`lifecycle.stop` is called here (or in the other killer) because _I think_ it 
will probably get picked up and called by the shutdown hook if `System.exit(1)` 
is called directly here. 
   
   I think it would be nice if these retry killer logic blocks were self 
consistent at least, either both calling `lifecycle.stop` explicitly to be sure 
it gets called, or neither calling it and counting on the shutdown hook, but if 
@leventov is ok with this as is I don't feel strongly enough to block merging 
and my review can be counted as a +1

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

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

Reply via email to