bvaradar commented on code in PR #11271:
URL: https://github.com/apache/hudi/pull/11271#discussion_r1610840996
##########
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:
Yes, found during testing the 0.14.x writer with 1.x reader testing for a
newly created 0.14.x table. LSMTimeline#latestSnapshotVersion was calling
LSMTimeline#allSnapshotVersions due to the absence of latest snapshot version
file.
--
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]