xyuanlu commented on code in PR #2465:
URL: https://github.com/apache/helix/pull/2465#discussion_r1188847626
##########
zookeeper-api/src/main/java/org/apache/helix/zookeeper/zkclient/ZkClient.java:
##########
@@ -2152,6 +2173,13 @@ public <T extends Object> T readData(String path, Stat
stat) {
@SuppressWarnings("unchecked")
public <T extends Object> T readData(final String path, final Stat stat,
final boolean watch) {
+ // Throws exception when try to subscribe watch when using
_usePersistWatcher. When ZkClient
+ // is subscribed as persist watcher, resubscribing the same object as onw
time watcher will
+ // over write the persist watcher causing missing following event.
+ if (_usePersistWatcher && watch) {
+ throw new IllegalArgumentException(
+ "Can not subscribe one time watcher when ZkClient is using
PersistWatcher");
+ }
Review Comment:
TFTR. Updated.
--
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]