JingsongLi commented on code in PR #453:
URL: https://github.com/apache/flink-table-store/pull/453#discussion_r1061120757


##########
flink-table-store-core/src/main/java/org/apache/flink/table/store/file/utils/SnapshotManager.java:
##########
@@ -214,13 +217,22 @@ public Optional<Snapshot> latestSnapshotOfUser(String 
user) {
     public Long readHint(String fileName) {
         Path snapshotDir = snapshotDirectory();
         Path path = new Path(snapshotDir, fileName);
+        int retryNumber = 0;
         try {
-            if (path.getFileSystem().exists(path)) {
-                return Long.parseLong(FileUtils.readFileUtf8(path));
+            while (retryNumber++ < READ_HINT_RETRY_NUM) {
+                if (path.getFileSystem().exists(path)) {
+                    return Long.parseLong(FileUtils.readFileUtf8(path));

Review Comment:
   Maybe we can just remove `if (path.getFileSystem().exists(path)) {`, we 
already have catch the exception for `FileUtils.readFileUtf8(path)`.



-- 
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: issues-unsubscr...@flink.apache.org

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

Reply via email to