gharris1727 commented on code in PR #13178: URL: https://github.com/apache/kafka/pull/13178#discussion_r1100622077
########## connect/mirror/src/main/java/org/apache/kafka/connect/mirror/OffsetSyncStore.java: ########## @@ -56,8 +56,7 @@ OptionalLong translateDownstream(TopicPartition sourceTopicPartition, long upstr // Offset is too far in the past to translate accurately return OptionalLong.of(-1L); } - long upstreamStep = upstreamOffset - offsetSync.get().upstreamOffset(); - return OptionalLong.of(offsetSync.get().downstreamOffset() + upstreamStep); + return OptionalLong.of(offsetSync.get().downstreamOffset() + (offsetSync.get().upstreamOffset() == upstreamOffset ? 0 : 1)); Review Comment: Let me know if this description makes sense to you, and if the diagram adds any value. -- 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-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org