danielcweeks commented on code in PR #14979:
URL: https://github.com/apache/iceberg/pull/14979#discussion_r2674100123


##########
kafka-connect/kafka-connect/src/main/java/org/apache/iceberg/connect/channel/Coordinator.java:
##########
@@ -227,6 +229,22 @@ private void commitToTable(
                   return minOffset == null || envelope.offset() >= minOffset;
                 })
             .map(envelope -> (DataWritten) envelope.event().payload())
+            .filter(
+                payload -> {
+                  UUID expectedUuid = tableReference.uuid();
+                  UUID payloadTableUuid = payload.tableReference().uuid();
+
+                  if (expectedUuid != null && 
!expectedUuid.equals(payloadTableUuid)) {

Review Comment:
   @bryanck has a good point here.  The envelopes are already collected by 
TableReference before reaching this point.  All we need is to ensure that the 
latest loaded table is consistent with the table reference used to partition 
the messages.



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