apache/iceberg · error · UncheckedIOException
Failed to close equality delta writer
Error message
Failed to close equality delta writer
What it means
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.
Source
Thrown at flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/sink/PartitionedDeltaWriter.java:97
writer = new RowDataDeltaWriter(copiedKey, dvFileWriter());
writers.put(copiedKey, writer);
}
return writer;
}
@Override
public void close() {
try {
super.close();
Tasks.foreach(writers.values())
.throwFailureWhenFinished()
.noRetry()
.run(RowDataDeltaWriter::close, IOException.class);
writers.clear();
} catch (IOException e) {
throw new UncheckedIOException("Failed to close equality delta writer", e);
}
}
}
View on GitHub (pinned to 86d9c8fc54)
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
Defensive patterns
Strategy: try-catch
Try / catch
try {
partitionedWriter.close();
} catch (UncheckedIOException e) {
LOG.error("delta writer close failed; failing task so checkpoint retries", e.getCause());
throw new IOException(e.getCause()); // rethrow as checkpoint-recoverable failure
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: S3 503/slow-down under load; HDFS DataNode failures; disk quota exceeded on executors; too many open files (ulimit) with high partition cardinality.
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
- Failed to close equality delta writer
- Failed to close equality delta writer
- Failed to close equality delta writer
- Already closed files for partition:
- Failed to close current writer
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/e36e734c8946d037.
Report an issue: GitHub.