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
This commit is contained in:
Jean-Daniel Cryans 2011-03-22 22:20:17 +00:00
parent ce86d7ca82
commit 75bbdd7397
2 changed files with 5 additions and 4 deletions

View File

@ -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

View File

@ -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(