shangxinli commented on code in PR #20333:
URL: https://github.com/apache/hudi/pull/20333#discussion_r4297343163
##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieTableMetadataUtil.java:
##########
@@ -2462,8 +2462,23 @@ public static Map<String, HoodieMetadataFileInfo>
combineFileSystemMetadata(Hood
}
return null;
}
+ // Where a file lives never changes while it exists under the
same name, so the two
+ // records can only ever carry the same source partition path,
and taking whichever
+ // one is set is commutative. Two different paths means the name
was reused for a
+ // file elsewhere, which ordering cannot resolve either: pick
the same one whichever
+ // way the records arrive, so readers merging in different
orders at least agree.
+ String oldSourcePartitionPath =
oldFileInfo.getSourcePartitionPath();
+ String newSourcePartitionPath =
newFileInfo.getSourcePartitionPath();
+ String sourcePartitionPath =
Review Comment:
Keeping it inline — common case first and the conflict as an exception reads
fine, and a helper would still need the key just for the warning.
--
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]