cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sammy Yu (JIRA)" <>
Subject [jira] Commented: (CASSANDRA-423) add new LRU cache
Date Thu, 10 Sep 2009 20:16:57 GMT


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:
>             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,

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

View raw message