HBASE-4792 SplitRegionHandler doesn't care if it deletes the znode or not,
leaves the parent region stuck offline git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1202487 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0ab2272833
commit
eb5e28e4e1
|
@ -87,9 +87,15 @@ public class SplitRegionHandler extends EventHandler implements TotesHRegionInfo
|
||||||
this.daughters.get(0), this.daughters.get(1));
|
this.daughters.get(0), this.daughters.get(1));
|
||||||
// Remove region from ZK
|
// Remove region from ZK
|
||||||
try {
|
try {
|
||||||
ZKAssign.deleteNode(this.server.getZooKeeper(),
|
|
||||||
|
boolean successful = false;
|
||||||
|
while (!successful) {
|
||||||
|
// It's possible that the RS tickles in between the reading of the
|
||||||
|
// znode and the deleting, so it's safe to retry.
|
||||||
|
successful = ZKAssign.deleteNode(this.server.getZooKeeper(),
|
||||||
this.parent.getEncodedName(),
|
this.parent.getEncodedName(),
|
||||||
EventHandler.EventType.RS_ZK_REGION_SPLIT);
|
EventHandler.EventType.RS_ZK_REGION_SPLIT);
|
||||||
|
}
|
||||||
} catch (KeeperException e) {
|
} catch (KeeperException e) {
|
||||||
server.abort("Error deleting SPLIT node in ZK for transition ZK node (" +
|
server.abort("Error deleting SPLIT node in ZK for transition ZK node (" +
|
||||||
parent.getEncodedName() + ")", e);
|
parent.getEncodedName() + ")", e);
|
||||||
|
|
|
@ -499,13 +499,13 @@ public class ZKAssign {
|
||||||
}
|
}
|
||||||
if (expectedVersion != -1
|
if (expectedVersion != -1
|
||||||
&& stat.getVersion() != expectedVersion) {
|
&& stat.getVersion() != expectedVersion) {
|
||||||
LOG.warn("The node we are trying to delete is not the expected one. " +
|
LOG.warn("The node " + regionName + " we are trying to delete is not" +
|
||||||
"Got a version mismatch");
|
" the expected one. Got a version mismatch");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(!ZKUtil.deleteNode(zkw, node, stat.getVersion())) {
|
if(!ZKUtil.deleteNode(zkw, node, stat.getVersion())) {
|
||||||
LOG.warn(zkw.prefix("Attempting to delete " +
|
LOG.warn(zkw.prefix("Attempting to delete " +
|
||||||
"unassigned node in " + expectedState +
|
"unassigned node " + regionName + " in " + expectedState +
|
||||||
" state but after verifying state, we got a version mismatch"));
|
" state but after verifying state, we got a version mismatch"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue