virajjasani commented on a change in pull request #3826:
URL: https://github.com/apache/hbase/pull/3826#discussion_r745027686



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionStateStore.java
##########
@@ -73,9 +73,11 @@
    * @return A ServerName instance or {@link HRegionInfo#getServerName(Result)}
    * if necessary fields not found or empty.
    */
-  static ServerName getRegionServer(final Result r, int replicaId) {
+  static ServerName getRegionServer(final Result r, int replicaId, 
Configuration config) {
     Cell cell = r.getColumnLatestCell(HConstants.CATALOG_FAMILY, 
getServerNameColumn(replicaId));
-    if (cell == null || cell.getValueLength() == 0) {
+    boolean isZKAssignmentInUse = ConfigUtil.useZKForAssignment(config) && 
!config
+      .getBoolean("hbase.assignment.usezk.migrating", false);
+    if (cell == null || cell.getValueLength() == 0 || isZKAssignmentInUse) {

Review comment:
       The intention is:
   if (migrating to non-zk or enabled non-zk) => use `info:sn` if available, 
else use `info:server` as usual.
   if (usezk) => never use `info:sn`, hence `isZKAssignmentInUse` is added with 
`||` condition so that if condition will always be true even if `info:sn` has 
non-empty value for ZK based assignment.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to