You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2021/10/20 22:55:37 UTC

[hbase] branch branch-2 updated: HBASE-26383 HBCK incorrectly reports inconsistencies for recently split regions following a master failover (#3775)

This is an automated email from the ASF dual-hosted git repository.

apurtell pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2 by this push:
     new dce45ec  HBASE-26383 HBCK incorrectly reports inconsistencies for recently split regions following a master failover (#3775)
dce45ec is described below

commit dce45ec16a1d6406cb1386a2773d9497443fd56c
Author: Andrew Purtell <ap...@apache.org>
AuthorDate: Wed Oct 20 15:48:36 2021 -0700

    HBASE-26383 HBCK incorrectly reports inconsistencies for recently split regions following a master failover (#3775)
    
    A regression was introduced by HBASE-25847 which changed regionInfo#isParentSplit
    to regionState#isSplit. The region state after restart is CLOSED instead of SPLIT.
    We need to check both regionState and regionInfo for split status.
    
    Signed-off-by: Viraj Jasani <vj...@apache.org>
---
 .../src/main/java/org/apache/hadoop/hbase/master/HbckChore.java        | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HbckChore.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HbckChore.java
index 903f4ee..15a12ab 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HbckChore.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HbckChore.java
@@ -223,7 +223,8 @@ public class HbckChore extends ScheduledChore {
           .isTableState(regionInfo.getTable(), TableState.State.DISABLED)) {
         disabledTableRegions.add(regionInfo.getRegionNameAsString());
       }
-      if (regionState.isSplit()) {
+      // Check both state and regioninfo for split status, see HBASE-26383
+      if (regionState.isSplit() || regionInfo.isSplit()) {
         splitParentRegions.add(regionInfo.getRegionNameAsString());
       }
       HbckRegionInfo.MetaEntry metaEntry =