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 2022/02/18 12:50:15 UTC
[GitHub] [hbase] Apache9 commented on a change in pull request #4111: HBASE-26640 Reimplement master local region initialization to better …
Apache9 commented on a change in pull request #4111:
URL: https://github.com/apache/hbase/pull/4111#discussion_r809969928
##########
File path: hbase-server/src/main/java/org/apache/hadoop/hbase/master/region/MasterRegion.java
##########
@@ -287,6 +303,39 @@ private static void replayWALs(Configuration conf, FileSystem walFs, Path walRoo
}
}
+ private static void tryMigrate(Configuration conf, FileSystem fs, Path tableDir,
+ RegionInfo regionInfo, TableDescriptor oldTd, TableDescriptor newTd) throws IOException {
+ Class<? extends StoreFileTracker> oldSft =
+ StoreFileTrackerFactory.getTrackerClass(oldTd.getValue(StoreFileTrackerFactory.TRACKER_IMPL));
+ Class<? extends StoreFileTracker> newSft =
+ StoreFileTrackerFactory.getTrackerClass(newTd.getValue(StoreFileTrackerFactory.TRACKER_IMPL));
+ if (oldSft.equals(newSft)) {
+ LOG.debug("old store file tracker {} is the same with new store file tracker, skip migration",
+ StoreFileTrackerFactory.getStoreFileTrackerName(oldSft));
+ if (!oldSft.equals(newSft)) {
+ // we may change other things such as adding a new family, so here we still need to persist
+ // the new table descriptor
+ LOG.info("Update table descriptor from {} to {}", oldTd, newTd);
+ FSTableDescriptors.createTableDescriptorForTableDirectory(fs, tableDir, newTd, true);
+ }
Review comment:
Ah, typo, it should be `!oldTd.equals(newTd)`
Thanks for the careful review!
--
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