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


##########
hudi-timeline-service/src/main/java/org/apache/hudi/timeline/service/RequestHandler.java:
##########
@@ -187,12 +200,20 @@ private boolean syncIfLocalViewBehind(Context ctx) {
       SyncableFileSystemView view = viewManager.getFileSystemView(basePath);
       synchronized (view) {
         if (isLocalViewBehind(ctx)) {
-          HoodieTimeline localTimeline = 
viewManager.getFileSystemView(basePath).getTimeline();
-          LOG.info("Syncing view as client passed last known instant " + 
lastKnownInstantFromClient
-              + " as last known instant but server has the following last 
instant on timeline :"
-              + localTimeline.lastInstant());
-          view.sync();
-          return true;
+          try {

Review Comment:
   All the code block is thread safe already because of the `synchronized 
(view)`.



-- 
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: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to