You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2020/09/13 08:50:17 UTC

[GitHub] [iceberg] shardulm94 commented on a change in pull request #1443: Core: Fix table load error on corrupted version-hint.text file

shardulm94 commented on a change in pull request #1443:
URL: https://github.com/apache/iceberg/pull/1443#discussion_r487500479



##########
File path: core/src/main/java/org/apache/iceberg/hadoop/HadoopTableOperations.java
##########
@@ -290,8 +292,10 @@ private int readVersionHint() {
         return Integer.parseInt(in.readLine().replace("\n", ""));
       }
 
-    } catch (IOException e) {
-      throw new RuntimeIOException(e, "Failed to get file system for path: %s", versionHintFile);
+    } catch (Exception e) {
+      LOG.warn("Error reading version hint file {}", versionHintFile, e);
+      // We just assume corrupted metadata and start to read from the first version file
+      return 1;

Review comment:
       Should this return `0` instead? Similar to when the version hint file does not exist?




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org