You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by ShunKang Lin <li...@gmail.com> on 2022/09/25 13:51:57 UTC

[DISCUSS] KIP-871: Fix ByteBufferSerializer#serialize(String, ByteBuffer) compatible problem

Hi all,

I'd like to start a new discussion thread on KIP-871 (Kafka Client) which
proposes that fix ByteBufferSerializer#serialize(String, ByteBuffer)
compatible problem.

Links:

KIP:
https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=228495816

Jira: https://issues.apache.org/jira/browse/KAFKA-4852

Thanks,
ShunKang

Re: [DISCUSS] KIP-871: Fix ByteBufferSerializer#serialize(String, ByteBuffer) compatible problem

Posted by ShunKang Lin <li...@gmail.com>.
Hi Guozhang,

Thanks for your comments!

I saw this Jira has been open for 5 years so I thought maybe a KIP was
needed. I will discard this KIP now.

Best,
ShunKang

Guozhang Wang <wa...@gmail.com> 于2022年9月27日周二 06:27写道:

> Hello ShunKang,
>
> Thanks for filing the report. I looked at the source code and I agree it's
> a bug. The reason we did not get it in the past is probably just because we
> were inefficiently keep byte-copying and hence for almost all cases, the
> offset is set to 0 when serialization happens.
>
> Note that this fix does not really require a KIP since it does not change
> any public APIs (for details on what kind of changes require a KIP
> discussion, please see
>
> https://cwiki.apache.org/confluence/display/KAFKA/Kafka+Improvement+Proposals#KafkaImprovementProposals-Whatisconsidereda%22majorchange%22thatneedsaKIP
> ?
> <https://cwiki.apache.org/confluence/display/KAFKA/Kafka+Improvement+Proposals#KafkaImprovementProposals-Whatisconsidereda%22majorchange%22thatneedsaKIP?>
> )
>
>
> Guozhang
>
> On Sun, Sep 25, 2022 at 6:52 AM ShunKang Lin <li...@gmail.com>
> wrote:
>
> > Hi all,
> >
> > I'd like to start a new discussion thread on KIP-871 (Kafka Client) which
> > proposes that fix ByteBufferSerializer#serialize(String, ByteBuffer)
> > compatible problem.
> >
> > Links:
> >
> > KIP:
> >
> https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=228495816
> >
> > Jira: https://issues.apache.org/jira/browse/KAFKA-4852
> >
> > Thanks,
> > ShunKang
> >
>
>
> --
> -- Guozhang
>

Re: [DISCUSS] KIP-871: Fix ByteBufferSerializer#serialize(String, ByteBuffer) compatible problem

Posted by Guozhang Wang <wa...@gmail.com>.
Hello ShunKang,

Thanks for filing the report. I looked at the source code and I agree it's
a bug. The reason we did not get it in the past is probably just because we
were inefficiently keep byte-copying and hence for almost all cases, the
offset is set to 0 when serialization happens.

Note that this fix does not really require a KIP since it does not change
any public APIs (for details on what kind of changes require a KIP
discussion, please see
https://cwiki.apache.org/confluence/display/KAFKA/Kafka+Improvement+Proposals#KafkaImprovementProposals-Whatisconsidereda%22majorchange%22thatneedsaKIP
?)


Guozhang

On Sun, Sep 25, 2022 at 6:52 AM ShunKang Lin <li...@gmail.com>
wrote:

> Hi all,
>
> I'd like to start a new discussion thread on KIP-871 (Kafka Client) which
> proposes that fix ByteBufferSerializer#serialize(String, ByteBuffer)
> compatible problem.
>
> Links:
>
> KIP:
> https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=228495816
>
> Jira: https://issues.apache.org/jira/browse/KAFKA-4852
>
> Thanks,
> ShunKang
>


-- 
-- Guozhang