Fix ordering in ZKWatcher constructor to prevent weird race condition
---------------------------------------------------------------------

                 Key: HBASE-3056
                 URL: https://issues.apache.org/jira/browse/HBASE-3056
             Project: HBase
          Issue Type: Bug
          Components: zookeeper
    Affects Versions: 0.90.0
            Reporter: Jonathan Gray
            Assignee: Jonathan Gray
             Fix For: 0.90.0


A small race condition in ZKWatcher leads to an NPE:

{noformat}
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)
{noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to