You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Samuel Cantero <sc...@gmail.com> on 2020/10/03 20:50:58 UTC

MM2 offset translations not working

Hi all,

It looks like the offsets returned by the
RemoteClusterUtils.translateOffsets are always the same as the
source/primary cluster, i.e, there's no actual translation.

The upstream offsets are fine but the downstream are not (it is just the
same as the upstream one). After a quick look, it seems the bug might be on
the writer of the source-cluster-alias.checkpoints.internal topic rather
than on this lib that decodes it.

I have double checked the log-end-offset of the topic on the target cluster
via
./kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list
KAFKA-CONN-STR --time -1 --topic TOPIC

This gives me confirmation that there's no actual translation.

To double check it is not just my app, I enabled sync.group.offsets.enabled
<https://cwiki.apache.org/confluence/display/KAFKA/KIP-545%3A+support+automated+consumer+offset+sync+across+clusters+in+MM+2.0>
and
I can find the same problem. So I think there's a bug unless I'm doing
something wrong.

I'm using the latest changes from trunk. Anyone hitting the same issue?

Best,

Re: MM2 offset translations not working

Posted by Samuel Cantero <sc...@gmail.com>.
I can confirm this was failing because I was setting
*source.consumer.auto.offset.reset:
“latest”*. Setting it back to *earliest* makes it work again.

This was working for me on 2.5.1 only because I didn't have my fix that
allows *source.consumer.auto.offset.reset: “latest”*. Override was not
working and hence offset translation was working. So this feature works
from "trunk" too.

Sharing it here in case someone comes across this in the future.

Best,

On Mon, Oct 5, 2020 at 6:02 PM Samuel Cantero <sc...@gmail.com> wrote:

> This is working for 2.5.1 but broken for trunk (or master).
>
> On Mon, Oct 5, 2020 at 5:19 PM Samuel Cantero <sc...@gmail.com> wrote:
>
>> oh no, actually I was wrong. We have the same problem.
>>
>> On Mon, Oct 5, 2020 at 5:17 PM Samuel Cantero <sc...@gmail.com>
>> wrote:
>>
>>> It seems the problem is just between kafka 0.10.x --> kafka 2.x. It is
>>> working fine for kafka 2.x --> 2.x.
>>>
>>> On Sat, Oct 3, 2020 at 4:50 PM Samuel Cantero <sc...@gmail.com>
>>> wrote:
>>>
>>>> Hi all,
>>>>
>>>> It looks like the offsets returned by the
>>>> RemoteClusterUtils.translateOffsets are always the same as the
>>>> source/primary cluster, i.e, there's no actual translation.
>>>>
>>>> The upstream offsets are fine but the downstream are not (it is just
>>>> the same as the upstream one). After a quick look, it seems the bug might
>>>> be on the writer of the source-cluster-alias.checkpoints.internal
>>>> topic rather than on this lib that decodes it.
>>>>
>>>> I have double checked the log-end-offset of the topic on the target
>>>> cluster via
>>>> ./kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list
>>>> KAFKA-CONN-STR --time -1 --topic TOPIC
>>>>
>>>> This gives me confirmation that there's no actual translation.
>>>>
>>>> To double check it is not just my app, I enabled
>>>> sync.group.offsets.enabled
>>>> <https://cwiki.apache.org/confluence/display/KAFKA/KIP-545%3A+support+automated+consumer+offset+sync+across+clusters+in+MM+2.0> and
>>>> I can find the same problem. So I think there's a bug unless I'm doing
>>>> something wrong.
>>>>
>>>> I'm using the latest changes from trunk. Anyone hitting the same issue?
>>>>
>>>> Best,
>>>>
>>>

Re: MM2 offset translations not working

Posted by Samuel Cantero <sc...@gmail.com>.
This is working for 2.5.1 but broken for trunk (or master).

On Mon, Oct 5, 2020 at 5:19 PM Samuel Cantero <sc...@gmail.com> wrote:

