yashmayya commented on code in PR #14024: URL: https://github.com/apache/kafka/pull/14024#discussion_r1264950055
########## connect/api/src/main/java/org/apache/kafka/connect/sink/SinkRecord.java: ########## @@ -79,17 +195,21 @@ public boolean equals(Object o) { SinkRecord that = (SinkRecord) o; - if (kafkaOffset != that.kafkaOffset) - return false; - - return timestampType == that.timestampType; + return kafkaOffset == that.kafkaOffset && + timestampType == that.timestampType && + Objects.equals(originalTopic, that.originalTopic) && + Objects.equals(originalKafkaPartition, that.originalKafkaPartition) + && originalKafkaOffset == that.originalKafkaOffset; Review Comment: This change is binary compatible. Source / API compatibility is a bit trickier here however. The existing public constructors for `SinkRecord` have been modified to simply use `topic`, `kafkaPartition`, and `kafkaOffset` for `originalTopic`, `originalKafkaPartition`, and `originalKafkaOffset` respectively (so records created outside the Connect framework that were equal earlier will continue being equal and vice versa). The new constructor which includes the original topic, partition, and offset is now being used by the framework. This means that if there are 2 records with the same post-transform topic, partition, and offset but different pre-transform topic, partition or offset they will now be considered as unequal. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org