C0urante commented on code in PR #14567: URL: https://github.com/apache/kafka/pull/14567#discussion_r1364407385
########## connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorSourceTask.java: ########## @@ -266,7 +262,29 @@ private Map<TopicPartition, Long> loadOffsets(Set<TopicPartition> topicPartition private Long loadOffset(TopicPartition topicPartition) { Map<String, Object> wrappedPartition = MirrorUtils.wrapPartition(topicPartition, sourceClusterAlias); Map<String, Object> wrappedOffset = context.offsetStorageReader().offset(wrappedPartition); - return MirrorUtils.unwrapOffset(wrappedOffset) + 1; + return MirrorUtils.unwrapOffset(wrappedOffset); + } + + // visible for testing + void initializeConsumer(Set<TopicPartition> taskTopicPartitions) { + Map<TopicPartition, Long> topicPartitionOffsets = loadOffsets(taskTopicPartitions); + consumer.assign(topicPartitionOffsets.keySet()); + log.info("Starting with {} previously uncommitted partitions.", topicPartitionOffsets.values().stream() Review Comment: IMO the existing log is fine--can you elaborate on why you believe this change is necessary? Logging at INFO level seems okay since this should happen once per task lifecycle, and "Starting with" also seems warranted given that this should only occur during `MirrorSourceTask::start`. -- 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