apache/iceberg · error · RuntimeIOException

Failed to write manifest list file

Error message

Failed to write manifest list file

What it means

SnapshotProducer.apply() writes the new snapshot's manifest list (an Avro file listing all manifests) to the table's FileIO. When the Avro writer closes with an IOException, it is rethrown as RuntimeIOException with this message. It means the metadata file for the snapshot could not be persisted, so no commit metadata was produced.

Source

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

            parentSnapshotId,
            sequenceNumber,
            base.nextRowId());

    try (writer) {
      // keep track of the manifest lists created
      manifestLists.add(manifestList.location());

      ManifestFile[] manifestFiles = new ManifestFile[manifests.size()];

      Tasks.range(manifestFiles.length)
          .stopOnFailure()
          .throwFailureWhenFinished()
          .executeWith(workerPool())
          .run(index -> manifestFiles[index] = manifestsWithMetadata.get(manifests.get(index)));

      writer.addAll(Arrays.asList(manifestFiles));
    } catch (IOException e) {
      throw new RuntimeIOException(e, "Failed to write manifest list file");
    }

    Long nextRowId = null;
    Long assignedRows = null;
    if (base.formatVersion() >= 3) {
      nextRowId = base.nextRowId();
      assignedRows = writer.nextRowId() - base.nextRowId();
    }

    Map<String, String> summary = summary();
    String operation = operation();

    if (summary != null && DataOperations.REPLACE.equals(operation)) {
      long addedRecords =
          PropertyUtil.propertyAsLong(summary, SnapshotSummary.ADDED_RECORDS_PROP, 0L);
      long replacedRecords =
          PropertyUtil.propertyAsLong(summary, SnapshotSummary.DELETED_RECORDS_PROP, 0L);

View on GitHub (pinned to 86d9c8fc54)

Solutions

  1. Check FileIO/catalog configuration (warehouse URI, bucket, credentials) and verify the metadata location is writable.
  2. Retry the commit; object-store throttling and transient network errors are common root causes.
  3. Inspect the cause chain (RuntimeIOException.getCause()) for the underlying IOException to identify storage-side details.
  4. Free disk space or fix HDFS capacity/quota if writing to local or HDFS storage.

Example fix

// before
Table table = catalog.loadTable("db.tbl");
table.newFastAppend().appendFile(df).commit(); // fails: wrong io impl for s3:// path
// after
Catalog catalog = CatalogUtil.loadCatalog(
    "org.apache.iceberg.rest.RESTCatalog", "prod", "2", propsWithS3FileIO);
Table table = catalog.loadTable("db.tbl");
table.newFastAppend().appendFile(df).commit();
Defensive patterns

Strategy: try-catch

Validate before calling

// verify the table's metadata location is writable before committing
try (var f = table.io().create(table.location() + "/.write_probe.tmp")) { /* ok */ }

Try / catch

try {
  table.newFastAppend().appendFile(df).commit();
} catch (RuntimeIOException e) {
  if (e.getCause() instanceof IOException io) {
    // inspect io for storage-side cause, then retry with backoff
    Tasks.foreach(() -> commitOp()).retry(3).exponentialBackoff(100, 4);
  } else throw e;
}

Prevention

When it happens

Trigger: Calling table.newSnapshot()/fastAppend()/rewrite-style operations and calling apply()/commit() when the underlying FileIO cannot create or write the manifest-list Avro file: bad location/URI, missing credentials, full disk, or transient object-store failure.

Common situations: S3/GCS credentials expired or misconfigured (no permission on the metadata location); warehouse path typo or wrong scheme in catalog configuration; disk full on HDFS/local FS; bucket throttling during large commits; network blip between driver and object store.

Understand the failure class

Background: "failed to write file", "Could not save figure", "Error saving remote file" — file write failed: causes and fixes across languages and libraries — this error's family across 38 libraries.

Related errors


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