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

Sean McCauliff updated KAFKA-4840:
----------------------------------
    Description: 
There are several problems dealing with errors in  BufferPool.allocate(int 
size, long maxTimeToBlockMs):

* The accumulated number of bytes are not put back into the available pool when 
an exception happens and a thread is waiting for bytes to become available.  
This will cause the capacity of the buffer pool to decrease over time any time 
a timeout is hit within this method.
* If a Throwable other than InterruptedException is thrown out of await() for 
some reason or if there is an exception thrown in the corresponding finally 
block around the await(), for example if waitTime.record(.....) throws an 
exception, then the waiters are not removed from the waiters deque.
* On timeout or other exception waiters could be signaled, but are not.  If no 
other buffers are freed then the next waiting thread will also timeout and so 
on.


  was:
In BufferPool.allocate(int size, long maxTimeToBlockMs):
If a Throwable other than InterruptedException is thrown out of await() for 
some reason or if there is an exception thrown in the corresponding finally 
block around the await(), for example if waitTime.record(.....) throws an 
exception, then the waiters are not removed from the waiters deque.

The number of available bytes are also not restored when an exception happens.


> There are are still cases where producer buffer pool will not remove waiters.
> -----------------------------------------------------------------------------
>
>                 Key: KAFKA-4840
>                 URL: https://issues.apache.org/jira/browse/KAFKA-4840
>             Project: Kafka
>          Issue Type: Bug
>          Components: clients
>    Affects Versions: 0.10.2.0
>            Reporter: Sean McCauliff
>
> There are several problems dealing with errors in  BufferPool.allocate(int 
> size, long maxTimeToBlockMs):
> * The accumulated number of bytes are not put back into the available pool 
> when an exception happens and a thread is waiting for bytes to become 
> available.  This will cause the capacity of the buffer pool to decrease over 
> time any time a timeout is hit within this method.
> * If a Throwable other than InterruptedException is thrown out of await() for 
> some reason or if there is an exception thrown in the corresponding finally 
> block around the await(), for example if waitTime.record(.....) throws an 
> exception, then the waiters are not removed from the waiters deque.
> * On timeout or other exception waiters could be signaled, but are not.  If 
> no other buffers are freed then the next waiting thread will also timeout and 
> so on.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to