You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Justinwins (Jira)" <ji...@apache.org> on 2022/06/25 10:26:00 UTC

[jira] [Resolved] (KAFKA-14022) MirrorCheckpointTask.syncGroupOffset does not have to check if translated offset from upstream is smaller than the current consumer offset

     [ https://issues.apache.org/jira/browse/KAFKA-14022?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Justinwins resolved KAFKA-14022.
--------------------------------
    Resolution: Duplicate

> MirrorCheckpointTask.syncGroupOffset  does not have to check if translated offset from upstream is smaller than the current consumer offset
> -------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-14022
>                 URL: https://issues.apache.org/jira/browse/KAFKA-14022
>             Project: Kafka
>          Issue Type: Improvement
>          Components: KafkaConnect
>    Affects Versions: 3.2.0
>            Reporter: Justinwins
>            Assignee: Justinwins
>            Priority: Minor
>         Attachments: MirrorCheckpointTask.java
>
>
> In  MirrorCheckpointTask.syncGroupOffset () , there  is  a dedicated check , as described :
> (line 285)
>  
> {code:java}
> // code placeholder
> // if translated offset from upstream is smaller than the current consumer offset
> // in the target, skip updating the offset for that partition
> long latestDownstreamOffset = targetConsumerOffset.get(topicPartition).offset();
> if (latestDownstreamOffset >= convertedOffset.offset()) {
> log.trace("latestDownstreamOffset {} is larger than or equal to convertedUpstreamOffset {} for "
> + "TopicPartition {}", latestDownstreamOffset, convertedOffset.offset(), topicPartition);
> continue;
> }
> offsetToSync.put(topicPartition, convertedOffset); {code}
>  
> I think there is no need to check 'whether translated offset from upstream is smaller than the current consumer offset' ,as downstream offsets are better to keep up with upstream 
> offsets.Let's say, we reset offset for upstream , it is expected that downstream offsets are synced accordingly ,too
>  



--
This message was sent by Atlassian Jira
(v8.20.7#820007)