{"record":{"id":"6823f8671ce253ee","repo":"apache/iceberg","slug":"failed-to-read-manifest-list","errorCode":null,"errorMessage":"Failed to read manifest list {}","messagePattern":"Failed to read manifest list (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"core/src/main/java/org/apache/iceberg/RewriteTablePathUtil.java","lineNumber":354,"sourceCode":"        if (rewrittenManifestLengths.containsKey(file.path())) {\n          result.toRewrite().add(file);\n          result\n              .copyPlan()\n              .add(Pair.of(stagingPath(file.path(), sourcePrefix, stagingDir), newFile.path()));\n        }\n      }\n      return result;\n    } catch (IOException e) {\n      throw new UncheckedIOException(\n          \"Failed to rewrite the manifest list file \" + snapshot.manifestListLocation(), e);\n    }\n  }\n\n  private static List<ManifestFile> manifestFilesInSnapshot(FileIO io, Snapshot snapshot) {\n    try {\n      return snapshot.allManifests(io);\n    } catch (RuntimeIOException e) {\n      LOG.warn(\"Failed to read manifest list {}\", snapshot.manifestListLocation(), e);\n      return ImmutableList.of();\n    }\n  }\n\n  /**\n   * Rewrite a data manifest, replacing path references.\n   *\n   * @param manifestFile source manifest file to rewrite\n   * @param snapshotIds snapshot ids for filtering returned data manifest entries\n   * @param outputFile output file to rewrite manifest file to\n   * @param io file io\n   * @param format format of the manifest file\n   * @param specsById map of partition specs by id\n   * @param sourcePrefix source prefix that will be replaced\n   * @param targetPrefix target prefix that will replace it\n   * @return a copy plan of content files in the manifest that was rewritten, recording the\n   *     rewritten manifest's byte length\n   */","sourceCodeStart":336,"sourceCodeEnd":372,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/core/src/main/java/org/apache/iceberg/RewriteTablePathUtil.java#L336-L372","documentation":"RewriteTablePathUtil.manifestFilesInSnapshot calls snapshot.allManifests(io) to enumerate a snapshot's manifests while rewriting path references; on RuntimeIOException it logs this warning and returns an empty list. Because the manifest list cannot be read, its manifests are skipped during the rewrite, so the rewritten table may keep dangling path references for that snapshot.","triggerScenarios":"Running RewriteTablePathUtil (table rename/relocation/copy between storage systems) when a snapshot's manifest list file cannot be read at its original location — file deleted, permission denied, or source bucket unreachable.","commonSituations":"Migrating tables after the source was partially cleaned up (expired metadata), missing read permissions on the source bucket, and interrupted migrations where some metadata files were already moved.","solutions":["Restore access to the source manifest list (permissions/credentials/network) and re-run the rewrite.","Verify all snapshots' manifest lists exist before rewriting: check each snapshot.manifestListLocation() is readable.","Re-run RewriteTablePathUtil for the affected snapshots after the source is available.","Copy the complete metadata tree before modifying/deleting the source location."],"exampleFix":"// before: rewrite proceeds, skipping unreadable snapshots\nRewriteTablePathUtil.rewriteTablePath(...);\n// after: pre-flight check of every manifest list\nfor (Snapshot s : table.snapshots()) {\n  Preconditions.checkState(table.io().newInputFile(s.manifestListLocation()).exists(),\n      \"Missing manifest list: \" + s.manifestListLocation());\n}\nRewriteTablePathUtil.rewriteTablePath(...);","handlingStrategy":"validation","validationCode":"for (Snapshot s : table.snapshots()) {\n  Preconditions.checkState(table.io().newInputFile(s.manifestListLocation()).exists(),\n      \"Unreadable manifest list: \" + s.manifestListLocation());\n}","typeGuard":null,"tryCatchPattern":"try { RewriteTablePathUtil.rewriteTablePath(...); } catch (RuntimeIOException e) { /* restore source access and re-run */ }","preventionTips":["Keep the source table intact until migration completes and is verified","Grant read access on the source location to the migration job","Verify every snapshot's manifest list before rewriting paths"],"tags":["table-migration","rewrite-path","io","manifest-list"],"backgroundTag":"file-read-failed","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}