You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Benedict (JIRA)" <ji...@apache.org> on 2015/02/17 18:22:11 UTC

[jira] [Comment Edited] (CASSANDRA-8757) IndexSummaryBuilder should construct itself offheap, and share memory between the result of each build() invocation

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

Benedict edited comment on CASSANDRA-8757 at 2/17/15 5:21 PM:
--------------------------------------------------------------

Patch available [here|https://github.com/belliottsmith/cassandra/tree/8757-offheapsummarybuilder]

The approach is pretty straight forward in principle: we split the offheap memory for the summary into two allocations, the summary offsets and the summary entries - the latter composed of the key and its offset in the index file. The offsets index from zero now, instead of from the end of the offsets themselves, and so to maintain compatibility we do not change the serialization format, on read/write we simply subtract/add the necessary offset. This split permits us to have a separate chunk of memory for each that we can append to in the writer, so that a prefix of both can be used to open a summary before we've finished writing. This permits us to share memory between all early instances of a table.


was (Author: benedict):
Patch available [here|github.com/belliottsmith/cassandra/tree/8757-offheapsummarybuilder]

The approach is pretty straight forward in principle: we split the offheap memory for the summary into two allocations, the summary offsets and the summary entries - the latter composed of the key and its offset in the index file. The offsets index from zero now, instead of from the end of the offsets themselves, and so to maintain compatibility we do not change the serialization format, on read/write we simply subtract/add the necessary offset. This split permits us to have a separate chunk of memory for each that we can append to in the writer, so that a prefix of both can be used to open a summary before we've finished writing. This permits us to share memory between all early instances of a table.

> IndexSummaryBuilder should construct itself offheap, and share memory between the result of each build() invocation
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-8757
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8757
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Benedict
>            Assignee: Benedict
>             Fix For: 2.1.4
>
>




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