You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2020/07/14 17:18:12 UTC

[GitHub] [hbase] huaxiangsun commented on a change in pull request #2062: HBASE-24705 MetaFixer#fixHoles() does not include the case for read r…

huaxiangsun commented on a change in pull request #2062:
URL: https://github.com/apache/hbase/pull/2062#discussion_r454515792



##########
File path: hbase-server/src/main/java/org/apache/hadoop/hbase/master/MetaFixer.java
##########
@@ -174,22 +177,35 @@ private static RegionInfo buildRegionInfo(TableName tn, byte [] start, byte [] e
   private static List<RegionInfo> createMetaEntries(final MasterServices masterServices,
     final List<RegionInfo> newRegionInfos) {
 
-    final List<Either<RegionInfo, IOException>> addMetaEntriesResults = newRegionInfos.stream()
+    final List<Either<List<RegionInfo>, IOException>> addMetaEntriesResults = newRegionInfos.stream()
       .map(regionInfo -> {
         try {
-          MetaTableAccessor.addRegionToMeta(masterServices.getConnection(), regionInfo);
-          masterServices.getAssignmentManager()
-            .getRegionStates()
-            .updateRegionState(regionInfo, RegionState.State.CLOSED);
-          return Either.<RegionInfo, IOException>ofLeft(regionInfo);
+          TableDescriptor td = masterServices.getTableDescriptors().get(regionInfo.getTable());
+
+          // Add replicas if needed
+          // we need to create regions with replicaIds starting from 1
+          List<RegionInfo> newRegions = RegionReplicaUtil.addReplicas(td,

Review comment:
       Ok, let me remove it.




----------------------------------------------------------------
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