You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Shantanu (Jira)" <ji...@apache.org> on 2026/08/30 05:26:00 UTC

[jira] [Assigned] (KAFKA-20913) KafkaRaftClient#appendBatch reads a recycled batch buffer in its async commit callback, producing an incorrect appendTimestamp for committed batches

     [ https://issues.apache.org/jira/browse/KAFKA-20913?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shantanu reassigned KAFKA-20913:
--------------------------------

    Assignee: Shantanu  (was: Anjaneya Gupta)

> KafkaRaftClient#appendBatch reads a recycled batch buffer in its async commit callback, producing an incorrect appendTimestamp for committed batches
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-20913
>                 URL: https://issues.apache.org/jira/browse/KAFKA-20913
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Anjaneya Gupta
>            Assignee: Shantanu
>            Priority: Minor
>
> On the leader, KafkaRaftClient#appendBatch registers an asynchronous commit callback and then releases the batch's memory buffer back to the pool in a finally block. The callback runs later (once the batch commits) and reads CompletedBatch#appendTimestamp() out of that buffer. By then the buffer may have been reused by a newer batch, so the callback reads the newer batch's timestamp and delivers the wrong appendTimestamp to the commit listener.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)