From 75bbdd739762cd8a9700fee3e5ae1bef1596b09b Mon Sep 17 00:00:00 2001 From: Jean-Daniel Cryans Date: Tue, 22 Mar 2011 22:20:17 +0000 Subject: [PATCH] HBASE-3668 CatalogTracker.waitForMeta can wait forever and totally stall a RS git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1084377 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 1 + .../org/apache/hadoop/hbase/catalog/CatalogTracker.java | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 184a8e10c10..c35bc1ee08b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -161,6 +161,7 @@ Release 0.90.2 - Unreleased HBASE-3687 Bulk assign on startup should handle a ServerNotRunningException HBASE-3617 NoRouteToHostException during balancing will cause Master abort (Ted Yu via Stack) + HBASE-3668 CatalogTracker.waitForMeta can wait forever and totally stall a RS IMPROVEMENTS HBASE-3542 MultiGet methods in Thrift diff --git a/src/main/java/org/apache/hadoop/hbase/catalog/CatalogTracker.java b/src/main/java/org/apache/hadoop/hbase/catalog/CatalogTracker.java index b291936d0a0..08524c5ad6d 100644 --- a/src/main/java/org/apache/hadoop/hbase/catalog/CatalogTracker.java +++ b/src/main/java/org/apache/hadoop/hbase/catalog/CatalogTracker.java @@ -320,12 +320,12 @@ public class CatalogTracker { throws InterruptedException, IOException, NotAllMetaRegionsOnlineException { long stop = System.currentTimeMillis() + timeout; synchronized (metaAvailable) { - if (getMetaServerConnection(true) != null) { - return metaLocation; - } while(!stopped && !metaAvailable.get() && (timeout == 0 || System.currentTimeMillis() < stop)) { - metaAvailable.wait(timeout); + if (getMetaServerConnection(true) != null) { + return metaLocation; + } + metaAvailable.wait(timeout == 0 ? 50 : timeout); } if (getMetaServerConnection(true) == null) { throw new NotAllMetaRegionsOnlineException(