thswlsqls commented on code in PR #17080:
URL: https://github.com/apache/iceberg/pull/17080#discussion_r4139674971


##########
kafka-connect/kafka-connect/src/main/java/org/apache/iceberg/connect/channel/CommitState.java:
##########
@@ -60,12 +60,12 @@ void addResponse(Envelope envelope) {
 
   void addReady(Envelope envelope) {
     DataComplete dataComplete = (DataComplete) envelope.event().payload();
-    readyBuffer.add(dataComplete);
     if (!isCommitInProgress()) {
       LOG.warn(
           "Received commit ready when no commit in progress, this can happen 
during recovery. Commit ID: {}",
           dataComplete.commitId());
     } else if (Objects.equals(currentCommitId, dataComplete.commitId())) {
+      readyBuffer.add(dataComplete);
       receivedPartitionCount += dataComplete.assignments().size();
     }

Review Comment:
   @bryanck Thanks — agreed, I'll add an `else` branch in `addReady()` that 
logs the dropped commit ID together with the current one.
   
   I'll use `warn` to match the "no commit in progress" message right above it. 
Happy to lower it to `info` if you'd prefer.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to