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-unsubscr...@hbase.apache.org

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

Reply via email to