apache/iceberg · warning

Suppressing exception in catch: {}

Error message

Suppressing exception in catch: {}

What it means

RowDataRewriter.map wraps its write/commit logic; when the primary operation throws (originalThrowable), it aborts the writer inside a nested try. If abort itself throws, the inner exception is attached to the original via addSuppressed and logged as 'Suppressing exception in catch'. The original exception is then rethrown (wrapped in a RuntimeException if it is not an Exception). The suppressed exception is secondary; the root cause is the original throwable.

Source

Thrown at flink/v2.1/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. Read the FIRST (original) exception in the stack trace and its suppressed exceptions for the abort failure — fix the root cause there.
  2. Check taskmanager logs for the 'Aborting commit' / 'Aborted commit' lines around this warning to identify what the original failure was.
  3. If abort failures are recurring, inspect FileIO/storage health (credentials, network) since cleanup failing usually indicates the same underlying outage.
Defensive patterns

Strategy: try-catch

Try / catch

try {
  writer.write(row);
} catch (Throwable t) {
  try {
    writer.abort();
  } catch (Throwable abortEx) {
    t.addSuppressed(abortEx); // mirror library behavior; always inspect `t` as root cause
  }
  throw t;
}

Prevention

When it happens

Trigger: Any Throwable from writer.write/complete in RowDataRewriter.map followed by a second Throwable from writer.abort() during cleanup; the abort failure is logged with this message and suppressed onto the original.

Common situations: A write fails (e.g. file IO or schema error) and the abort path also fails because the underlying data stream/file system is already broken, masking the secondary error in logs.

Related errors


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