apache/iceberg · warning
Suppressing exception in catch: {}
Error message
Suppressing exception in catch: {} What it means
RowDataRewriter.map(), when a commit fails, aborts the writer and then rethrows the original Throwable. If abort() itself throws, the abort exception is added as suppressed to the original and logged with this warning so it doesn't mask the real failure.
Source
Thrown at flink/v1.20/flink/src/main/java/org/apache/iceberg/flink/source/RowDataRewriter.java:154
public List<DataFile> map(CombinedScanTask task) throws Exception {
// Initialize the task writer.
this.writer = taskWriterFactory.create();
try (DataIterator<RowData> iterator =
new DataIterator<>(rowDataReader, task, io, encryptionManager)) {
while (iterator.hasNext()) {
RowData rowData = iterator.next();
writer.write(rowData);
}
return Lists.newArrayList(writer.dataFiles());
} catch (Throwable originalThrowable) {
try {
LOG.error("Aborting commit for (subTaskId {}, attemptId {})", subTaskId, attemptId);
writer.abort();
LOG.error("Aborted commit for (subTaskId {}, attemptId {})", subTaskId, attemptId);
} catch (Throwable inner) {
if (originalThrowable != inner) {
originalThrowable.addSuppressed(inner);
LOG.warn("Suppressing exception in catch: {}", inner.getMessage(), inner);
}
}
if (originalThrowable instanceof Exception) {
throw originalThrowable;
} else {
throw new RuntimeException(originalThrowable);
}
}
}
}
}
View on GitHub (pinned to 86d9c8fc54)
Solutions
- Inspect the 'Caused by' / suppressed exceptions in the logs alongside the original failure to find the abort-time root cause.
- Fix the original commit failure (the primary error is the one rethrown, not this suppressed one).
- Verify storage/permissions so abort-time file cleanup succeeds.
Defensive patterns
Strategy: try-catch
Try / catch
try {
writer.commit();
} catch (Throwable t) {
// inspect t and its suppressed exceptions for the abort-time failure
LOG.error("Commit failed with {} suppressed exceptions", t.getSuppressed().length, t);
throw t;
} Prevention
- Always read the primary exception, not just the last one logged.
- Ensure the FileIO has delete permissions so abort cleanup succeeds.
- Monitor commit failure rates on the writer operator.
When it happens
Trigger: A writer commit throws; the subsequent writer.abort() in the catch block also throws (e.g. failure closing/cleaning up files), triggering the suppression log before the original error is rethrown.
Common situations: Failure during data-file cleanup after a commit error — e.g. FileIO errors deleting partially written files, or closing an already-broken writer.
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
- Suppressing exception in catch: {}
- Failed to close equality delta writer
- Unsupported logical type: %s
- Unsupported type: %s
- Invalid iceberg type %s corresponding to Flink logical type
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/d735704b3f6220c8.
Report an issue: GitHub.