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

Chris Burroughs commented on CASSANDRA-1966:
--------------------------------------------

{noformat}
   * Beware that, unlike in {@link #keySet()}, obtaining the set is <em>NOT</em>
   * a constant-time operation. Because of the asynchronous nature of the page
   * replacement policy, determining the retention ordering requires a traversal
   * of the keys.
{noformat}

I used the special case on -1 to only call descendingKeySet when needed and 
otherwise use keySet.  I can special case on Integer.MAX_VALUE instead, but we 
will still need the conditional branch.

> Option to control how many items are read on cache load
> -------------------------------------------------------
>
>                 Key: CASSANDRA-1966
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1966
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Chris Burroughs
>            Assignee: Chris Burroughs
>            Priority: Minor
>         Attachments: 1966-v1.txt
>
>
> CASSANDRA-1417 added an option to save the key and/or row cache keys which is 
> cool.  However, for a row large cache it can take a long time to read all of 
> the rows.  For example I have a 400,000 item row cache, and loading that on 
> restart takes a little under an hour.
> In addition to configuring the size of the row cache, and how often it should 
> be saved to disk, I propose an option to control how many items are loaded on 
> startup (or alternately only saving n items out of the full row cache to 
> begin with).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to