hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [hbase] thangTang commented on a change in pull request #1071: HBASE-23693 Split failure may cause region hole and data loss when use zk assign
Date Tue, 21 Jan 2020 04:08:45 GMT
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_r368803882
 
 

 ##########
 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:
   If we update the meta information later, we can only put it after the completion of execute
`openDaughters`. It is not very clear to me what impact this might have now. I may need more
detailed and comprehensive thinking. My idea is to merge this patch first, at least it can
solve most of the problems. Do you think it is okay? @wchevreuil 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message