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


##########
hudi-timeline-service/src/main/java/org/apache/hudi/timeline/service/RequestHandler.java:
##########
@@ -768,18 +779,35 @@ private boolean syncIfLocalViewBehind(Context ctx) {
       SyncableFileSystemView view = viewManager.getFileSystemView(basePath);
       synchronized (view) {
         HoodieTimeline localTimeline = view.getTimeline();
+        String timelineHashFromClient = getTimelineHashParam(ctx);
         // The final check already accepts a trailing clean with an otherwise 
matching timeline.
         // Other extensions still need a sync: restore may have deleted their 
extra instants.
-        if (!shouldThrowExceptionIfLocalViewBehind(localTimeline, 
getTimelineHashParam(ctx))) {
+        if (!shouldThrowExceptionIfLocalViewBehind(localTimeline, 
timelineHashFromClient)) {
           return false;
         }
         if (isLocalViewBehind(ctx)) {
           String lastKnownInstantFromClient = getLastInstantTsParam(ctx);
-          if (log.isInfoEnabled()) {
-            log.info("Syncing view as client passed last known instant {} as 
last known instant but server has the following last instant on timeline: {}",
-                lastKnownInstantFromClient, localTimeline.lastInstant());
+          String clientTimeline = basePath + ":" + timelineHashFromClient;
+          boolean hasLocalFallback = hasLocalFallback(ctx);

Review Comment:
   Do we want a repeated `REMOTE_ONLY` request with the same cached mismatch to 
trigger another sync? If returning a cached 400 is acceptable for that client 
too, we could drop the `localfallback` request parameter entirely and let each 
client handle the 400. That would change the existing `REMOTE_ONLY` test from 
three syncs to one, with all three requests still failing. If the retry is 
intentional, keeping the flag on the early rejection makes that policy explicit.



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