apache/iceberg · error · UncheckedIOException

Failed to read manifest: <manifest.path()>

Error message

Failed to read manifest: <manifest.path()>

What it means

Wrapped IOException thrown while reading a manifest file during collectExistingDVs, when scanning manifests for existing deletion vectors referenced by data files. The library converts the checked IOException into UncheckedIOException because stream operators cannot throw checked exceptions. Indicates the manifest listed in the snapshot could not be opened or read.

Source

Thrown at flink/v1.20/flink/src/main/java/org/apache/iceberg/flink/maintenance/operator/EqualityConvertDVWriter.java:312

    }

    return anyPartition;
  }

  private void readDVEntries(
      ManifestFile manifest, Set<String> filterPaths, Map<String, DeleteFile> out) {
    manifestsRead++;
    try (ManifestReader<DeleteFile> reader =
        ManifestFiles.readDeleteManifest(manifest, table.io(), table.specs())) {
      for (DeleteFile deleteFile : reader) {
        if (ContentFileUtil.isDV(deleteFile)
            && deleteFile.referencedDataFile() != null
            && filterPaths.contains(deleteFile.referencedDataFile())) {
          out.put(deleteFile.referencedDataFile(), deleteFile);
        }
      }
    } catch (IOException e) {
      throw new UncheckedIOException("Failed to read manifest: " + manifest.path(), e);
    }
  }

  @VisibleForTesting
  int manifestsReadLastCycle() {
    return manifestsRead;
  }

  @VisibleForTesting
  int retainedStateSize() {
    return positionsByFile.size();
  }

  private PositionDeleteIndex loadPreviousDV(String dataFilePath, Map<String, DeleteFile> dvs) {
    DeleteFile existingDV = dvs.get(dataFilePath);
    if (existingDV == null) {
      return null;
    }

View on GitHub (pinned to 86d9c8fc54)

Solutions

  1. Check the wrapped cause (getCause()) for the real storage error and fix connectivity/credentials to the catalog's FileIO storage.
  2. Verify the referenced manifests still exist in object storage; if orphan/expiry cleanup deleted them, restore or re-run maintenance from an intact snapshot.
  3. Re-run the maintenance cycle; if the failure persists, validate table metadata and manifests with Iceberg's CheckTables/validate tooling.
  4. Increase storage retry/timeouts (FileIO config) for transient IO errors.

Example fix

// diagnose with
try { rewrite.run(); } catch (UncheckedIOException e) {
  LOG.error("manifest read failed: {} cause: {}", e.getMessage(), e.getCause());
}
// ensure snapshot expiration is not racing maintenance
// before
expireSnapshots olderThan(now - 1h).execute();
// after
expireSnapshots olderThan(now - 1h).execute(); // only after maintenance cycle completes
Defensive patterns

Strategy: retry

Validate before calling

// before the cycle, verify manifests of the planning snapshot are readable
for (ManifestFile mf : table.currentSnapshot().allManifests(table.io())) {
  try (ManifestReader<?> r = ManifestFiles.read(mf, table.io())) {
    r.liveEntries().iterator().hasNext(); // force open
  }
}

Type guard

boolean manifestReadable(ManifestFile mf, FileIO io) {
  try { return io.newInputFile(mf.path()).exists(); } catch (Exception e) { return false; }
}

Try / catch

try {
  collectExistingDVs(manifest, filterPaths, out);
} catch (UncheckedIOException e) {
  LOG.error("manifest {} unreadable: {}", manifest.path(), e.getCause());
  throw new RetryableMaintenanceException(e);
}

Prevention

When it happens

Trigger: Manifest file missing, deleted by an expired/expired-and-cleaned snapshot, corrupted, or inaccessible storage (permissions, network, credentials) while readDVEntries iterates manifests via ManifestReader.

Common situations: Snapshot expiration removed manifests still referenced by the staging snapshot; S3/GCS transient outages or expired credentials; orphan-file cleanup ran mid-cycle; corrupted warehouse.

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/2db67eac90928664. Report an issue: GitHub.