You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Jun Rao (Jira)" <ji...@apache.org> on 2025/12/17 18:47:00 UTC

[jira] [Created] (KAFKA-20003) Buffer released too early in MemoryPool

Jun Rao created KAFKA-20003:
-------------------------------

             Summary: 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: 4.1.1, 4.0.1, 3.9.1, 3.8.1, 3.7.2, 3.6.2, 3.5.2, 3.4.1, 3.3.2, 3.3.0, 3.2.3, 3.1.2, 3.0.2, 2.8.2, 2.7.2
            Reporter: Jun Rao
             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)