{"record":{"id":"62402fafc71c1dc6","repo":"apache/iceberg","slug":"failed-to-determine-manifests-for-snapshot","errorCode":null,"errorMessage":"Failed to determine manifests for snapshot {}","messagePattern":"Failed to determine manifests for snapshot (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"core/src/main/java/org/apache/iceberg/ReachableFileCleanup.java","lineNumber":122,"sourceCode":"      LOG.debug(\"Deleting {} statistics files\", expiredStatisticsFilesLocations.size());\n      deleteFiles(expiredStatisticsFilesLocations, \"statistics files\");\n    }\n  }\n\n  private Set<ManifestFile> pruneReferencedManifests(\n      Set<Snapshot> snapshots,\n      Set<ManifestFile> deletionCandidates,\n      Consumer<ManifestFile> currentManifestCallback) {\n    Set<ManifestFile> candidateSet = ConcurrentHashMap.newKeySet();\n    candidateSet.addAll(deletionCandidates);\n    Tasks.foreach(snapshots)\n        .retry(3)\n        .stopOnFailure()\n        .throwFailureWhenFinished()\n        .executeWith(planExecutorService)\n        .onFailure(\n            (snapshot, exc) ->\n                LOG.warn(\n                    \"Failed to determine manifests for snapshot {}\", snapshot.snapshotId(), exc))\n        .run(\n            snapshot -> {\n              try (CloseableIterable<ManifestFile> manifestFiles = readManifests(snapshot)) {\n                for (ManifestFile manifestFile : manifestFiles) {\n                  candidateSet.remove(manifestFile);\n                  if (candidateSet.isEmpty()) {\n                    return;\n                  }\n\n                  currentManifestCallback.accept(manifestFile.copy());\n                }\n              } catch (IOException e) {\n                throw new RuntimeIOException(\n                    e, \"Failed to close manifest list: %s\", snapshot.manifestListLocation());\n              }\n            });\n","sourceCodeStart":104,"sourceCodeEnd":140,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/core/src/main/java/org/apache/iceberg/ReachableFileCleanup.java#L104-L140","documentation":"ReachableFileCleanup.pruneReferencedManifests plans per-snapshot manifest reachability in parallel with Tasks (3 retries); when a snapshot fails all retries, the onFailure callback logs this warning. The snapshot's manifests stay in the candidate set, so they may be skipped from deletion rather than deleted — a safety-conservative outcome. Caused by an IOException reading the snapshot's manifest list.","triggerScenarios":"Running expireSnapshots (or the ExpireSnapshotsProcedure) while one snapshot's manifest list file cannot be read — deleted from storage, permission denied, throttled by object store, or dangling after a table was copied without path rewriting.","commonSituations":"Manifest lists removed by overly aggressive external lifecycle rules, concurrent writers/compaction making metadata transiently unreadable, S3 503 throttling under load, and broken path references after renaming a table location.","solutions":["Inspect the wrapped exception for the failing snapshot's manifest-list path and fix storage access (credentials/permissions/network).","Restore or repair the missing manifest list file, then re-run expireSnapshots.","Re-run expiration after transient object-store throttling subsides (add retry/backoff at the job level).","If the table location changed, run RewriteTablePathUtil or recreate metadata so paths resolve."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// pre-check manifest list readability per snapshot\nfor (Snapshot s : table.snapshots()) {\n  Preconditions.checkArgument(table.io().newInputFile(s.manifestListLocation()).exists());\n}","typeGuard":null,"tryCatchPattern":"try { expireSnapshots(); } catch (RuntimeIOException e) { /* retry after restoring storage access */ }","preventionTips":["Do not apply lifecycle rules to Iceberg metadata directories","Fix object-store throttling before large expirations","Rewrite table paths after moving table locations"],"tags":["expiration","cleanup","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-14T16:17:12.679Z"}