Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-15803

ZooKeeperWatcher's constructor can leak a ZooKeeper instance with throwing ZooKeeperConnectionException when canCreateBaseZNode is true

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.4.0, 0.98.20, 2.0.0
    • None
    • None
    • Reviewed

    Description

        public ZooKeeperWatcher(Configuration conf, String identifier,
            Abortable abortable, boolean canCreateBaseZNode)
        throws IOException, ZooKeeperConnectionException {
      ...skip...
          this.recoverableZooKeeper = ZKUtil.connect(...
      ...skip...
          if (canCreateBaseZNode) {
            createBaseZNodes();
          }
        }
      
        private void createBaseZNodes() throws ZooKeeperConnectionException {
      

      The registered watcher doesn't seem to close the Zookeeper instance by watch events, and the instance keeps alive when createBaseZNodes is failed.

      Attachments

        1. 15803.v2.txt
          1 kB
          Ted Yu
        2. 15803.v1.txt
          1.0 kB
          Ted Yu

        Activity

          People

            yuzhihong@gmail.com Ted Yu
            ikeda Hiroshi Ikeda
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: