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

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


The following commit(s) were added to refs/heads/branch-2.4 by this push:
     new e93ff10b014 HBASE-27251 Rolling back from 2.5.0-SNAPSHOT to 2.4.13 
fails due to 'File does not exist: 
/hbase/MasterData/data/master/store/.initialized/.regioninfo' Addendum (#4665)
e93ff10b014 is described below

commit e93ff10b014701a12cd56f9f4893b3f18b914beb
Author: huaxiangsun <[email protected]>
AuthorDate: Mon Aug 1 16:42:13 2022 -0700

    HBASE-27251 Rolling back from 2.5.0-SNAPSHOT to 2.4.13 fails due to 'File 
does not exist: /hbase/MasterData/data/master/store/.initialized/.regioninfo' 
Addendum (#4665)
    
    Signed-off-by: Andrew Purtell <[email protected]>
---
 .../java/org/apache/hadoop/hbase/master/region/MasterRegion.java    | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/region/MasterRegion.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/region/MasterRegion.java
index daf1e5d1de6..a4801c9dec3 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/region/MasterRegion.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/region/MasterRegion.java
@@ -225,6 +225,12 @@ public final class MasterRegion {
     FileSystem walFs, Path walRootDir, WALFactory walFactory, 
MasterRegionWALRoller walRoller,
     String serverName) throws IOException {
     Path tableDir = CommonFSUtils.getTableDir(rootDir, td.getTableName());
+    FileStatus[] nonRegionDirs = fs.listStatus(tableDir, p -> 
p.getName().startsWith("."));
+    if (nonRegionDirs.length > 0) {
+      LOG.warn("There are non-region directories under " + tableDir + ", such 
as "
+        + nonRegionDirs[0].getPath() + ", ignored");
+    }
+
     // on branch-2, the RegionInfo.isEncodedRegionName will returns true for 
.initializing and
     // .initialized, see HBASE-25368. Since RegionInfo is IA.Public, changing 
the implementation may
     // raise compatibility concerns, so here we just skip them by our own.

Reply via email to