[ https://issues.apache.org/jira/browse/KAFKA-14023?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Greg Harris resolved KAFKA-14023. --------------------------------- Resolution: Won't Do > MirrorCheckpointTask.syncGroupOffset does not have to check if translated > offset from upstream is smaller than the current consumer offset > ------------------------------------------------------------------------------------------------------------------------------------------- > > Key: KAFKA-14023 > URL: https://issues.apache.org/jira/browse/KAFKA-14023 > Project: Kafka > Issue Type: Improvement > Components: KafkaConnect, mirrormaker > Affects Versions: 3.2.0 > Reporter: Justinwins > Assignee: Justinwins > Priority: Minor > > 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.10#820010)