cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew F. Dennis (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CASSANDRA-1417) add cache save/load
Date Tue, 07 Sep 2010 16:22:34 GMT

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

Matthew F. Dennis commented on CASSANDRA-1417:
----------------------------------------------

new patch attached

{quote}if you're going to organize imports, follow the order on http://wiki.apache.org/cassandra/CodeStyle.
also, looks like unused classes like crypto.Data are being added{quote}

I've updated intellij again to match the order on the wiki

{quote}loadRowCache should probably be called by CFS constructor{quote}

loadRowCache depends on the table being fully constructed first so it's done after the initial
Table.open()

{quote}SavedCacheReader is a class with no fields, should probably just be a static method
somewhere (SSTable?). also, should return a new set rather than taking one as parameter{quote}

It takes a parameter because the two places it's called pass it different set implementations.
 In .7 the method creates a new TreeSet<byte[]>(BytesType) and returns that.

{quote}should respect configured cache size and if saved cache is larger, should log at info
and oad as much as there is room for{quote}

The configured cache size depends on the results from reading all the indexes when SSTableTrackers
are created (which is the same place the cache is populated so we don't iterate over all the
index entries twice).  For percentages, we can't really get around this - we need to get a
row count before we can figure out the percentage.  For cache settings that are fixed in size,
we could do that but given that cache sizes hardly ever change and even when they do the cache
will be set to the correct size after we have a row count the extra code to handle this isn't
worth it.


> add cache save/load
> -------------------
>
>                 Key: CASSANDRA-1417
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1417
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Jonathan Ellis
>            Assignee: Matthew F. Dennis
>             Fix For: 0.6.6
>
>         Attachments: 1417-cassandra-0.6.txt
>
>
> Since mixing 0.7 nodes with 0.6 is looking increasingly unlikely to be supported because
of the deep changes to the Thrift API, we should allow saving out the 0.6 cache and loading
it on startup so that we don't inflict the pain of an entire cluster of cold cache on upgraders.
> The cache format should just be a list of row keys.  Loading it is as simple as calling
getColumnFamily (with a zero-column predicate) on each row, for row cache.
> Key cache is more complicated, but only a little.  First is that you have to de-duplicate
the row keys from multiple sstables.  (Saving which sstable version it's associated with is
less useful, since that will be obsoleted by compaction.)  Second is that we don't need to
actually read any row data, we just need to go through the index locator part of the read
path (getPosition).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message