{"record":{"id":"e36e734c8946d037","repo":"apache/iceberg","slug":"failed-to-close-equality-delta-writer-e36e73","errorCode":null,"errorMessage":"Failed to close equality delta writer","messagePattern":"Failed to close equality delta writer","errorType":"exception","errorClass":"UncheckedIOException","httpStatus":null,"severity":"error","filePath":"flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/sink/PartitionedDeltaWriter.java","lineNumber":97,"sourceCode":"      writer = new RowDataDeltaWriter(copiedKey, dvFileWriter());\n      writers.put(copiedKey, writer);\n    }\n\n    return writer;\n  }\n\n  @Override\n  public void close() {\n    try {\n      super.close();\n      Tasks.foreach(writers.values())\n          .throwFailureWhenFinished()\n          .noRetry()\n          .run(RowDataDeltaWriter::close, IOException.class);\n\n      writers.clear();\n    } catch (IOException e) {\n      throw new UncheckedIOException(\"Failed to close equality delta writer\", e);\n    }\n  }\n}\n","sourceCodeStart":79,"sourceCodeEnd":101,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/sink/PartitionedDeltaWriter.java#L79-L101","documentation":"PartitionedDeltaWriter.close runs RowDataDeltaWriter::close for every per-partition delta writer via Tasks; if any of those closes throws IOException it is wrapped as UncheckedIOException with this message. Closing writes the remaining data/delete files, so this failure can leave files partially written.","triggerScenarios":"Closing a PartitionedDeltaWriter (e.g. at checkpoint or record end) when the underlying writers' close() hits IOException — disk full, filesystem outage, object-store throttling during file upload.","commonSituations":"S3 503/slow-down under load; HDFS DataNode failures; disk quota exceeded on executors; too many open files (ulimit) with high partition cardinality.","solutions":["Inspect the wrapped IOException cause to find the failing filesystem and fix storage/credentials/network issues","Increase executor ulimit (nofile) or reduce partition cardinality to limit concurrently open writers","Retry the job from the last checkpoint; Iceberg commits are transactional so partial files are cleaned up","Enable retry/backoff settings for the object store filesystem to absorb transient throttling"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  partitionedWriter.close();\n} catch (UncheckedIOException e) {\n  LOG.error(\"delta writer close failed; failing task so checkpoint retries\", e.getCause());\n  throw new IOException(e.getCause()); // rethrow as checkpoint-recoverable failure\n}","preventionTips":["Raise executor nofile ulimit for high-partition writes","Configure object-store retry/backoff (S3 client throttling settings)","Monitor disk space and quotas on task executors","Rely on Iceberg transactional commits — always restart from checkpoint, never resume partial files"],"tags":["flink","writer","io","partitioning"],"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"}