[
https://issues.apache.org/jira/browse/CASSANDRA-8897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14501566#comment-14501566
]
Benedict commented on CASSANDRA-8897:
-------------------------------------
I've pushed a branch
[here|https://github.com/belliottsmith/cassandra/tree/8897-suggestions] with a
number of suggestions, along with some minor modifications.
To summarize: I don't like the TreeMap approach, nor the use of the List to
store the chunks, since both are unnecessary and non-trivial costs, and we want
this to be as low cost as possible. I've made a suggestion for an alternative
strategy if you'd like to pursue the ability to relinquish buffers from an
active allocator, but I'm not sure it buys us much given our current allocation
strategy and the fact that only the very most recent chunk can be reused in
this way (but all manage their free states). I personally think such approaches
should be considered in a follow up ticket at a time when they will be
beneficial (right now bear in mind we'll pretty much only allocate one buffer
per chunk), however the simplest strategy of a bump-the-pointer that can be
rolled back if the most recent allocation is freed seems perfectly fine.
I've also suggested a simplification to the lookup of the owning chunk that
also protects us against a potential memory corruption bug (if at some future
date we manage to allocate and free a pooled buffer on two different threads)
> Remove FileCacheService, instead pooling the buffers
> ----------------------------------------------------
>
> Key: CASSANDRA-8897
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8897
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: Benedict
> Assignee: Stefania
> Fix For: 3.0
>
>
> After CASSANDRA-8893, a RAR will be a very lightweight object and will not
> need caching, so we can eliminate this cache entirely. Instead we should have
> a pool of buffers that are page-aligned.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)