[
https://issues.apache.org/jira/browse/KAFKA-20003?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18045964#comment-18045964
]
Jun Rao commented on KAFKA-20003:
---------------------------------
This doesn't seem to create a real issue since
ApiKeys.requiresDelayedAllocation is set across all versions of Schema. So, as
long as one version of the schema contains Type.RECORDS,
ApiKeys.requiresDelayedAllocation is set correctly. An existing test
ProtoUtilsTest covers the relevant schemas and didn't break.
> Buffer released too early in MemoryPool
> ---------------------------------------
>
> Key: KAFKA-20003
> URL: https://issues.apache.org/jira/browse/KAFKA-20003
> Project: Kafka
> Issue Type: Bug
> Components: core
> Affects Versions: 2.7.2, 2.8.2, 3.0.2, 3.1.2, 3.2.3, 3.3.0, 3.3.2, 3.4.1,
> 3.5.2, 3.6.2, 3.7.2, 3.8.1, 3.9.1, 4.0.1, 4.1.1
> Reporter: Jun Rao
> Priority: Blocker
> Fix For: 4.2.0
>
>
> https://issues.apache.org/jira/browse/KAFKA-10386 we introduced
> Type.COMPACT_RECORDS in SchemaGenerator. However, we forgot to add
> Type.COMPACT_RECORDS to ApiKeys.retainsBufferReference(). This can cause the
> buffer in MemoryPool to be released too early, leading the data corruption
> and potential other weird problems.
>
> This issue is already fixed via
> https://issues.apache.org/jira/browse/KAFKA-19634, but the changes are large.
> We probably should just fix the issue in ApiKeys.retainsBufferReference() in
> 4.2.0 and earlier versions.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)