Skip to content

Commit

Permalink
HBASE-27251 Rolling back from 2.5.0-SNAPSHOT to 2.4.13 fails due to '…
Browse files Browse the repository at this point in the history
…File does not exist: /hbase/MasterData/data/master/store/.initialized/.regioninfo' Addendum (#4665)

Signed-off-by: Andrew Purtell <[email protected]>
  • Loading branch information
huaxiangsun authored Aug 1, 2022
1 parent b532987 commit e93ff10
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,12 @@ private static HRegion open(Configuration conf, TableDescriptor td, FileSystem f
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.
Expand Down

0 comments on commit e93ff10

Please sign in to comment.