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

Benedict edited comment on CASSANDRA-14832 at 11/30/18 1:50 PM:
----------------------------------------------------------------

Thanks!  Committed as 
[d8164c643395e3b6579a2fe6ce6ff0423df2f520|https://github.com/apache/cassandra/commit/d8164c643395e3b6579a2fe6ce6ff0423df2f520]
 (to trunk only, since this isn't really important enough to push to 3.x IMO)

For future reference, a few helpful things to do to ease the commit burden:

* update CHANGES.txt with the title of the JIRA
* sign the commit message with "patch by Jon Meredith; reviewed by Benedict for 
CASSANDRA-14832"
* post a link to your CI run




was (Author: benedict):
Thanks!  Committed as 
[d8164c643395e3b6579a2fe6ce6ff0423df2f520|https://github.com/apache/cassandra/commit/d8164c643395e3b6579a2fe6ce6ff0423df2f520]

For future reference, a few helpful things to do to ease the commit burden:

* update CHANGES.txt with the title of the JIRA
* sign the commit message with "patch by Jon Meredith; reviewed by Benedict for 
CASSANDRA-14832"
* post a link to your CI run



> BufferPool: allocating thread for new chunks should acquire directly
> --------------------------------------------------------------------
>
>                 Key: CASSANDRA-14832
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-14832
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Jon Meredith
>            Assignee: Jon Meredith
>            Priority: Minor
>             Fix For: 4.0
>
>
> When BufferPool does not have any free Chunks to satisfy a request, the 
> calling thread allocates a new large block of memory which it breaks up into 
> chunks and adds to the free chunks queue, then pulls from the queue to 
> satisfy it's own allocation.
> If enough other threads request chunks it is possible for the queue to be 
> exhausted before the original allocating thread is able to pull of it's own 
> allocation, causing the original allocator to loop and attempt to allocate 
> more memory.  This is unfair to the original caller and may cause it to block 
> on a system call to allocate more memory.
> Instead of the current behavior, allocateMoreChunks could hold back one of 
> the chunks and return it to the caller instead so that it will at most call 
> allocate once.
>  



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

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to