Thank you for your comment, Divij. 4. Do you still have any questions about #4?
5. I add test case for ByteBufferSerializer backward compatibility: https://github.com/apache/kafka/pull/12685/commits/393af38c27ec8d810a2326ac4b89a53b177e3ee1 Best, ShunKang Divij Vaidya <divijvaidy...@gmail.com> 于2023年4月19日周三 00:45写道: > 3. Ok. Seems like there is no way around to enforce better semantics and > maintain backward compatibility as well! Let's go ahead with what you > proposed and create a JIRA to fix the semantics in version 4.x. My comment > is resolved here. > > -- > Divij Vaidya > > > > On Mon, Apr 10, 2023 at 6:47 AM ShunKang Lin <linshunkang....@gmail.com> > wrote: > > > Thanks for your comment. > > > > This KIP does not modify ByteBufferSerializer#serialize(), so do we need > to > > clarify this aspect on motivation? > > > > Best, > > ShunKang > > > > Ismael Juma <ism...@juma.me.uk>于2023年4月10日 周一12:37写道: > > > > > Hi, > > > > > > One interesting aspect is that the current `ByteBufferSerializer` > avoids > > > copies in the following case: > > > > > > if (data.hasArray()) { > > > final byte[] arr = data.array(); > > > if (data.arrayOffset() == 0 && arr.length == data.remaining()) { > > > return arr; > > > } > > > } > > > > > > It would be good to clarify this aspect in the motivation. What kind of > > > copies would we avoid (eg direct byte buffers, byte buffer views, > etc.). > > > > > > Ismael > > > > > > On Sun, Sep 25, 2022 at 8:59 AM ShunKang Lin < > linshunkang....@gmail.com> > > > wrote: > > > > > > > Hi all, I'd like to start a new discussion thread on KIP-872 (Kafka > > > Client) > > > > which proposes that add Serializer#serializeToByteBuffer() to reduce > > > memory > > > > copying. > > > > > > > > KIP: > > > > > > > > > > https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=228495828 > > > > Thanks, ShunKang > > > > > > > > > >