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


##########
hudi-timeline-service/src/main/java/org/apache/hudi/timeline/service/RequestHandler.java:
##########
@@ -784,11 +792,55 @@ private boolean syncIfLocalViewBehind(Context ctx) {
      * Determine whether to throw an exception when local view of table's 
timeline is behind that of client's view.
      */
     private boolean shouldThrowExceptionIfLocalViewBehind(HoodieTimeline 
localTimeline, String timelineHashFromClient) {
-      Option<HoodieInstant> lastInstant = localTimeline.lastInstant();
-      // When performing async clean, we may have one more .clean.completed 
after lastInstantTs.
-      // In this case, we do not need to throw an exception.
-      return !lastInstant.isPresent() || 
!lastInstant.get().getAction().equals(HoodieTimeline.CLEAN_ACTION)
-          || 
!localTimeline.findInstantsBefore(lastInstant.get().requestedTime()).getTimelineHash().equals(timelineHashFromClient);
+      // Async cleaning may add several completed cleans after the client's 
timeline. Only
+      // exempt an exact prefix before one of those trailing cleans; other 
differences still

Review Comment:
   looks complicated, can you revert the last two commits first, the multiple 
tailing cleans should be deemed as a rare case?



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