New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KAFKA-15602: revert KAFKA-4852 #14617
Conversation
This PR reverts - apache@51dbd17 - apache@496ae05
* serializer.serialize(topic, buffer); // Serialize buffer | ||
* </pre> | ||
* </blockquote> | ||
* {@code ByteBufferSerializer} always rewinds to zero for serialization. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"rewinds the position to zero"
Should we also explicitly mention rewind()
is used?
clients/src/main/java/org/apache/kafka/common/serialization/ByteBufferSerializer.java
Outdated
Show resolved
Hide resolved
…teBufferSerializer.java Co-authored-by: Philip Nee <pnee@confluent.io>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think we need to cover the test case for:
ByteBuffer.allocate(8).put("test".getBytes(UTF_8))
and
ByteBuffer.allocate(8).put("test".getBytes(UTF_8)).flip()
I would focusing on reverting -- if we want to update tests, we can do it in a separate PR? |
@showuon Considering this for 3.5.2 bug-fix release. (Given that we wait for RocksDB testing to complete -- we are on it -- we could squeeze this one in, too?). Also \cc @guozhangwang who merge the original PR. |
Hi @mjsax - I think so too. |
Thanks @mjsax I read the JIRA description and all discussions and I agree we can revert the changes asap before we have a thorough KIP discussion on what should be the right semantics (and for that semantics I agree with your comment that is the only one that makes sense in the JIRA as well, btw). |
Merged to |
This PR reverts - apache@51dbd17 - apache@496ae05 Reviewers: Philip Nee <pnee@confluent.io>, Guozhang Wang <guozhang@confluent.io>
This PR reverts - apache@51dbd17 - apache@496ae05 Reviewers: Philip Nee <pnee@confluent.io>, Guozhang Wang <guozhang@confluent.io>
This PR reverts - apache@51dbd17 - apache@496ae05 Reviewers: Philip Nee <pnee@confluent.io>, Guozhang Wang <guozhang@confluent.io> Co-authored-by: Matthias J. Sax <matthias@confluent.io>
This PR reverts - apache@51dbd17 - apache@496ae05 Reviewers: Philip Nee <pnee@confluent.io>, Guozhang Wang <guozhang@confluent.io>
This PR reverts - apache@51dbd17 - apache@496ae05 Reviewers: Philip Nee <pnee@confluent.io>, Guozhang Wang <guozhang@confluent.io>
This PR reverts
Also added some JavaDocs to
ByteBufferSerializer
to explain the contract.