[ 
https://issues.apache.org/jira/browse/KAFKA-15144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17740732#comment-17740732
 ] 

Greg Harris commented on KAFKA-15144:
-------------------------------------

Yes [~ecomar] I think the documentation about the checkpoints topic is lacking, 
I see that the MM2 KIP just gives the schema and the 
RemoteClusterUtils/MirrorClient implementations and no further details.
In some discussions recently some people have questioned if anyone is reading 
the checkpoints topic directly; it's good to know that the contents of the 
topic is relevant for you.

> in the past one of our tests was written expecting to find the exact match 
> for upstream/downsteram because that was the externally visible behavior when 
> all wasd good.

Unfortunately this is only true in rather specific circumstances, before or 
after the recent changes. If MirrorSource were to uncleanly restart, or if the 
upstream topic had transaction markers, then the offsets of the source and 
target records will not correspond directly.
For testing the translation, I found it helpful to set `offset.lag.max=0`, and 
only rely on offset translation at the _end_ of the topic between batches. I 
hope fixing your tests goes well.

> MM2 Checkpoint downstreamOffset stuck to 1
> ------------------------------------------
>
>                 Key: KAFKA-15144
>                 URL: https://issues.apache.org/jira/browse/KAFKA-15144
>             Project: Kafka
>          Issue Type: Bug
>          Components: mirrormaker
>            Reporter: Edoardo Comar
>            Assignee: Edoardo Comar
>            Priority: Major
>         Attachments: edo-connect-mirror-maker-sourcetarget.properties
>
>
> Steps to reproduce :
> 1.Start the source cluster
> 2.Start the target cluster
> 3.Start connect-mirror-maker.sh using a config like the attached
> 4.Create a topic in source cluster
> 5.produce a few messages
> 6.consume them all with autocommit enabled
>  
> 7. then dump the Checkpoint topic content e.g.
> {{% bin/kafka-console-consumer.sh --bootstrap-server localhost:9192 --topic 
> source.checkpoints.internal --from-beginning --formatter 
> org.apache.kafka.connect.mirror.formatters.CheckpointFormatter}}
> {{{}Checkpoint{consumerGroupId=edogroup, 
> topicPartition=source.vf-mirroring-test-edo-0, upstreamOffset=3, 
> {*}downstreamOffset=1{*}, metadata={}}}}
>  
> the downstreamOffset remains at 1, while, in a fresh cluster pair like with 
> the source topic created while MM2 is running, 
> I'd expect the downstreamOffset to match the upstreamOffset.
> Note that dumping the offset sync topic, shows matching initial offsets
> {{% bin/kafka-console-consumer.sh --bootstrap-server localhost:9192 --topic 
> mm2-offset-syncs.source.internal --from-beginning --formatter 
> org.apache.kafka.connect.mirror.formatters.OffsetSyncFormatter}}
> {{{}OffsetSync{topicPartition=vf-mirroring-test-edo-0, upstreamOffset=0, 
> downstreamOffset=0{}}}}
>  
>  
>  



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

Reply via email to