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

Jonathan Ellis commented on CASSANDRA-3143:
-------------------------------------------

bq. I fail to see what is so crazy about having the function that saves the 
cache having access to both key and value. It may require a bit of refactoring, 
but I don't see that as a good argument. Anyway, it's not a very big deal but I 
still think that the two phase loading is more fragile than it needs, and 
saving values would allow a proper reload.

Why would you want to do a cache reload?  That's just going to be stale...  
Clearing the cache I can understand, but reloading a semi-arbitrary older cache 
state?  I don't see the value there.

ISTM we're talking about trading one kind of ugly code (passing around the Set 
of keys to load to SSTR) for another (a lot of code duplication between key 
cache, which wants to save values, and row cache, which doesn't).  It's also 
worth pointing out that if we're concerned about cache size, the two-phase 
approach gives smaller saved caches.  So I think I'd lean towards the existing, 
two-phase approach.
                
> Global caches (key/row)
> -----------------------
>
>                 Key: CASSANDRA-3143
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3143
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Pavel Yaskevich
>            Assignee: Pavel Yaskevich
>            Priority: Minor
>              Labels: Core
>             Fix For: 1.1
>
>         Attachments: 0001-global-key-cache.patch, 
> 0002-global-row-cache-and-ASC.readSaved-changed-to-abstra.patch, 
> 0003-CacheServiceMBean-and-correct-key-cache-loading.patch, 
> 0004-key-row-cache-tests-and-tweaks.patch, 
> 0005-cleanup-of-the-CFMetaData-and-thrift-avro-CfDef-and-.patch, 
> 0006-row-key-cache-improvements-according-to-Sylvain-s-co.patch, 
> 0007-second-round-of-changes-according-to-Sylvain-comment.patch
>
>
> Caches are difficult to configure well as ColumnFamilies are added, similar 
> to how memtables were difficult pre-CASSANDRA-2006.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to