thangTang commented on a change in pull request #1071: HBASE-23693 Split
failure may cause region hole and data loss when use zk assign
URL: https://github.com/apache/hbase/pull/1071#discussion_r368633701
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionStates.java
##########
@@ -758,8 +764,20 @@ public void regionOffline(
// Delete the ZNode if exists
ZKAssign.deleteNodeFailSilent(watcher, region);
regionsToOffline.add(region);
+ PairOfSameType<HRegionInfo> daughterRegions =
+
MetaTableAccessor.getDaughterRegionsFromParent(this.server.getConnection(),
region);
+ if (daughterRegions != null) {
+ if (daughterRegions.getFirst() != null) {
+
daughter2Parent.put(daughterRegions.getFirst().getEncodedName(), region);
+ }
+ if (daughterRegions.getSecond() != null) {
+
daughter2Parent.put(daughterRegions.getSecond().getEncodedName(), region);
+ }
+ }
} catch (KeeperException ke) {
server.abort("Unexpected ZK exception deleting node " + region,
ke);
+ } catch (IOException e) {
+ LOG.warn("get daughter from meta exception " + region, e);
Review comment:
Yes, but at this time(after createDaughters call completed inside
SplitTransactionImpl.execute) the split transaction is still not entirely
complete.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services