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


##########
hudi-common/src/main/java/org/apache/hudi/common/model/HoodieFileGroup.java:
##########
@@ -125,8 +133,21 @@ private boolean isFileSliceCommitted(FileSlice slice) {
     if (!compareTimestamps(slice.getBaseInstantTime(), LESSER_THAN_OR_EQUALS, 
lastInstant.get().getTimestamp())) {
       return false;
     }
+    // if its part of completed timeline, return true.
+    if (timeline.containsInstant(slice.getBaseInstantTime())) {
+      return true;
+    }
 
-    return timeline.containsOrBeforeTimelineStarts(slice.getBaseInstantTime());
+    if (firstActiveInstant.isPresent() && 
compareTimestamps(slice.getBaseInstantTime(), GREATER_THAN_OR_EQUALS, 
firstActiveInstant.get().getTimestamp())) {
+      // To get here:
+      // 1. the timestamp must be <= the last commit
+      // 2. not in the completed timeline
+      // 3. the timestamp must be >= the first active instant

Review Comment:
   Yeah, the `#isBeforeTimelineStarts` is only valid when the timeline is the 
whole complete active timeline.



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