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:
parent
c997c3311e
commit
aed0216810
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue