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

Fix ordering in ZKWatcher constructor to prevent weird race condition

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.90.0
    • 0.90.0
    • Zookeeper
    • None
    • Reviewed

    Description

      A small race condition in ZKWatcher leads to an NPE:

      2010-09-30 10:56:36,028 INFO  [Thread-217] zookeeper.ZKUtil(93): hconnection opening connection to ZooKeeper with quorum (localhost:21815)
      2010-09-30 10:56:36,036 DEBUG [Thread-217-EventThread] zookeeper.ZooKeeperWatcher(184): hconnection Received ZooKeeper Event, type=None, state=SyncConnected, path=null
      2010-09-30 10:56:36,036 ERROR [Thread-217-EventThread] zookeeper.ClientCnxn$EventThread(490): Error while calling watcher 
      java.lang.NullPointerException
      	at org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.connectionEvent(ZooKeeperWatcher.java:243)
      	at org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.process(ZooKeeperWatcher.java:193)
      	at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:488)
      

      Attachments

        1. HBASE-3056-v1.patch
          0.9 kB
          Jonathan Gray

        Activity

          People

            streamy Jonathan Gray
            streamy Jonathan Gray
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: