apache/iceberg · critical · RuntimeIOException

Failed to read manifest: %s

Error message

Failed to read manifest: %s

What it means

During commit, SnapshotProducer reads each existing manifest to build the new snapshot summary (tracking added/deleted files and rows). An IOException while opening/reading a manifest Avro file is rethrown as RuntimeIOException including the manifest's location. Usually the manifest file is missing, unreadable, or corrupt at its recorded path.

Source

Thrown at core/src/main/java/org/apache/iceberg/SnapshotProducer.java:882

          manifest.path(),
          manifest.length(),
          manifest.partitionSpecId(),
          ManifestContent.DATA,
          manifest.sequenceNumber(),
          manifest.minSequenceNumber(),
          snapshotId,
          stats.summaries(),
          null,
          addedFiles,
          addedRows,
          existingFiles,
          existingRows,
          deletedFiles,
          deletedRows,
          null);

    } catch (IOException e) {
      throw new RuntimeIOException(e, "Failed to read manifest: %s", manifest.path());
    }
  }

  private static void updateTotal(
      ImmutableMap.Builder<String, String> summaryBuilder,
      Map<String, String> previousSummary,
      String totalProperty,
      Map<String, String> currentSummary,
      String addedProperty,
      String deletedProperty) {
    String totalStr = previousSummary.get(totalProperty);
    if (totalStr != null) {
      try {
        long newTotal = Long.parseLong(totalStr);

        String addedStr = currentSummary.get(addedProperty);
        if (newTotal >= 0 && addedStr != null) {
          newTotal += Long.parseLong(addedStr);

View on GitHub (pinned to 86d9c8fc54)

Solutions

  1. Check the manifest path in the error and verify the file exists and is readable via the table's FileIO.
  2. Restore the manifest from the object store versioning/backup or re-register the table from a valid metadata version (metadata json with intact manifests).
  3. Fix FileIO configuration (credentials, region, endpoint) if the cause indicates access/network errors.
  4. If the manifest is unrecoverable, repair metadata (e.g., remove dangling entries via rewrite/commit tooling) rather than retrying reads.

Example fix

// before
Table table = catalog.loadTable("db.tbl");
table.newFastAppend().appendFile(df).commit(); // Failed to read manifest: s3://old-bucket/.../avro
// after
// re-register the table at a metadata version whose manifests exist
HadoopTables tables = new HadoopTables();
Table repaired = tables.load("s3://bucket/db.tbl/metadata/00042-...metadata.json");
repaired.newFastAppend().appendFile(df).commit();
Defensive patterns

Strategy: try-catch

Validate before calling

// verify all current manifests are readable before attempting a commit
for (ManifestFile m : table.currentSnapshot().allManifests(table.io())) {
  try (var r = ManifestFiles.read(m, table.io())) { /* readable */ }
}

Try / catch

try {
  producer.commit();
} catch (RuntimeIOException e) {
  // message contains the manifest path; check existence before retry
  String path = extractManifestPath(e.getMessage());
  throw new IllegalStateException("Manifest unreadable at " + path + "; restore from backup", e);
}

Prevention

When it happens

Trigger: commit()/apply() on a snapshot producer whose base table references manifests that cannot be read: manifest deleted externally, catalog/metadata moved, expired pre-signed access, truncated/corrupt Avro file, or wrong FileIO scheme for the manifest location.

Common situations: Manifests removed by an over-aggressive expireSnapshots/cleanup job or by hand; table cloned/copied between buckets without rewriting metadata; misconfigured FileIO (e.g., S3 credentials lost or region mismatch); network failure while streaming a manifest from object storage; metadata repair left dangling manifest paths.

Understand the failure class

Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.

Related errors


AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12). Data as JSON: /api/errors/bad17e0186212922. Report an issue: GitHub.