abhiips07 commented on code in PR #13323:
URL: https://github.com/apache/hudi/pull/13323#discussion_r2099828019
##########
hudi-common/src/main/java/org/apache/hudi/common/table/TableSchemaResolver.java:
##########
@@ -344,13 +344,7 @@ public Option<InternalSchema>
getTableInternalSchemaFromCommitMetadata() {
HoodieTimeline completedInstants =
metaClient.getActiveTimeline().getCommitsTimeline().filterCompletedInstants();
HoodieTimeline timeline = completedInstants
.filter(instant -> { // consider only instants that can update/change
schema.
- try {
- HoodieCommitMetadata commitMetadata =
- completedInstants.readCommitMetadata(instant);
- return
WriteOperationType.canUpdateSchema(commitMetadata.getOperationType());
- } catch (IOException e) {
- throw new HoodieIOException(String.format("Failed to fetch
HoodieCommitMetadata for instant (%s)", instant), e);
- }
+ return
WriteOperationType.canUpdateSchema(getCachedCommitMetadata(instant).getOperationType());
Review Comment:
imo we should add fallback if the cache lookup fails, it falls back to
reading metadata from disk
--
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]