danny0405 commented on code in PR #12926:
URL: https://github.com/apache/hudi/pull/12926#discussion_r1988174063


##########
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/versioning/v2/ActiveTimelineV2.java:
##########
@@ -727,17 +725,15 @@ public void createFileInMetaPath(String filename, 
Option<byte[]> content, boolea
   protected void createCompleteFileInMetaPath(boolean shouldLock, 
HoodieInstant instant, Option<byte[]> content) {
     TimeGenerator timeGenerator = TimeGenerators
         .getTimeGenerator(metaClient.getTimeGeneratorConfig(), 
metaClient.getStorageConf());
-    timeGenerator.consumeTime(!shouldLock, currentTimeMillis -> {
-      String completionTime = HoodieInstantTimeGenerator.formatDate(new 
Date(currentTimeMillis));
-      String fileName = instantFileNameGenerator.getFileName(completionTime, 
instant);
-      StoragePath fullPath = getInstantFileNamePath(fileName);
-      if (metaClient.getTimelineLayoutVersion().isNullVersion()) {
-        FileIOUtils.createFileInPath(metaClient.getStorage(), fullPath, 
content);
-      } else {
-        metaClient.getStorage().createImmutableFileInPath(fullPath, 
content.map(HoodieInstantWriter::convertByteArrayToWriter));
-      }
-      LOG.info("Created new file for toInstant ?" + fullPath);
-    });
+    String completionTime = TimelineUtils.generateInstantTime(shouldLock, 
timeGenerator);

Review Comment:
   Should be fine, the completion time is part of the file name which is used 
as the file completion time instead of the modification time.



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