apache/iceberg · warning

Suppressing exception in catch: {}

Error message

Suppressing exception in catch: {}

What it means

A warning logged in RowDataRewriter.map when, while aborting the writer after a primary failure, the abort itself (or the suppressed-exception bookkeeping) also throws. The inner throwable is attached to the original via addSuppressed and logged rather than replacing the original failure, preserving the root cause.

Source

Thrown at flink/v2.3/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

  1. Inspect the suppressed exception in the log (and the original exception) to fix the root storage/IO problem
  2. If abort failures leave orphan files, run orphan-file cleanup on the table
  3. Check storage credentials/network if abort consistently fails alongside the primary error
Defensive patterns

Strategy: try-catch

Try / catch

try {
  writer.close();
} catch (Throwable primary) {
  try {
    writer.abort();
  } catch (Throwable inner) {
    primary.addSuppressed(inner);
  }
  throw primary;
}

Prevention

When it happens

Trigger: During close/commit failure inside RowDataRewriter.map, writer.abort() raises a secondary Throwable that differs from originalThrowable, triggering the catch that suppresses and logs it.

Common situations: Underlying storage failures (S3/DFS) during commit that then also fail during abort; task cancellation racing cleanup; corrupted open data files preventing abort from deleting them.

Related errors


AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12). Data as JSON: /api/errors/9787ab891c3c7b07. Report an issue: GitHub.