You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Anjaneya Gupta (Jira)" <ji...@apache.org> on 2026/08/10 15:59:00 UTC
[jira] [Created] (KAFKA-20913) KafkaRaftClient#appendBatch reads a recycled batch buffer in its async commit callback, producing an incorrect appendTimestamp for committed batches
Anjaneya Gupta created KAFKA-20913:
--------------------------------------
Summary: 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: Anjaneya Gupta
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)