voonhous commented on code in PR #18965:
URL: https://github.com/apache/hudi/pull/18965#discussion_r3393783254


##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieMetadataPayload.java:
##########
@@ -673,7 +699,7 @@ public static HoodieRecord<HoodieMetadataPayload> 
createRecordIndexUpdate(String
         }
       } catch (Exception e) {
         throw new HoodieMetadataException(String.format("Invalid UUID or 
index: fileID=%s, partition=%s, instantTime=%s",
-            fileId, partition, instantTime), e);
+            fileId, partition, HoodieInstantTimeGenerator.formatDate(new 
java.util.Date(instantTimeMillis))), e);

Review Comment:
   The instant string format itself has no timezone info, and `formatDate` 
mirrors `parseDateFromInstantTime` (both use `ZoneId.systemDefault()`), so the 
round trip reproduces the original digits as long as the default zone is 
unchanged in the JVM. 
   
   That said, it is not guaranteed byte-identical to the original string -- 
legacy second-granularity instants come back with the millis suffix appended by 
the compatibility parse -- so rather than reformat on this error path, I 
switched the message to print the raw epoch millis, which is unambiguous and 
zone-free.



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