You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/03/22 11:48:20 UTC

[GitHub] [kafka] mimaison commented on a change in pull request #11748: KAFKA-12635: Don't emit checkpoints for partitions without any offset…

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



##########
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:
       Thanks @urbandan and @viktorsomogyi. I think I vaguely understand what you mean, I plan to take a look at the code again this afternoon so hopefully that will become clearer. 
   
   I doubt this "feature" was by design (maybe @ryannedolan can shed some light) as it does not seem useful or it seems pretty broken. Considering we're late in the release process of 3.2, I'll see if I can find a heuristic to filter these topics and keep the current behavior.




-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org