HBASE-10155 HRegion isRecovering state is wrongly coming in postOpen hook
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1550880 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5fd25ffbc0
commit
b5199318fa
|
@ -543,6 +543,13 @@ public class HRegion implements HeapSize { // , Writable{
|
|||
this.coprocessorHost = new RegionCoprocessorHost(this, rsServices, conf);
|
||||
this.metricsRegionWrapper = new MetricsRegionWrapperImpl(this);
|
||||
this.metricsRegion = new MetricsRegion(this.metricsRegionWrapper);
|
||||
|
||||
Map<String, HRegion> recoveringRegions = rsServices.getRecoveringRegions();
|
||||
String encodedName = getRegionInfo().getEncodedName();
|
||||
if (recoveringRegions != null && recoveringRegions.containsKey(encodedName)) {
|
||||
this.isRecovering = true;
|
||||
recoveringRegions.put(encodedName, this);
|
||||
}
|
||||
} else {
|
||||
this.metricsRegionWrapper = null;
|
||||
this.metricsRegion = null;
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
package org.apache.hadoop.hbase.regionserver.handler;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
@ -142,15 +141,6 @@ public class OpenRegionHandler extends EventHandler {
|
|||
return;
|
||||
}
|
||||
|
||||
// check if we need set current region in recovering state
|
||||
region.setRecovering(false);
|
||||
Map<String, HRegion> recoveringRegions = this.rsServices.getRecoveringRegions();
|
||||
if (recoveringRegions != null && !recoveringRegions.isEmpty()
|
||||
&& recoveringRegions.containsKey(region.getRegionInfo().getEncodedName())) {
|
||||
region.setRecovering(true);
|
||||
recoveringRegions.put(region.getRegionInfo().getEncodedName(), region);
|
||||
}
|
||||
|
||||
boolean failed = true;
|
||||
if (tickleOpening("post_region_open")) {
|
||||
if (updateMeta(region)) {
|
||||
|
|
Loading…
Reference in New Issue