lvfangmin commented on a change in pull request #1247: ZOOKEEPER-3713: ReadOnlyZooKeeperServer should not expose the uniniti… URL: https://github.com/apache/zookeeper/pull/1247#discussion_r378566391
########## File path: zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/QuorumPeer.java ########## @@ -1350,6 +1350,15 @@ public void run() { ServerMetrics.getMetrics().LOOKING_COUNT.add(1); if (Boolean.getBoolean("readonlymode.enabled")) { + if (!zkDb.isInitialized()) { Review comment: If there is issue before finishing syncing with leader, the proper behavior probably is exit instead of blocking here. Otherwise, it won't move forward even after the network issue recovered, let me know if I missed anything. ---------------------------------------------------------------- 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 With regards, Apache Git Services