mimaison commented on a change in pull request #11748:
URL: https://github.com/apache/kafka/pull/11748#discussion_r832274976



##########
File path: 
connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorCheckpointTask.java
##########
@@ -169,6 +172,7 @@ public String version() {
         return listConsumerGroupOffsets(group).entrySet().stream()
             .filter(x -> shouldCheckpointTopic(x.getKey().topic()))
             .map(x -> checkpoint(group, x.getKey(), x.getValue()))
+            .flatMap(o -> o.map(Stream::of).orElseGet(Stream::empty)) // do 
not emit checkpoints for partitions that don't have offset-syncs

Review comment:
       I've looked at this more closely. 
   
   MirrorSourceConnector correctly prevents loops but it's not the case for 
MirrorCheckpointConnector. It's not clear why they have different 
`shouldReplicateTopic()` methods. I don't understand the point of this 
behavior, surely it must be a bug. I don't see a use in having untranslated 
checkpoints from remote offsets. 
   
   If we agree it's unexpected behavior and can't see why anybody would rely on 
this, I think it's ok to remove it. Then this would allow us to do some 
cleanups, ie update `renameTopicPartition()`, have a single 
`shouldReplicateTopic()` method.




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


Reply via email to