danielcweeks commented on code in PR #14510:
URL: https://github.com/apache/iceberg/pull/14510#discussion_r2495974041
##########
kafka-connect/kafka-connect/src/main/java/org/apache/iceberg/connect/channel/Coordinator.java:
##########
@@ -284,6 +290,25 @@ private void commitToTable(
}
}
+ private SnapshotUpdateValidator offsetValidator(
+ TableIdentifier tableIdentifier, Map<Integer, Long> expectedOffsets) {
+
+ return (baseSnapshots, updatedSnapshots) -> {
+ Map<Integer, Long> lastCommittedOffsets =
lastCommittedOffsets(baseSnapshots);
+
+ if (expectedOffsets.isEmpty() && lastCommittedOffsets.isEmpty()) {
Review Comment:
@singhpk234 Let me know if this makes more sense to you based on your other
comment. I think the only valid case for one or the other to be empty is if
you're starting with fresh data (e.g. no persisted offsets).
@bryanck I'd love your feedback here as well.
--
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]