[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-4601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17720823#comment-17720823
 ] 

Kezhu Wang commented on ZOOKEEPER-4601:
---------------------------------------

Mailing list discussion: 
https://lists.apache.org/thread/2tsg1hcopl80zot12tqrynrbg2h792jf

I made mistake in investigation.

{quote}
With chroot path "/zookeeper", getConfig will receive path "/config".
{quote}

This is not correct. {{getConfig}} watcher will receive no event with chroot
"/zookeeper" or "/zookeeper/config". The cause is dual:

* {{getConfig}} registers watch using path "/zookeeper/config".
* Event path "/zookeeper/config" is stripped to "/config" or "/" for chroot 
"/zookeeper" or "/zookeeper/config" accordingly. 
* Finally, the stripped path does not match registered path "/zookeeper/config"

So if we are going to pass "/zookeeper/config" to {{getConfig}} watchers, 
nothing break.

> Define getConfig Watcher behavior in chroot ZooKeeper
> -----------------------------------------------------
>
>                 Key: ZOOKEEPER-4601
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4601
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>            Reporter: Kezhu Wang
>            Assignee: Kezhu Wang
>            Priority: Blocker
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> After ZOOKEEPER-4565, {{getConfig}} watcher will receive path for zookeeper 
> config node "/zookeeper/config". But if the path {{getConfig}} watcher 
> received is somewhat sensitive to chroot path.
> * With chroot path "/zookeeper", {{getConfig}} will receive path "/config".
> * With other chroot paths, {{getConfig}} will receive path 
> "/zookeeper/config".
> I think we should define what path {{getConfig}} will get formally to avoid 
> unnoticed behavior.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to