You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/10/16 18:02:00 UTC

[jira] [Commented] (KAFKA-7501) double deallocation of producer batch upon expiration of inflight requests and error response

    [ https://issues.apache.org/jira/browse/KAFKA-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16652159#comment-16652159 ] 

ASF GitHub Bot commented on KAFKA-7501:
---------------------------------------

xiowu0 opened a new pull request #5807: KAFKA-7501: fix producer batch double deallocation when receiving message too large error on expired batch
URL: https://github.com/apache/kafka/pull/5807
 
 
   Kafka will try to deallocate a batch twice and throw IllegalStateException when a "MESSAGE_TOO_LARGE" response arrived after the inflight batch is expired. This patch fixes the issue.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> double deallocation of producer batch upon expiration of inflight requests and error response
> ---------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-7501
>                 URL: https://issues.apache.org/jira/browse/KAFKA-7501
>             Project: Kafka
>          Issue Type: Bug
>          Components: clients
>            Reporter: xiongqi wu
>            Assignee: xiongqi wu
>            Priority: Major
>
> The following event sequence will lead to double deallocation of a producer batch.
> 1) a producer batch is sent and the response is not received. 
> 2) the inflight producer batch is expired when deliveryTimeoutMs has reached.  The  sender fail the producer batch via "failBatch" and the producer batch is deallocated via "accumulator.deallocate(batch)". 
> 3) the response for the batch finally arrived after batch expiration, and the response contains the error "Errors.MESSAGE_TOO_LARGE" .
> 4) the producer batch is split and the original batch is deallocated a second time. As a result, the "IllegalStateException" will be raised. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)