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

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4.0, 0.98.20, 2.0.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      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.v1.txt
          1.0 kB
          Ted Yu
        2. 15803.v2.txt
          1 kB
          Ted Yu

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: