prestodb/presto · error · PrestoException

ICEBERG_FILESYSTEM_ERROR

ICEBERG_FILESYSTEM_ERROR

Error message

Unable to list manifest file content from %s

What it means

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.

Source

Thrown at presto-iceberg/src/main/java/com/facebook/presto/iceberg/procedure/RemoveOrphanFiles.java:139

        for (Snapshot snapshot : icebergTable.snapshots()) {
            if (snapshot.manifestListLocation() != null) {
                validMetadataFileNames.add(extractFileName(snapshot.manifestListLocation()));
            }

            for (ManifestFile manifest : snapshot.allManifests(icebergTable.io())) {
                if (!processedManifestFilePaths.add(manifest.path())) {
                    // Already read this manifest
                    continue;
                }

                validMetadataFileNames.add(extractFileName(manifest.path()));
                try (ManifestReader<? extends ContentFile<?>> manifestReader = readerForManifest(icebergTable, manifest)) {
                    for (ContentFile<?> contentFile : manifestReader) {
                        validDataFileNames.add(extractFileName(contentFile.path().toString()));
                    }
                }
                catch (IOException e) {
                    throw new PrestoException(ICEBERG_FILESYSTEM_ERROR, "Unable to list manifest file content from " + manifest.path(), e);
                }
            }
        }

        metadataFileLocations(icebergTable, false).stream()
                .map(RemoveOrphanFiles::extractFileName)
                .forEach(validMetadataFileNames::add);

        statisticsFilesLocations(icebergTable).stream()
                .map(RemoveOrphanFiles::extractFileName)
                .forEach(validMetadataFileNames::add);

        // Always reserve `version-hint.text` as it's a shortcut to find the newest version
        validMetadataFileNames.add("version-hint.text");

        // Remove unused metadata and data files older than 3 days by default
        // This default value is consistent with Spark procedure `remove_orphan_files` on Iceberg, see:
        //  https://iceberg.apache.org/docs/1.5.2/spark-procedures/#remove_orphan_files

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Retry the procedure after confirming storage connectivity (transient IO errors)
  2. Verify the manifest file at the reported path is readable by the Presto user
  3. Check for corrupt/truncated manifests from failed commits and repair with Iceberg repair tooling
  4. Exclude/remove the damaged manifest via table repair or rewrite manifests before re-running cleanup
Defensive patterns

Strategy: retry

Validate before calling

// Verify each manifest is readable before cleanup
for (ManifestFile manifest : icebergTable.manifests()) {
    if (!table.io().newInputFile(manifest.path()).exists()) {
        throw new IllegalStateException("Manifest missing: " + manifest.path());
    }
}

Try / catch

try {
    CALL system.remove_orphan_files(...)
} catch (PrestoException e) {
    if ("ICEBERG_FILESYSTEM_ERROR".equals(e.getErrorCode().getName())) {
        // check cause; retry after transient IO failure or repair corrupt manifests
    }
}

Prevention

When it happens

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

Common situations: 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.

Related errors


AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04). Data as JSON: /api/errors/94a02d48710664d9. Report an issue: GitHub.