CTTY commented on code in PR #13323:
URL: https://github.com/apache/hudi/pull/13323#discussion_r2100786780


##########
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:
   `getCachedCommitMetadata(instant)` already handles cache miss, is this what 
you are looking for? 
https://github.com/apache/hudi/pull/13323/files/33c3a01a07ae810e78f6843c7e78e3b7dd35cd4c#diff-79515156c9d8e0421cea5a397ea00bbff098dd9c9c04afa57ba1ba3abf0f2f7bR453



-- 
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]

Reply via email to