> oh no, actually I was wrong. We have the same problem.
>
> On Mon, Oct 5, 2020 at 5:17 PM Samuel Cantero <sc...@gmail.com> wrote:
>
>> It seems the problem is just between kafka 0.10.x --> kafka 2.x. It is
>> working fine for kafka 2.x --> 2.x.
>>
>> On Sat, Oct 3, 2020 at 4:50 PM Samuel Cantero <sc...@gmail.com>
>> wrote:
>>
>>> Hi all,
>>>
>>> It looks like the offsets returned by the
>>> RemoteClusterUtils.translateOffsets are always the same as the
>>> source/primary cluster, i.e, there's no actual translation.
>>>
>>> The upstream offsets are fine but the downstream are not (it is just the
>>> same as the upstream one). After a quick look, it seems the bug might be on
>>> the writer of the source-cluster-alias.checkpoints.internal topic
>>> rather than on this lib that decodes it.
>>>
>>> I have double checked the log-end-offset of the topic on the target
>>> cluster via
>>> ./kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list
>>> KAFKA-CONN-STR --time -1 --topic TOPIC
>>>
>>> This gives me confirmation that there's no actual translation.
>>>
>>> To double check it is not just my app, I enabled
>>> sync.group.offsets.enabled
>>> <https://cwiki.apache.org/confluence/display/KAFKA/KIP-545%3A+support+automated+consumer+offset+sync+across+clusters+in+MM+2.0> and
>>> I can find the same problem. So I think there's a bug unless I'm doing
>>> something wrong.
>>>
>>> I'm using the latest changes from trunk. Anyone hitting the same issue?
>>>
>>> Best,
>>>
>>

Re: MM2 offset translations not working

Posted by Samuel Cantero <sc...@gmail.com>.
oh no, actually I was wrong. We have the same problem.

On Mon, Oct 5, 2020 at 5:17 PM Samuel Cantero <sc...@gmail.com> wrote:

> It seems the problem is just between kafka 0.10.x --> kafka 2.x. It is
> working fine for kafka 2.x --> 2.x.
>
> On Sat, Oct 3, 2020 at 4:50 PM Samuel Cantero <sc...@gmail.com> wrote:
>
>> Hi all,
>>
>> It looks like the offsets returned by the
>> RemoteClusterUtils.translateOffsets are always the same as the
>> source/primary cluster, i.e, there's no actual translation.
>>
>> The upstream offsets are fine but the downstream are not (it is just the
>> same as the upstream one). After a quick look, it seems the bug might be on
>> the writer of the source-cluster-alias.checkpoints.internal topic rather
>> than on this lib that decodes it.
>>
>> I have double checked the log-end-offset of the topic on the target
>> cluster via
>> ./kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list
>> KAFKA-CONN-STR --time -1 --topic TOPIC
>>
>> This gives me confirmation that there's no actual translation.
>>
>> To double check it is not just my app, I enabled
>> sync.group.offsets.enabled
>> <https://cwiki.apache.org/confluence/display/KAFKA/KIP-545%3A+support+automated+consumer+offset+sync+across+clusters+in+MM+2.0> and
>> I can find the same problem. So I think there's a bug unless I'm doing
>> something wrong.
>>
>> I'm using the latest changes from trunk. Anyone hitting the same issue?
>>
>> Best,
>>
>

Re: MM2 offset translations not working

Posted by Samuel Cantero <sc...@gmail.com>.
It seems the problem is just between kafka 0.10.x --> kafka 2.x. It is
working fine for kafka 2.x --> 2.x.

On Sat, Oct 3, 2020 at 4:50 PM Samuel Cantero <sc...@gmail.com> wrote:

> Hi all,
>
> It looks like the offsets returned by the
> RemoteClusterUtils.translateOffsets are always the same as the
> source/primary cluster, i.e, there's no actual translation.
>
> The upstream offsets are fine but the downstream are not (it is just the
> same as the upstream one). After a quick look, it seems the bug might be on
> the writer of the source-cluster-alias.checkpoints.internal topic rather
> than on this lib that decodes it.
>
> I have double checked the log-end-offset of the topic on the target
> cluster via
> ./kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list
> KAFKA-CONN-STR --time -1 --topic TOPIC
>
> This gives me confirmation that there's no actual translation.
>
> To double check it is not just my app, I enabled
> sync.group.offsets.enabled
> <https://cwiki.apache.org/confluence/display/KAFKA/KIP-545%3A+support+automated+consumer+offset+sync+across+clusters+in+MM+2.0> and
> I can find the same problem. So I think there's a bug unless I'm doing
> something wrong.
>
> I'm using the latest changes from trunk. Anyone hitting the same issue?
>
> Best,
>