{"record":{"id":"1c3df89c45e6065d","repo":"apache/iceberg","slug":"commit-failed-for-task-consecutive-failu","errorCode":null,"errorMessage":"Commit {} failed for task {} ({} consecutive failures, will retry)","messagePattern":"Commit (.+?) failed for task (.+?) \\((.+?) consecutive failures, will retry\\)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kafka-connect/kafka-connect/src/main/java/org/apache/iceberg/connect/channel/Coordinator.java","lineNumber":187,"sourceCode":"      }\n\n      if (!(e instanceof CommitFailedException)) {\n        // CommitStateUnknownException, ValidationException, ForbiddenException,\n        // NPE, anything else -- not retryable, terminate immediately\n        throw e;\n      }\n\n      consecutiveCommitFailures++;\n      if (consecutiveCommitFailures >= config.commitMaxConsecutiveFailures()) {\n        LOG.error(\n            \"Commit {} failed for task {} ({} consecutive failures, terminating)\",\n            commitState.currentCommitId(),\n            taskId,\n            consecutiveCommitFailures,\n            e);\n        throw e;\n      }\n      LOG.warn(\n          \"Commit {} failed for task {} ({} consecutive failures, will retry)\",\n          commitState.currentCommitId(),\n          taskId,\n          consecutiveCommitFailures,\n          e);\n    } finally {\n      commitState.endCurrentCommit();\n    }\n  }\n\n  private void doCommit(boolean partialCommit) {\n    Map<TableReference, List<Envelope>> commitMap = commitState.tableCommitMap();\n    OffsetDateTime validThroughTs = commitState.validThroughTs(partialCommit);\n\n    Tasks.foreach(commitMap.entrySet())\n        .executeWith(exec)\n        .stopOnFailure()\n        .run(","sourceCodeStart":169,"sourceCodeEnd":205,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/kafka-connect/kafka-connect/src/main/java/org/apache/iceberg/connect/channel/Coordinator.java#L169-L205","documentation":"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.","triggerScenarios":"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.","commonSituations":"Iceberg catalog outage (REST/Hive/Glue/Nessie unavailable); repeated CommitFailedException from concurrent writers; expired cloud credentials; Kafka broker issues when committing consumer offsets.","solutions":["Read the chained exception in the log for the root cause and address it (catalog connectivity, credentials, contention).","Verify catalog endpoint availability and authentication (check the catalog's own service logs).","Reduce commit conflicts by staggering other Iceberg writers (compaction, maintenance jobs) away from the connector's commit window.","If consecutive failures keep rising until the task aborts, the connector will restart and retry the commit after recovery."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  coordinator.commit(...);\n} catch (RuntimeException e) {\n  // non-partial commit: failure count incremented and retried;\n  // task fails once the consecutive-failure budget is exhausted\n}","preventionTips":["Monitor catalog service health and authentication before/while running the connector.","Avoid competing Iceberg writers during the connector's commit window.","Set alerting on the consecutive-failure count in this log line.","Ensure cloud credentials (if applicable) are rotated without gaps."],"tags":["kafka-connect","commit","retry","catalog"],"backgroundTag":"commit-failed","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}