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


##########
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:
   OK. I've added a fix-up commit. Currently only exception of 
"Long.parseLong(FileUtils.readFileUtf8(path))" is catched, and others are 
thrown to invoker.



##########
flink-table-store-core/src/main/java/org/apache/flink/table/store/file/utils/SnapshotManager.java:
##########
@@ -44,6 +45,8 @@ public class SnapshotManager {
     private static final String SNAPSHOT_PREFIX = "snapshot-";
     public static final String EARLIEST = "EARLIEST";
     public static final String LATEST = "LATEST";
+    private static final int READ_HINT_RETRY_NUM = 10;
+    private static final int READ_HINT_RETRY_INTERVAL = 200;

Review Comment:
   Done.



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