HBASE-5094 The META can hold an entry for a region with a different server name from the one actually in the AssignmentManager thus making the region inaccessible. (Ram)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1226165 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
453de3a66c
commit
ebc3945450
|
@ -468,6 +468,8 @@ Release 0.92.0 - Unreleased
|
||||||
HBASE-5100 Rollback of split could cause closed region to be opened again (Chunhui)
|
HBASE-5100 Rollback of split could cause closed region to be opened again (Chunhui)
|
||||||
HBASE-4397 -ROOT-, .META. tables stay offline for too long in recovery phase after all RSs
|
HBASE-4397 -ROOT-, .META. tables stay offline for too long in recovery phase after all RSs
|
||||||
are shutdown at the same time (Ming Ma)
|
are shutdown at the same time (Ming Ma)
|
||||||
|
HBASE-5094 The META can hold an entry for a region with a different server name from the one
|
||||||
|
actually in the AssignmentManager thus making the region inaccessible. (Ram)
|
||||||
|
|
||||||
TESTS
|
TESTS
|
||||||
HBASE-4450 test for number of blocks read: to serve as baseline for expected
|
HBASE-4450 test for number of blocks read: to serve as baseline for expected
|
||||||
|
|
|
@ -79,6 +79,7 @@ import org.apache.hadoop.hbase.UnknownScannerException;
|
||||||
import org.apache.hadoop.hbase.YouAreDeadException;
|
import org.apache.hadoop.hbase.YouAreDeadException;
|
||||||
import org.apache.hadoop.hbase.catalog.CatalogTracker;
|
import org.apache.hadoop.hbase.catalog.CatalogTracker;
|
||||||
import org.apache.hadoop.hbase.catalog.MetaEditor;
|
import org.apache.hadoop.hbase.catalog.MetaEditor;
|
||||||
|
import org.apache.hadoop.hbase.catalog.MetaReader;
|
||||||
import org.apache.hadoop.hbase.catalog.RootLocationEditor;
|
import org.apache.hadoop.hbase.catalog.RootLocationEditor;
|
||||||
import org.apache.hadoop.hbase.client.Action;
|
import org.apache.hadoop.hbase.client.Action;
|
||||||
import org.apache.hadoop.hbase.client.Append;
|
import org.apache.hadoop.hbase.client.Append;
|
||||||
|
@ -2636,9 +2637,19 @@ public class HRegionServer implements HRegionInterface, HBaseRPCErrorHandler,
|
||||||
checkIfRegionInTransition(region, OPEN);
|
checkIfRegionInTransition(region, OPEN);
|
||||||
HRegion onlineRegion = this.getFromOnlineRegions(region.getEncodedName());
|
HRegion onlineRegion = this.getFromOnlineRegions(region.getEncodedName());
|
||||||
if (null != onlineRegion) {
|
if (null != onlineRegion) {
|
||||||
LOG.warn("Attempted open of " + region.getEncodedName()
|
// See HBASE-5094. Cross check with META if still this RS is owning the
|
||||||
+ " but already online on this server");
|
// region.
|
||||||
return RegionOpeningState.ALREADY_OPENED;
|
Pair<HRegionInfo, ServerName> p = MetaReader.getRegion(
|
||||||
|
this.catalogTracker, region.getRegionName());
|
||||||
|
if (this.getServerName().equals(p.getSecond())) {
|
||||||
|
LOG.warn("Attempted open of " + region.getEncodedName()
|
||||||
|
+ " but already online on this server");
|
||||||
|
return RegionOpeningState.ALREADY_OPENED;
|
||||||
|
} else {
|
||||||
|
LOG.warn("The region " + region.getEncodedName()
|
||||||
|
+ " is online on this server but META does not have this server.");
|
||||||
|
this.removeFromOnlineRegions(region.getEncodedName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
LOG.info("Received request to open region: " +
|
LOG.info("Received request to open region: " +
|
||||||
region.getRegionNameAsString());
|
region.getRegionNameAsString());
|
||||||
|
|
Loading…
Reference in New Issue