{"record":{"id":"94a02d48710664d9","repo":"prestodb/presto","slug":"iceberg-filesystem-error-94a02d","errorCode":"ICEBERG_FILESYSTEM_ERROR","errorMessage":"Unable to list manifest file content from %s","messagePattern":"Unable to list manifest file content from (.+?)","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-iceberg/src/main/java/com/facebook/presto/iceberg/procedure/RemoveOrphanFiles.java","lineNumber":139,"sourceCode":"        for (Snapshot snapshot : icebergTable.snapshots()) {\n            if (snapshot.manifestListLocation() != null) {\n                validMetadataFileNames.add(extractFileName(snapshot.manifestListLocation()));\n            }\n\n            for (ManifestFile manifest : snapshot.allManifests(icebergTable.io())) {\n                if (!processedManifestFilePaths.add(manifest.path())) {\n                    // Already read this manifest\n                    continue;\n                }\n\n                validMetadataFileNames.add(extractFileName(manifest.path()));\n                try (ManifestReader<? extends ContentFile<?>> manifestReader = readerForManifest(icebergTable, manifest)) {\n                    for (ContentFile<?> contentFile : manifestReader) {\n                        validDataFileNames.add(extractFileName(contentFile.path().toString()));\n                    }\n                }\n                catch (IOException e) {\n                    throw new PrestoException(ICEBERG_FILESYSTEM_ERROR, \"Unable to list manifest file content from \" + manifest.path(), e);\n                }\n            }\n        }\n\n        metadataFileLocations(icebergTable, false).stream()\n                .map(RemoveOrphanFiles::extractFileName)\n                .forEach(validMetadataFileNames::add);\n\n        statisticsFilesLocations(icebergTable).stream()\n                .map(RemoveOrphanFiles::extractFileName)\n                .forEach(validMetadataFileNames::add);\n\n        // Always reserve `version-hint.text` as it's a shortcut to find the newest version\n        validMetadataFileNames.add(\"version-hint.text\");\n\n        // Remove unused metadata and data files older than 3 days by default\n        // This default value is consistent with Spark procedure `remove_orphan_files` on Iceberg, see:\n        //  https://iceberg.apache.org/docs/1.5.2/spark-procedures/#remove_orphan_files","sourceCodeStart":121,"sourceCodeEnd":157,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-iceberg/src/main/java/com/facebook/presto/iceberg/procedure/RemoveOrphanFiles.java#L121-L157","documentation":"ICEBERG_FILESYSTEM_ERROR thrown in RemoveOrphanFiles.doRemoveOrphanFiles when reading a manifest file's content (iterating ManifestReader for ContentFile entries) raises an IOException. The procedure collects valid data-file names from every manifest before deleting orphans; a manifest that cannot be read aborts the operation to avoid deleting live files.","triggerScenarios":"remove_orphan_files procedure iterating a table's manifests where ManifestReader throws IOException — corrupt/truncated manifest, unreadable file (permissions), or storage failure while opening the manifest path.","commonSituations":"Manifest files damaged after partial write or failed commit; object-store permissions changed since the manifest was written; S3/HDFS transient errors during a long-running cleanup; orphan cleanup racing with an in-progress commit.","solutions":["Retry the procedure after confirming storage connectivity (transient IO errors)","Verify the manifest file at the reported path is readable by the Presto user","Check for corrupt/truncated manifests from failed commits and repair with Iceberg repair tooling","Exclude/remove the damaged manifest via table repair or rewrite manifests before re-running cleanup"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Verify each manifest is readable before cleanup\nfor (ManifestFile manifest : icebergTable.manifests()) {\n    if (!table.io().newInputFile(manifest.path()).exists()) {\n        throw new IllegalStateException(\"Manifest missing: \" + manifest.path());\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    CALL system.remove_orphan_files(...)\n} catch (PrestoException e) {\n    if (\"ICEBERG_FILESYSTEM_ERROR\".equals(e.getErrorCode().getName())) {\n        // check cause; retry after transient IO failure or repair corrupt manifests\n    }\n}","preventionTips":["Run orphan cleanup with retention well above commit latency to avoid racing writers","Repair/rewrite damaged manifests before cleanup","Ensure consistent read permissions on manifest files","Run cleanup during low-traffic windows to reduce transient storage errors"],"tags":["iceberg","manifest","io","orphan-files"],"backgroundTag":"manifest-read-failure","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}