HBASE-10633. StoreFileRefresherChore throws ConcurrentModificationException sometimes

git-svn-id: https://svn.apache.org/repos/asf/hbase/branches/hbase-10070@1572808 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Devaraj Das 2014-02-28 02:48:17 +00:00 committed by Enis Soztutar
parent c997c3311e
commit aed0216810
1 changed files with 5 additions and 2 deletions

View File

@ -20,6 +20,7 @@ package org.apache.hadoop.hbase.regionserver;
import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import org.apache.commons.logging.Log;
@ -104,9 +105,11 @@ public class StorefileRefresherChore extends Chore {
}
// remove closed regions
for (String encodedName : lastRefreshTimes.keySet()) {
Iterator<String> lastRefreshTimesIter = lastRefreshTimes.keySet().iterator();
while (lastRefreshTimesIter.hasNext()) {
String encodedName = lastRefreshTimesIter.next();
if (regionServer.getFromOnlineRegions(encodedName) == null) {
lastRefreshTimes.remove(encodedName);
lastRefreshTimesIter.remove();
}
}
}