codope commented on code in PR #9871:
URL: https://github.com/apache/hudi/pull/9871#discussion_r1365447251


##########
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/CompletionTimeQueryView.java:
##########
@@ -126,14 +127,18 @@ public Option<String> getCompletionTime(String 
baseInstant, String instantTime)
     if (completionTimeOpt.isPresent()) {
       String completionTime = completionTimeOpt.get();
       if (completionTime.length() != baseInstant.length()) {
+        // MDT uses compaction instant time as [delta_instant] + "001".
+        // For example, "20210101000000_001" is the compaction instant time 
for "20210101000000".
+        // However, in reality, MDT compaction completes in MDT timeline 
before the deltacommit in data timeline.
+        if (baseInstant.length() - instantTime.length() == 3 && 
hasCompactionOperationSuffix(baseInstant)) {
+          return completionTimeOpt;

Review Comment:
   Done. Updated in `HoodieBackedTableMetadataWriter#compactIfNecessary`



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