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/04/05 14:27:44 UTC

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

viktorsomogyi commented on code in PR #11748:
URL: https://github.com/apache/kafka/pull/11748#discussion_r842854543


##########
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:
   @mimaison our fix is pretty much the same but a bit more simplistic (uses -1 instead of Optional). I also think no one would rely on that weird behavior so I'm favor in removing that functionality.



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