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

Jiangjie Qin commented on KAFKA-4232:
-------------------------------------

Yes. The description was not accurate. I was initially thinking it was because 
we left a closed batch in the queue, but that might not be the key issue. The 
actual problem is because the missing volatile annotation. Previously only 
sender thread will close batches and it will remove a batch from the queue 
right after closing it, so no other thread will see a closed batch in the 
queue. KAFKA-3747 just exposed the issue because now a user thread may close a 
batch without removing it from the queue. I'll update the description. 

> IllegalStateException may be thrown from producer.send() when a batch is full.
> ------------------------------------------------------------------------------
>
>                 Key: KAFKA-4232
>                 URL: https://issues.apache.org/jira/browse/KAFKA-4232
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.10.0.0
>            Reporter: Jiangjie Qin
>            Assignee: Jiangjie Qin
>            Priority: Blocker
>             Fix For: 0.10.1.0
>
>
> We used to leave the batch not closed if an append failed due to batch is 
> full. In KAFKA-3747, we changed the behavior to close the batch to save the 
> memory. However, this would leave a closed batch at the end of the deque and 
> may cause a subsequent append fail due to MemoryRecords not writable.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to