wombatu-kun commented on code in PR #17925:
URL: https://github.com/apache/iceberg/pull/17925#discussion_r3985503683


##########
kafka-connect/kafka-connect/src/main/java/org/apache/iceberg/connect/channel/CommitState.java:
##########
@@ -66,7 +69,16 @@ void addReady(Envelope envelope) {
           "Received commit ready when no commit in progress, this can happen 
during recovery. Commit ID: {}",
           dataComplete.commitId());
     } else if (Objects.equals(currentCommitId, dataComplete.commitId())) {
-      receivedPartitionCount += dataComplete.assignments().size();
+      // Track which source partitions reported rather than how many responses 
arrived. The same

Review Comment:
   This comment still defends the set against double counting a quorum, but 
readiness is now a `containsAll` check against `expectedPartitions`, which a 
duplicate report cannot satisfy whether or not the set de-duplicates it. Drop 
it, or reduce it to one line on what the set records.



##########
kafka-connect/kafka-connect/src/main/java/org/apache/iceberg/connect/channel/Coordinator.java:
##########
@@ -98,8 +100,10 @@ class Coordinator extends Channel {
 
     this.catalog = catalog;
     this.config = config;
-    this.totalPartitionCount =
-        members.stream().mapToInt(desc -> 
desc.assignment().topicPartitions().size()).sum();
+    this.expectedPartitions =

Review Comment:
   #17450, already approved, replaces `members` in this constructor with an 
`int` count summed from `partitionsFor`, so whichever of the two lands second 
either loses the source of this set or turns readiness back into a count. 
Should the expected set be reconciled with that PR now, e.g. by building it 
from the same partition metadata?



-- 
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