Jheng-Sing Chen created KAFKA-20643:
---------------------------------------

             Summary: Share common implementation for downstream offset 
translation boundary in MirrorMaker offset syncs
                 Key: KAFKA-20643
                 URL: https://issues.apache.org/jira/browse/KAFKA-20643
             Project: Kafka
          Issue Type: Improvement
          Components: connect, mirrormaker
            Reporter: Jheng-Sing Chen
            Assignee: Jheng-Sing Chen


OffsetSyncWriter.PartitionState currently determines whether the translated 
downstream offset is too stale using:

downstreamOffset - (lastSyncDownstreamOffset + 1) >= maxOffsetLag

The +1 is required because OffsetSyncStore.translateDownstream translates 
consumer group offsets beyond the latest sync to at most one downstream offset 
past the sync.

This relationship is currently enforced only by a comment/TODO in 
OffsetSyncWriter. If the translation logic in OffsetSyncStore changes without a 
matching update in OffsetSyncWriter, stale offset sync detection may become 
inconsistent.

We should extract the shared downstream translation boundary logic into a 
common helper and use it from both OffsetSyncStore.translateDownstream and 
OffsetSyncWriter.PartitionState.update.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to