Description
EnsembleTracker registers a watch on /zookeeper/config (via GetConfigBuilderImpl). It uses WatcherRemovalManager to automatically remove this watch when closed. In Curator 5.6.0 this mechanism broke, and the watch no longer gets removed when EnsembleTracker is closed.
Technical details
To enable the WatcherRemovalManager, EnsembleTracker wraps its client in a WatcherRemovalFacade here: code. It passes this wrapped client to GetConfigBuilderImpl. In Curator 5.5.0 and earlier, GetConfigBuilderImpl would use this client directly. But since #474 got merged into 5.6.0, it calls client.usingNamespace() which returns a NamespaceFacade that wraps the underlying CuratorFrameworkImpl client. So now when GetConfigBuilderImpl adds a watch through its client, that call no longer passed through WatcherRemovalManager. And when EnsembleTracker calls client.removeWatchers() on close, the WatcherRemovalManager doesn't remove the watch anymore because it isn't aware that it exists.
Attachments
Issue Links
- is caused by
-
CURATOR-667 Background `getConfig` and `reconfig` could deliver abnormal path
- Resolved