You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Michael Kjellman (JIRA)" <ji...@apache.org> on 2016/06/14 02:14:58 UTC

[jira] [Comment Edited] (CASSANDRA-11206) Support large partitions on the 3.0 sstable format

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

Michael Kjellman edited comment on CASSANDRA-11206 at 6/14/16 2:14 AM:
-----------------------------------------------------------------------

going thru the changes and have some questions :)

# RowIndexEntry$serializedSize used to return the size of the index for the entire row. As the size of the IndexInfo elements are variable length I'm having trouble understanding how the new/current implementation does this:
{code}
private static int serializedSize(DeletionTime deletionTime, long headerLength, int columnIndexCount)
    {
        return TypeSizes.sizeofUnsignedVInt(headerLength)
               + (int) DeletionTime.serializer.serializedSize(deletionTime)
               + TypeSizes.sizeofUnsignedVInt(columnIndexCount);
    }
{code}
# In the class level Javadoc for IndexInfo there is a lot of comment about serialization format changes and even a comment "Serialization format changed in 3.0" yet I don't see any corresponding changes in BigFormat$BigVersion
# I see a class named **Pre_C_11206_RowIndexEntry** in RowIndexEntryTest which has a lot of the logic that used to be in RowIndexEntry. I don't see the logic outside of the test classes though.


was (Author: mkjellman):
going thru the changes and have some questions :)

# RowIndexEntry$serializedSize used to return the size of the index for the entire row. As the size of the IndexInfo elements are variable length I'm having trouble understanding how the new/current implementation does this:
{code}
private static int serializedSize(DeletionTime deletionTime, long headerLength, int columnIndexCount)
    {
        return TypeSizes.sizeofUnsignedVInt(headerLength)
               + (int) DeletionTime.serializer.serializedSize(deletionTime)
               + TypeSizes.sizeofUnsignedVInt(columnIndexCount);
    }
{code}
# In the class level Javadoc for IndexInfo there is a lot of comment about serialization format changes and even a comment "Serialization format changed in 3.0" yet I don't see any corresponding changes in BigFormat$BigVersion

> Support large partitions on the 3.0 sstable format
> --------------------------------------------------
>
>                 Key: CASSANDRA-11206
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11206
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Local Write-Read Paths
>            Reporter: Jonathan Ellis
>            Assignee: Robert Stupp
>              Labels: docs-impacting
>             Fix For: 3.6
>
>         Attachments: 11206-gc.png, trunk-gc.png
>
>
> Cassandra saves a sample of IndexInfo objects that store the offset within each partition of every 64KB (by default) range of rows.  To find a row, we binary search this sample, then scan the partition of the appropriate range.
> The problem is that this scales poorly as partitions grow: on a cache miss, we deserialize the entire set of IndexInfo, which both creates a lot of GC overhead (as noted in CASSANDRA-9754) but is also non-negligible i/o activity (relative to reading a single 64KB row range) as partitions get truly large.
> We introduced an "offset map" in CASSANDRA-10314 that allows us to perform the IndexInfo bsearch while only deserializing IndexInfo that we need to compare against, i.e. log(N) deserializations.



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