nsivabalan commented on a change in pull request #4530:
URL: https://github.com/apache/hudi/pull/4530#discussion_r780678908



##########
File path: 
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadataWriter.java
##########
@@ -689,7 +689,7 @@ protected void compactIfNecessary(AbstractHoodieWriteClient 
writeClient, String
     String latestDeltacommitTime = 
metadataMetaClient.reloadActiveTimeline().getDeltaCommitTimeline().filterCompletedInstants().lastInstant()
         .get().getTimestamp();
     List<HoodieInstant> pendingInstants = 
dataMetaClient.reloadActiveTimeline().filterInflightsAndRequested()
-        
.findInstantsBefore(latestDeltacommitTime).getInstants().collect(Collectors.toList());
+        
.findInstantsBefore(instantTime).getInstants().collect(Collectors.toList());
 
     if (!pendingInstants.isEmpty()) {
       LOG.info(String.format("Cannot compact metadata table as there are %d 
inflight instants before latest deltacommit %s: %s",

Review comment:
       this was intentionally switched to instanttime. Prior to this patch, 
latestDeltacommitTime will refer to the current commit being applied to MDT, 
bcoz, commit would have been completed in MDT by the time we reach this part of 
the code and hence it works. But with this patch, latestDeltacommitTime will 
refer to last commited delta commit and hence I am using `instantTime` which is 
the current commit being applied to MDT. 




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