wchevreuil commented on code in PR #8013:
URL: https://github.com/apache/hbase/pull/8013#discussion_r3195760094
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/RestoreSnapshotHelper.java:
##########
@@ -504,17 +504,19 @@ private void restoreRegion(final RegionInfo regionInfo,
// Restore families present in the table
for (Path familyDir : FSUtils.getFamilyDirs(fs, regionDir)) {
byte[] family = Bytes.toBytes(familyDir.getName());
- ColumnFamilyDescriptor familyDescriptor =
ColumnFamilyDescriptorBuilder.of(family);
- StoreFileTracker tracker = StoreFileTrackerFactory.create(conf, true,
- StoreContext.getBuilder().withColumnFamilyDescriptor(familyDescriptor)
-
.withFamilyStoreDirectoryPath(familyDir).withRegionFileSystem(regionFS).build());
- List<StoreFileInfo> storeFileInfos = tracker.load();
- List<String> familyFiles = storeFileInfos.stream()
- .map(storeFileInfo ->
storeFileInfo.getPath().getName()).collect(Collectors.toList());
+
+ Set<String> familyFiles = getTableRegionFamilyFiles(familyDir);
List<SnapshotRegionManifest.StoreFile> snapshotFamilyFiles =
snapshotFiles.remove(familyDir.getName());
- List<StoreFileInfo> filesToTrack = new ArrayList<>();
if (snapshotFamilyFiles != null) {
+ // Family exists in the snapshot, create tracker with merged table
descriptor config
+ // so that table-level settings are picked up.
Review Comment:
nit: Let's make clear that tableDesc here means the one recovered from the
snapshot manifest. This means if current SFT config in the table is different
from the snapshot one, it will be overwritten.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]