cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benedict (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-8897) Remove FileCacheService, instead pooling the buffers
Date Sat, 18 Apr 2015 20:03:03 GMT


Benedict commented on CASSANDRA-8897:

I've pushed a branch [here|]
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:
>             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

This message was sent by Atlassian JIRA

View raw message