{"record":{"id":"1fe0e55949ef2a2f","repo":"apache/iceberg","slug":"received-commit-response-when-no-commit-in-progres","errorCode":null,"errorMessage":"Received commit response when no commit in progress, this can happen during recovery. Commit ID: {}","messagePattern":"Received commit response when no commit in progress, this can happen during recovery\\. Commit ID: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"kafka-connect/kafka-connect/src/main/java/org/apache/iceberg/connect/channel/CommitState.java","lineNumber":55,"sourceCode":"class CommitState {\n  private static final Logger LOG = LoggerFactory.getLogger(CommitState.class);\n\n  private final List<Envelope> commitBuffer = Lists.newArrayList();\n  private final List<DataComplete> readyBuffer = Lists.newArrayList();\n  private int receivedPartitionCount = 0;\n  private long startTime;\n  private UUID currentCommitId;\n  private final IcebergSinkConfig config;\n\n  CommitState(IcebergSinkConfig config) {\n    this.config = config;\n  }\n\n  void addResponse(Envelope envelope) {\n    commitBuffer.add(envelope);\n    if (!isCommitInProgress()) {\n      DataWritten dataWritten = (DataWritten) envelope.event().payload();\n      LOG.warn(\n          \"Received commit response when no commit in progress, this can happen during recovery. Commit ID: {}\",\n          dataWritten.commitId());\n    }\n  }\n\n  void addReady(Envelope envelope) {\n    DataComplete dataComplete = (DataComplete) envelope.event().payload();\n    readyBuffer.add(dataComplete);\n    if (!isCommitInProgress()) {\n      LOG.warn(\n          \"Received commit ready when no commit in progress, this can happen during recovery. Commit ID: {}\",\n          dataComplete.commitId());\n    } else if (Objects.equals(currentCommitId, dataComplete.commitId())) {\n      receivedPartitionCount += dataComplete.assignments().size();\n    }\n  }\n\n  UUID currentCommitId() {","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/kafka-connect/kafka-connect/src/main/java/org/apache/iceberg/connect/channel/CommitState.java#L37-L73","documentation":"A DataWritten (commit response) envelope arrived while the coordinator was not in an in-progress commit, so the response cannot be matched to a current commit ID. The message is kept in the buffer but a warning is logged because this usually indicates a stale or duplicate response, often after coordinator recovery.","triggerScenarios":"CommitState.addResponse is called with an envelope outside an active commit window — e.g. a delayed Kafka message from a previous coordinator generation, or messages replayed from the coordinator topic during recovery.","commonSituations":"Coordinator task restarted and consuming old/uncommitted coordinator-topic records; slow data workers whose responses arrive after the coordinator timed out or completed the commit; duplicated topic records after rebalances.","solutions":["Treat as benign if it occurs once during coordinator startup/recovery; the stale response is ignored for commit counting.","Increase coordinator consumer poll timeouts or reduce commit interval so responses are not orphaned after timeouts.","Check coordinator topic retention/compaction and consumer group offsets to avoid replaying very old messages.","If warnings recur continuously, verify all connector tasks are on a compatible Iceberg Connect version."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep coordinator commit intervals long enough for data workers to respond before timeout.","Avoid replaying old coordinator-topic records (check consumer group offsets after restarts).","Ensure old coordinator workers are fully terminated after rebalances.","Treat one-off occurrences during recovery as benign; investigate only when persistent."],"tags":["kafka","connect","coordinator","recovery"],"backgroundTag":"unexpected-response-shape","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}