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

Pavel Yaskevich commented on CASSANDRA-3143:
--------------------------------------------

bq. I don't understand. I'm just saying that a cfs object already has a 
reference to its metadata, so it's slightly cleaner to use that rather that do 
query to Schema.instance using the table and column family name.

In my previous comment I wrote "Secondary index cfs do not register with 
Schema.load so they don't have a cfId." and Jonathan replied "I don't think we 
should be trying to cache 2I CFs." that is why I'm saying that if we will use 
metadata.cfId we would cache 2L CFs without even noticing. 

{quote}
But - save values to avoid 'two phrase' key cache loading - would require to 
use a common interface for values in key/row caches with serialize/deserialize 
functionality which is not suitable e.g. for ColumnFamily that we store in row 
cache... That is why we still rely on SSTableReader.load I think, saving values 
would limit flexibility of the cache interface...

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.

{quote}

Jonathan can you please settle this argument?
                
> 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
>
>
> 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