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

Sylvain Lebresne commented on CASSANDRA-3143:
---------------------------------------------

A few comments after quickly reading through the last patches:
* CacheKey could have a serializeSize() method for use rather needlessly 
creating ByteBuffers just to get there size in estimateSizeToSave.
* CacheKey.serialize() is unused.
* Since that for saving each cache, we do n+1 iterations through the whole 
cache where n is the number of column families. It seems rather inefficient, we 
could probably write all caches (for all CFs) simultaneously for a more 
efficient process.
* When reading the cache, it seems we decorate each key just to "validate saved 
data" (we discard the DK object afterwards). But I don't think decorating a key 
entails any kind of validation of the key so this feel useless.
* Do we care about reloading the row cache? Jonathan was right that reloading a 
cache is probably pretty useless.
                
> 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-caches-made-backward-compatible-second-round-of-chan.patch, 
> 0008-row-key-cache-to-use-raw-key-instead-of-decorated.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