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

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1003196 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jonathan Gray 2010-09-30 18:22:28 +00:00
parent 7ce5812dfe
commit d2ce2b36e0
2 changed files with 3 additions and 1 deletions

View File

@ -554,6 +554,8 @@ Release 0.21.0 - Unreleased
(Nicolas Spiegelberg via Stack)
HBASE-3047 If new master crashes, restart is messy
HBASE-3054 Remore TestEmptyMetaInfo; it doesn't make sense any more.
HBASE-3056 Fix ordering in ZKWatcher constructor to prevent weird race
condition
IMPROVEMENTS
HBASE-1760 Cleanup TODOs in HTable

View File

@ -95,12 +95,12 @@ public class ZooKeeperWatcher implements Watcher {
Abortable abortable)
throws IOException {
this.quorum = ZKConfig.getZKQuorumServersString(conf);
this.zooKeeper = ZKUtil.connect(conf, quorum, this, descriptor);
// Identifier will get the sessionid appended later below down when we
// handle the syncconnect event.
this.identifier = descriptor;
this.abortable = abortable;
setNodeNames(conf);
this.zooKeeper = ZKUtil.connect(conf, quorum, this, descriptor);
try {
// Create all the necessary "directories" of znodes
// TODO: Move this to an init method somewhere so not everyone calls it?