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 2021/11/08 18:13:23 UTC

[GitHub] [hbase] gjacoby126 commented on a change in pull request #3826: HBASE-26433 Rollback from ZK-less to ZK-based assignment could produce inconsistent state - doubly assigned regions

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



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

Review comment:
       Might be good to encapsulate this check within a new method in ConfigUtil, since it's being used in three places already in this patch and it would be easy for a future patch to just check ConfigUtil.useZKForAssignment and not think about the migrating case. 




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