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 2022/09/14 05:14:42 UTC

[GitHub] [hbase] Apache9 commented on a diff in pull request #4664: HBASE-27250 MasterRpcService#setRegionStateInMeta does not support re…

Apache9 commented on code in PR #4664:
URL: https://github.com/apache/hbase/pull/4664#discussion_r970313973


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java:
##########
@@ -2479,32 +2481,47 @@ public SetRegionStateInMetaResponse setRegionStateInMeta(RpcController controlle
       for (RegionSpecifierAndState s : request.getStatesList()) {
         RegionSpecifier spec = s.getRegionSpecifier();
         String encodedName;
+        RegionInfo info;
+        int replicaId;
         if (spec.getType() == RegionSpecifierType.ENCODED_REGION_NAME) {
-          encodedName = spec.getValue().toStringUtf8();
+          info = this.server.getAssignmentManager()
+            .getRegionInfoFromEncodedRegionName(spec.getValue().toStringUtf8());
         } else {
-          // TODO: actually, a full region name can save a lot on meta scan, improve later.
-          encodedName = RegionInfo.encodeRegionName(spec.getValue().toByteArray());
+          info = CatalogFamilyFormat.parseRegionInfoFromRegionName(spec.getValue().toByteArray());

Review Comment:
   What I mean is we should always get the full region info from AM, but here the info is parsed from region name, where we may loss some fields. For example, the endKey field is not part of the region name.



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

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org