From 3a7bda2cd1fdaaebe00130b34faf81c39f23e944 Mon Sep 17 00:00:00 2001 From: Zhihong Yu Date: Fri, 30 Sep 2011 03:08:38 +0000 Subject: [PATCH] HBASE-4212 TestMasterFailover fails occasionally (Gao Jinchao) git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1177488 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 1 + src/main/java/org/apache/hadoop/hbase/master/HMaster.java | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 3ecedec52c4..906efe1bcec 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -318,6 +318,7 @@ Release 0.92.0 - Unreleased HBASE-4513 NOTICES.txt refers to Facebook for Thrift HBASE-3130 [replication] ReplicationSource can't recover from session expired on remote clusters (Chris Trezzo via JD) + HBASE-4212 TestMasterFailover fails occasionally (Gao Jinchao) TESTS HBASE-4450 test for number of blocks read: to serve as baseline for expected diff --git a/src/main/java/org/apache/hadoop/hbase/master/HMaster.java b/src/main/java/org/apache/hadoop/hbase/master/HMaster.java index 270f3f362d4..f80d232f90e 100644 --- a/src/main/java/org/apache/hadoop/hbase/master/HMaster.java +++ b/src/main/java/org/apache/hadoop/hbase/master/HMaster.java @@ -559,6 +559,8 @@ implements HMasterInterface, HMasterRegionInterface, MasterServices, Server { if (!catalogTracker.verifyRootRegionLocation(timeout)) { this.assignmentManager.assignRoot(); this.catalogTracker.waitForRoot(); + //This guarantees that the transition has completed + this.assignmentManager.waitForAssignment(HRegionInfo.ROOT_REGIONINFO); assigned++; } else { // Region already assigned. We didnt' assign it. Add to in-memory state.