HBASE-22477 Throwing exception when meta region is not in OPEN state in client registry may crash a master
This commit is contained in:
parent
4157d1e3cd
commit
1b3914067e
|
@ -158,9 +158,7 @@ class ZKAsyncRegistry implements AsyncRegistry {
|
||||||
}
|
}
|
||||||
Pair<RegionState.State, ServerName> stateAndServerName = getStateAndServerName(proto);
|
Pair<RegionState.State, ServerName> stateAndServerName = getStateAndServerName(proto);
|
||||||
if (stateAndServerName.getFirst() != RegionState.State.OPEN) {
|
if (stateAndServerName.getFirst() != RegionState.State.OPEN) {
|
||||||
future.completeExceptionally(
|
LOG.warn("Meta region is in state " + stateAndServerName.getFirst());
|
||||||
new IOException("Meta region is in state " + stateAndServerName.getFirst()));
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
locs[DEFAULT_REPLICA_ID] = new HRegionLocation(
|
locs[DEFAULT_REPLICA_ID] = new HRegionLocation(
|
||||||
getRegionInfoForDefaultReplica(FIRST_META_REGIONINFO), stateAndServerName.getSecond());
|
getRegionInfoForDefaultReplica(FIRST_META_REGIONINFO), stateAndServerName.getSecond());
|
||||||
|
|
Loading…
Reference in New Issue