{"record":{"id":"98e890bb15e1793f","repo":"apache/iceberg","slug":"cannot-read-manifest-list-file-s-98e890","errorCode":null,"errorMessage":"Cannot read manifest list file: %s","messagePattern":"Cannot read manifest list file: (.+?)","errorType":"exception","errorClass":"RuntimeIOException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/apache/iceberg/ManifestLists.java","lineNumber":56,"sourceCode":"      return ManifestFiles.contentCache(io).tryCache(input);\n    }\n\n    return input;\n  }\n\n  static List<ManifestFile> read(InputFile manifestList) {\n    try (CloseableIterable<ManifestFile> files =\n        InternalData.read(FileFormat.AVRO, manifestList)\n            .setRootType(GenericManifestFile.class)\n            .setCustomType(\n                ManifestFile.PARTITION_SUMMARIES_ELEMENT_ID, GenericPartitionFieldSummary.class)\n            .project(ManifestFile.schema())\n            .build()) {\n\n      return Lists.newArrayList(files);\n\n    } catch (IOException e) {\n      throw new RuntimeIOException(\n          e, \"Cannot read manifest list file: %s\", manifestList.location());\n    }\n  }\n\n  static ManifestListWriter write(\n      int formatVersion,\n      OutputFile manifestListFile,\n      EncryptionManager encryptionManager,\n      long snapshotId,\n      Long parentSnapshotId,\n      long sequenceNumber,\n      Long firstRowId) {\n    switch (formatVersion) {\n      case 1:\n        Preconditions.checkArgument(\n            sequenceNumber == TableMetadata.INITIAL_SEQUENCE_NUMBER,\n            \"Invalid sequence number for v1 manifest list: %s\",\n            sequenceNumber);","sourceCodeStart":38,"sourceCodeEnd":74,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/core/src/main/java/org/apache/iceberg/ManifestLists.java#L38-L74","documentation":"Thrown when reading a manifest list (snapshot list) Avro file fails with an IOException. ManifestLists.read opens the file via the table's FileIO and projects the ManifestFile schema; any I/O failure while opening or reading is wrapped in RuntimeIOException.","triggerScenarios":"SnapshotProducer/operations call ManifestLists.read(...) for a parent snapshot or during cleanup; the manifest list file cannot be opened or read (missing file, network error, decryption failure).","commonSituations":"Metadata file references a manifest list that was deleted (e.g., orphan cleanup ran concurrently, retention too aggressive); object store connectivity failure; wrong encryption key/key management config; corrupted file.","solutions":["Check the wrapped IOException cause for file-not-found vs. access/network error.","Verify the file still exists at the location in the snapshot metadata; if deleted by expiration, restore from backup or roll back the table.","Confirm encryption keys and FileIO config match those used at write time.","Retry on transient network/object-store errors."],"exampleFix":"// before: aggressive expire before dependent readers finish\nexpiringSnapshots.expireOlderThan(System.currentTimeMillis());\n// after: retain snapshots newer than the oldest active reader table's current snapshot\nlong safeTs = oldestDependentSnapshotTs();\nexpiringSnapshots.expireOlderThan(safeTs);","handlingStrategy":"try-catch","validationCode":"// check file exists and is readable before read\nInputFile in = io.newInputFile(manifestListLocation);\nif (!in.exists()) { throw new IllegalStateException(\"manifest list missing: \" + manifestListLocation); }","typeGuard":null,"tryCatchPattern":"try {\n  List<ManifestFile> files = ManifestLists.read(io, manifestListLocation);\n} catch (RuntimeIOException e) {\n  if (causeIsNotFound(e)) handleMissingSnapshot(); // roll back / restore from backup\n  else retry();\n}","preventionTips":["Don't expire snapshots while dependent readers may still reference them","Verify retention/cleanup jobs keep files referenced by current metadata","Match encryption config between writers and readers","Retry transient object-store read failures"],"tags":["io","filesystem","avro","read"],"backgroundTag":"file-read-failed","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}