danny0405 commented on code in PR #11271:
URL: https://github.com/apache/hudi/pull/11271#discussion_r1610818043
##########
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/LSMTimeline.java:
##########
@@ -158,13 +159,18 @@ public static int
latestSnapshotVersion(HoodieTableMetaClient metaClient) throws
LOG.warn("Error reading version file {}", versionFilePath, e);
}
}
+
return
allSnapshotVersions(metaClient).stream().max(Integer::compareTo).orElse(-1);
}
/**
* Returns all the valid snapshot versions.
*/
public static List<Integer> allSnapshotVersions(HoodieTableMetaClient
metaClient) throws IOException {
+ StoragePath archivedFolderPath = new
StoragePath(metaClient.getArchivePath());
Review Comment:
I search around the invokers, one is archive `LSMTimelineWriter#clean` and
another is `LSMTimeline#`latestSnapshotVersion, both would ensure the archving
already happens, is this a case specific for backward compatibility?
##########
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/LSMTimeline.java:
##########
@@ -158,13 +159,18 @@ public static int
latestSnapshotVersion(HoodieTableMetaClient metaClient) throws
LOG.warn("Error reading version file {}", versionFilePath, e);
}
}
+
return
allSnapshotVersions(metaClient).stream().max(Integer::compareTo).orElse(-1);
}
/**
* Returns all the valid snapshot versions.
*/
public static List<Integer> allSnapshotVersions(HoodieTableMetaClient
metaClient) throws IOException {
+ StoragePath archivedFolderPath = new
StoragePath(metaClient.getArchivePath());
Review Comment:
I search around the invokers, one is archive `LSMTimelineWriter#clean` and
another is `LSMTimeline#latestSnapshotVersion`, both would ensure the archving
already happens, is this a case specific for backward compatibility?
--
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]