Skip to content

Commit 6b78a3b

Browse files
committed
Comments a bit after review
1 parent cd03c72 commit 6b78a3b

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

curator-framework/src/main/java/org/apache/curator/framework/imps/GetConfigBuilderImpl.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,18 @@ public class GetConfigBuilderImpl
4040
private Stat stat;
4141

4242
public GetConfigBuilderImpl(CuratorFrameworkImpl client) {
43-
this.client = (CuratorFrameworkImpl) client.usingNamespace(null);
44-
this.watcherRemovalManager = client.getWatcherRemovalManager();
45-
backgrounding = new Backgrounding();
46-
watching = new Watching(this.client).setWatcherRemovalManager(watcherRemovalManager);
43+
this(client, new Backgrounding(), null, null);
4744
}
4845

4946
public GetConfigBuilderImpl(CuratorFrameworkImpl client, Backgrounding backgrounding, Watcher watcher, Stat stat) {
5047
this.client = (CuratorFrameworkImpl) client.usingNamespace(null);
5148
this.watcherRemovalManager = client.getWatcherRemovalManager();
5249
this.backgrounding = backgrounding;
50+
// We are using `client.usingNamespace(null)` to avoid `unfixNamespace` for "/zookeeper/config"(CURATOR-667)
51+
// events. But `client.usingNamespace(null)` will loss possible `WatcherRemovalManager`(CURATOR-710). So, let's
52+
// reset it.
53+
//
54+
// See also `NamespaceWatchedEvent`.
5355
this.watching = new Watching(this.client, watcher).setWatcherRemovalManager(watcherRemovalManager);
5456
this.stat = stat;
5557
}

0 commit comments

Comments
 (0)