apache/iceberg · error

Commit {} failed for task {} ({} consecutive failures, will

Error message

Commit {} failed for task {} ({} consecutive failures, will retry)

What it means

A full (non-partial) commit for the coordinator task threw a RuntimeException. The failure count is incremented and the commit will be retried, so this warning is logged; if the failure budget is exhausted, the exception is rethrown and the connector task fails.

Source

Thrown at kafka-connect/kafka-connect/src/main/java/org/apache/iceberg/connect/channel/Coordinator.java:187

      }

      if (!(e instanceof CommitFailedException)) {
        // CommitStateUnknownException, ValidationException, ForbiddenException,
        // NPE, anything else -- not retryable, terminate immediately
        throw e;
      }

      consecutiveCommitFailures++;
      if (consecutiveCommitFailures >= config.commitMaxConsecutiveFailures()) {
        LOG.error(
            "Commit {} failed for task {} ({} consecutive failures, terminating)",
            commitState.currentCommitId(),
            taskId,
            consecutiveCommitFailures,
            e);
        throw e;
      }
      LOG.warn(
          "Commit {} failed for task {} ({} consecutive failures, will retry)",
          commitState.currentCommitId(),
          taskId,
          consecutiveCommitFailures,
          e);
    } finally {
      commitState.endCurrentCommit();
    }
  }

  private void doCommit(boolean partialCommit) {
    Map<TableReference, List<Envelope>> commitMap = commitState.tableCommitMap();
    OffsetDateTime validThroughTs = commitState.validThroughTs(partialCommit);

    Tasks.foreach(commitMap.entrySet())
        .executeWith(exec)
        .stopOnFailure()
        .run(

View on GitHub (pinned to 86d9c8fc54)

Solutions

  1. Read the chained exception in the log for the root cause and address it (catalog connectivity, credentials, contention).
  2. Verify catalog endpoint availability and authentication (check the catalog's own service logs).
  3. Reduce commit conflicts by staggering other Iceberg writers (compaction, maintenance jobs) away from the connector's commit window.
  4. If consecutive failures keep rising until the task aborts, the connector will restart and retry the commit after recovery.
Defensive patterns

Strategy: retry

Try / catch

try {
  coordinator.commit(...);
} catch (RuntimeException e) {
  // non-partial commit: failure count incremented and retried;
  // task fails once the consecutive-failure budget is exhausted
}

Prevention

When it happens

Trigger: doCommit/commitToTable throws on a complete commit — e.g. NoSuchTableException paths aside, catalog commit conflict, authentication failure, or broker errors during offset commit — on the regular commit path.

Common situations: Iceberg catalog outage (REST/Hive/Glue/Nessie unavailable); repeated CommitFailedException from concurrent writers; expired cloud credentials; Kafka broker issues when committing consumer offsets.

Related errors


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