Justinwins created KAFKA-14022:
----------------------------------
Summary: 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
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)