fx19880617 commented on a change in pull request #6558: URL: https://github.com/apache/incubator-pinot/pull/6558#discussion_r574078438
########## File path: pinot-common/src/main/java/org/apache/pinot/common/utils/ZkStarter.java ########## @@ -154,18 +156,23 @@ public synchronized static ZookeeperInstance startLocalZkServer(final int port, public void run() { try { zookeeperServerMain.initializeAndRun(args); - } catch (QuorumPeerConfig.ConfigException e) { - LOGGER.warn("Caught exception while starting ZK", e); - } catch (IOException e) { + } catch (Exception e) { LOGGER.warn("Caught exception while starting ZK", e); } } }.start(); // Wait until the ZK server is started - ZkClient client = new ZkClient("localhost:" + port, 10000); - client.waitUntilConnected(10L, TimeUnit.SECONDS); - client.close(); + for (int i = 0; i < 10; i++) { Review comment: the reason is that new client will fail and throw exception if zk server is unreachable unlike the previous behavior to wait to connect. So we need to handle the catch exception and retry here. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org