kezhuw commented on code in PR #2068: URL: https://github.com/apache/zookeeper/pull/2068#discussion_r1338249819
########## zookeeper-server/src/main/java/org/apache/zookeeper/ZooKeeper.java: ########## @@ -2708,6 +2708,31 @@ public void getEphemerals(AsyncCallback.EphemeralsCallback cb, Object ctx) { getEphemerals("/", cb, ctx); } + /** + * Synchronous sync. Flushes channel between process and leader. + * + * @param path the given path + * @throws KeeperException If the server signals an error with a non-zero error code + * @throws InterruptedException If the server transaction is interrupted. + * @throws IllegalArgumentException if an invalid path is specified + */ + public void sync(final String path) throws KeeperException, InterruptedException { Review Comment: Yeh, it does no take effect since day one of `sync`. ZOOKEEPER-3414(#1187) proposed to error on no node. I think we should keep it until we have conclusion about that and semantics of sync path. Otherwise, if ZOOKEEPER-3414 is delivered in future, the `sync` with no path could fail due to `chroot` is not required to be existed in data tree. At the least, I think it is a separate issue and we should keep consistent between two versions of `sync`. -- 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: notifications-unsubscr...@zookeeper.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org