{"record":{"id":"1b7ef9594f700058","repo":"apache/iceberg","slug":"failed-to-create-snapshot-list-writer-for-path-s","errorCode":null,"errorMessage":"Failed to create snapshot list writer for path: %s","messagePattern":"Failed to create snapshot list writer for path: (.+?)","errorType":"exception","errorClass":"RuntimeIOException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/apache/iceberg/ManifestListWriter.java","lineNumber":156,"sourceCode":"        // leave space for existing and added rows, in case any of the existing data files do not\n        // have an assigned first-row-id (this is the case with manifests from pre-v3 snapshots)\n        this.nextRowId += manifest.existingRowsCount() + manifest.addedRowsCount();\n        return wrapper;\n      }\n    }\n\n    @Override\n    protected FileAppender<ManifestFile> newAppender(OutputFile file, Map<String, String> meta) {\n      try {\n        return InternalData.write(FileFormat.AVRO, file)\n            .schema(V4Metadata.MANIFEST_LIST_SCHEMA)\n            .named(\"manifest_file\")\n            .meta(meta)\n            .overwrite()\n            .build();\n\n      } catch (IOException e) {\n        throw new RuntimeIOException(\n            e, \"Failed to create snapshot list writer for path: %s\", file.location());\n      }\n    }\n\n    @Override\n    public Long nextRowId() {\n      return nextRowId;\n    }\n  }\n\n  static class V3Writer extends ManifestListWriter {\n    private final V3Metadata.ManifestFileWrapper wrapper;\n    private Long nextRowId;\n\n    V3Writer(\n        OutputFile snapshotFile,\n        EncryptionManager encryptionManager,\n        long snapshotId,","sourceCodeStart":138,"sourceCodeEnd":174,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/core/src/main/java/org/apache/iceberg/ManifestListWriter.java#L138-L174","documentation":"Thrown as a RuntimeIOException when the Avro file appender for a manifest list (snapshot list) cannot be created at the given output file location. The library wraps the underlying IOException so callers get a single unchecked exception type for I/O failures during snapshot commit. It almost always indicates a problem with the underlying FileIO/filesystem, not with Iceberg logic.","triggerScenarios":"ManifestListWriter.newAppender calls fileIO.newOutputFile(location) and builds an Avro encoder; IOException from opening or preparing the output stream is wrapped. Specifically triggered by ManifestLists.write when writing v2/v3 snapshot files.","commonSituations":"Object store credentials missing or expired (S3/GCS/ADLS); bucket/container does not exist; network outage; permission denied on the output path; Hadoop misconfiguration (missing core-site.xml) in a Spark/Flink executor; disk full on local filesystems.","solutions":["Check the wrapped IOException cause for the real filesystem error (credentials, permissions, missing bucket).","Verify the table's FileIO configuration (io-impl and provider properties) and that credentials/config reach executors.","Confirm the output location/bucket exists and is writable; test writing a file to the same path manually.","Retry the commit; transient network failures against object stores are common.","Check network/proxy connectivity from the machine performing the commit."],"exampleFix":"// before: FileIO created with no provider config\nTable table = catalog.loadTable(identifier); // default HadoopFileIO, no S3 creds\n// after: configure a concrete FileIO with credentials\ncatalogBuilder.withProperties(Map.of(\n    CatalogProperties.FILE_IO_IMPL, \"org.apache.iceberg.aws.s3.S3FileIO\",\n    \"s3.access-key-id\", ak,\n    \"s3.secret-access-key\", sk));","handlingStrategy":"try-catch","validationCode":"// pre-commit storage sanity check\ntry (var out = table.io().newOutputFile(metadataPath).createOrOverwrite()) {\n  // probe write succeeded\n} catch (IOException e) {\n  throw new IllegalStateException(\"Storage not writable: \" + metadataPath, e);\n}","typeGuard":null,"tryCatchPattern":"try {\n  table.refresh();\n  Transaction tx = table.newTransaction();\n  tx.commit();\n} catch (RuntimeIOException e) {\n  logger.error(\"Manifest list write failed; cause: {}\", e.getCause(), e);\n  // fix FileIO config/credentials, then retry\n}","preventionTips":["Verify FileIO impl and credentials are set and reachable from all executors","Probe-write to the metadata location before large commits","Monitor object-store auth token expiry in long jobs","Keep buckets/containers pre-created with correct ACLs"],"tags":["io","filesystem","avro","commit"],"backgroundTag":"file-write-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"}