HBASE-1508 Shell 'close_region' reveals a Master<>HRS problem, regions are not reassigned

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@787444 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2009-06-22 23:39:03 +00:00
parent 7037a0f740
commit fdf64a3988
2 changed files with 9 additions and 6 deletions

View File

@ -214,6 +214,8 @@ Release 0.20.0 - Unreleased
HBASE-1561 HTable Mismatch between javadoc and what it actually does
HBASE-1558 deletes use 'HConstants.LATEST_TIMESTAMP' but no one translates
that into 'now'
HBASE-1508 Shell "close_region" reveals a Master<>HRS problem, regions are
not reassigned
IMPROVEMENTS
HBASE-1089 Add count of regions on filesystem to master UI; add percentage

View File

@ -349,14 +349,15 @@ abstract class BaseScanner extends Chore implements HConstants {
}
HServerInfo storedInfo = null;
synchronized (this.master.regionManager) {
/*
* We don't assign regions that are offline, in transition or were on
* a dead server. Regions that were on a dead server will get reassigned
* by ProcessServerShutdown
/* We don't assign regions that are offline, in transition or were on
* a dead server (unless they have an empty serverName which would imply
* they haven't been assigned in the first place OR it was closed from
* the shell with 'close_region' which deletes server and startcode
* from .META. so region gets reassigned). Regions that were on a dead
* server will get reassigned by ProcessServerShutdown
*/
if (info.isOffline() ||
this.master.regionManager.
regionIsInTransition(info.getRegionNameAsString()) ||
(serverName != null && this.master.regionManager.regionIsInTransition(info.getRegionNameAsString())) ||
(serverName != null && this.master.serverManager.isDead(serverName))) {
return;
}