HBASE-1810 ConcurrentModificationException in region assignment

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@810597 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2009-09-02 16:38:03 +00:00
parent 9c1869648c
commit ea3b8028c9
2 changed files with 28 additions and 22 deletions

View File

@ -363,6 +363,8 @@ Release 0.20.0 - Unreleased
HBASE-1780 HTable.flushCommits clears write buffer in finally clause
HBASE-1784 Missing rows after medium intensity insert
HBASE-1809 NPE thrown in BoundedRangeFileInputStream
HBASE-1810 ConcurrentModificationException in region assignment
(Mathias Herberts via Stack)
IMPROVEMENTS
HBASE-1089 Add count of regions on filesystem to master UI; add percentage

View File

@ -425,6 +425,7 @@ class RegionManager implements HConstants {
return regionsToAssign; // dont assign anything to this server.
}
synchronized(regionsInTransition) {
for (RegionState s: regionsInTransition.values()) {
HRegionInfo i = s.getRegionInfo();
if (i == null) {
@ -440,6 +441,7 @@ class RegionManager implements HConstants {
regionsToAssign.add(s);
}
}
}
return regionsToAssign;
}
@ -834,6 +836,7 @@ class RegionManager implements HConstants {
// This might be expensive, but we need to make sure we dont
// get double assignment to the same regionserver.
synchronized(regionsInTransition) {
for (RegionState s : regionsInTransition.values()) {
if (s.getRegionInfo().isMetaRegion()
&& !s.isUnassigned()
@ -843,6 +846,7 @@ class RegionManager implements HConstants {
return true;
}
}
}
return false;
}