Uploaded image for project: 'Apache Curator'
  1. Apache Curator
  2. CURATOR-710

EnsembleTracker leaking watch

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 5.6.0
    • 5.8.0
    • Framework
    • None

    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

          Activity

            People

              Unassigned Unassigned
              wiho Jochem Wichers Hoeth
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: