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

Sammy Yu commented on CASSANDRA-423:
------------------------------------

Both jars are needed. CLRUCache depends on the PriorityQueue class in lucene. 

I think the isAlive is used to indicate if the lucene index that this cache is 
associated is alive, this happens when the a new index is being swapped in for 
a new index. During that time the CLRUCache for the old index is marked as no 
longer being alive so that the gets don't update the last accessed time (used 
to repopulate the old cached keys in the new CLRUCache). If we were to use it 
we could just leave it as alive. 

We could remove the atomic lock for the get miss since it's only used for 
statistical purposes. The other atomic get is needed to keep track of when the 
key was last used, this doesn't look like it could be easily removed, but then 
again it's only a single lock. 

Yeah I just arbitrary picked size-1 for the low watermark because it more 
closely matches what we have right now. We could probably expose this in the 
config. I would assume that we still want to keep the existing fraction number 
of keys cached and then have apply another percentage of top the fraction 
number of keys cached for the low watermark which can help limit memory usage. 


> add new LRU cache
> -----------------
>
>                 Key: CASSANDRA-423
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-423
>             Project: Cassandra
>          Issue Type: New Feature
>            Reporter: Jonathan Ellis
>             Fix For: 0.5
>
>         Attachments: 
> 0001-CASSANDRA-423-Committed-first-version-using-Solr-s-C.patch, 
> 0002-CASSANDRA-423-Committed-first-version-using-Solr-s-C.patch, 
> 423-v0.patch, apache-solr-solrj-2009-09-04_08-06-33.jar, 
> lucene-core-2.9.0-rc2.jar
>
>


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

Reply via email to