You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "mjsax (via GitHub)" <gi...@apache.org> on 2025/01/09 19:51:05 UTC
[PR] KAFKA-17825: Update docs for ByteBufferDeserializer changes in 3.6 release [kafka]
mjsax opened a new pull request, #18466:
URL: https://github.com/apache/kafka/pull/18466
KIP-863 introduced a change to ByteBufferDeserializer which is not properly documented, but should be called out because it could surface bugs in application code which using ByteBufferDeserializer.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-17825: Update docs for ByteBufferDeserializer changes in 3.6 release [kafka]
Posted by "kirktrue (via GitHub)" <gi...@apache.org>.
kirktrue commented on code in PR #18466:
URL: https://github.com/apache/kafka/pull/18466#discussion_r1909373739
##########
docs/upgrade.html:
##########
@@ -688,6 +688,10 @@ <h5><a id="upgrade_360_notable" href="#upgrade_360_notable">Notable changes in 3
The configuration can also be updated dynamically and is applied to the broker. Workloads running on version 3.6.0 with compression can experience
InvalidRecordExceptions and UnknownServerExceptions. Upgrading to 3.6.1 or newer or disabling the feature fixes the issue.
</li>
+ <li>The <code>ByteBufferDeserializer</code> (<a href="https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=225152035">KIP-863</a>)
+ was changed to avoid unnecessary deep-copies of data. This changes the behavior of the deserializer as user code cannot make any assumptions
+ about buffer position, limit, capactiy any longer.
Review Comment:
```suggestion
about buffer position, limit, capacity any longer.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-17825: Update docs for ByteBufferDeserializer changes in 3.6 release [kafka]
Posted by "mjsax (via GitHub)" <gi...@apache.org>.
mjsax commented on code in PR #18466:
URL: https://github.com/apache/kafka/pull/18466#discussion_r1909394092
##########
docs/upgrade.html:
##########
@@ -656,9 +656,9 @@ <h5><a id="upgrade_360_notable" href="#upgrade_360_notable">Notable changes in 3
<li>The Apache Zookeeper dependency has been upgraded to 3.8.1 due to 3.6 reaching end-of-life. To bring both your
Kafka and Zookeeper clusters to the latest versions:
<ul>
- <li><b>>=2.4</b> Kafka clusters can be updated directly.
+ <li><b>>=2.4</b> Kafka clusters can be updated directly.
Zookeeper clusters which are running binaries bundled with Kafka versions 2.4 or above can be updated directly.</li>
- <li><b><2.4</b> Kafka clusters first need to be updated to a version greater than 2.4 and smaller than 3.6.
+ <li><b><2.4</b> Kafka clusters first need to be updated to a version greater than 2.4 and smaller than 3.6.
Review Comment:
Side cleanup of broker html
##########
docs/upgrade.html:
##########
@@ -656,9 +656,9 @@ <h5><a id="upgrade_360_notable" href="#upgrade_360_notable">Notable changes in 3
<li>The Apache Zookeeper dependency has been upgraded to 3.8.1 due to 3.6 reaching end-of-life. To bring both your
Kafka and Zookeeper clusters to the latest versions:
<ul>
- <li><b>>=2.4</b> Kafka clusters can be updated directly.
+ <li><b>>=2.4</b> Kafka clusters can be updated directly.
Review Comment:
Side cleanup of broker html
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-17825: Update docs for ByteBufferDeserializer changes in 3.6 release [kafka]
Posted by "lianetm (via GitHub)" <gi...@apache.org>.
lianetm commented on code in PR #18466:
URL: https://github.com/apache/kafka/pull/18466#discussion_r1909364677
##########
docs/upgrade.html:
##########
@@ -688,6 +688,10 @@ <h5><a id="upgrade_360_notable" href="#upgrade_360_notable">Notable changes in 3
The configuration can also be updated dynamically and is applied to the broker. Workloads running on version 3.6.0 with compression can experience
InvalidRecordExceptions and UnknownServerExceptions. Upgrading to 3.6.1 or newer or disabling the feature fixes the issue.
</li>
+ <li>The <code>ByteBufferDeserializer</code> (<a href="https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=225152035">KIP-863</a>)
+ was change to avoid unnessary deep-copies of data. This changes the behavior of the deserializer as user code cannot make any assumptions
Review Comment:
```suggestion
was changed to avoid unnecessary deep-copies of data. This changes the behavior of the deserializer as user code cannot make any assumptions
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-17825: Update docs for ByteBufferDeserializer changes in 3.6 release [kafka]
Posted by "kirktrue (via GitHub)" <gi...@apache.org>.
kirktrue commented on code in PR #18466:
URL: https://github.com/apache/kafka/pull/18466#discussion_r1909471600
##########
clients/src/main/java/org/apache/kafka/common/serialization/Deserializer.java:
##########
@@ -63,7 +63,15 @@ default T deserialize(String topic, Headers headers, byte[] data) {
}
/**
- * Deserialize a record value from a ByteBuffer into a value or object.
+ * Deserialize a record value from a {@link ByteBuffer} into a value or object.
+ *
+ * <p>If {@code ByteBufferDeserializer} is used by an application, the application code cannot make any assumptions
+ * about the returned {@link ByteBuffer} like the position, limit, capacity, etc., or if it is backed by
+ * {@link ByteBuffer#hasArray() an array or not}.
+ *
+ * <p>Similarly, if this method is overwritten, the implementation cannot make any assumptions about the
Review Comment:
```suggestion
* <p>Similarly, if this method is overridden, the implementation cannot make any assumptions about the
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-17825: Update docs for ByteBufferDeserializer changes in 3.6 release [kafka]
Posted by "mjsax (via GitHub)" <gi...@apache.org>.
mjsax commented on PR #18466:
URL: https://github.com/apache/kafka/pull/18466#issuecomment-2584874328
Merged to `trunk` and cherry-picked to `4.0`, `3.9`, `3.8`, `3.7`, and `3.6` branches.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-17825: Update docs for ByteBufferDeserializer changes in 3.6 release [kafka]
Posted by "mjsax (via GitHub)" <gi...@apache.org>.
mjsax merged PR #18466:
URL: https://github.com/apache/kafka/pull/18466
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org