nbalajee commented on code in PR #9035:
URL: https://github.com/apache/hudi/pull/9035#discussion_r1255223000
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/io/HoodieMergeHandle.java:
##########
@@ -192,10 +192,17 @@ private void init(String fileId, String partitionPath,
HoodieBaseFile baseFileTo
writeStatus.getStat().setFileId(fileId);
setWriteStatusPath();
- // Create Marker file,
+ // If this is a second or subsequent attempt to create the data file,
try to recover existing version.
+ if
(recoverWriteStatusIfAvailable(partitionPath,FSUtils.makeBaseFileName(this.instantTime,
this.writeToken,
+ this.fileId, hoodieTable.getBaseFileExtension()), this.instantTime))
{
Review Comment:
Write token is created with Spark (partitionID, stageId, taskID) tuple. For
creating the same data file, if two executors are making an attempt, the fileId
and commit timestamp portions will be the same. However, the taskID in the
write token is guaranteed to be unique.
--
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]