Apache9 commented on a change in pull request #1840:
URL: https://github.com/apache/hbase/pull/1840#discussion_r434450351



##########
File path: 
hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java
##########
@@ -3355,8 +3354,10 @@ public static String 
toLockJson(List<LockServiceProtos.LockedResource> lockedRes
     if (proto.hasOffline()) {
       rib.setOffline(proto.getOffline());
     }
-    if (proto.hasRegionEncodedName()) {
-      rib.setEncodedName(proto.getRegionEncodedName());
+    org.apache.hadoop.hbase.client.RegionInfo ri = rib.build();
+    if (proto.hasRegionEncodedName() && 
!proto.getRegionEncodedName().equals(ri.getEncodedName())) {
+      LOG.warn("The converted region info is {}, but the encoded name in proto 
is {}", ri,

Review comment:
       The proto could be recevied from network so there is no guarantee that 
this will not happen?




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


Reply via email to