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

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

bq. It's difficult to review this patchset because a lot of refactoring was 
introduced orthogonal to the new functionality. I'm specifically looking at the 
CacheKey heirarchy; the old "abstract translateKey" seemed like a reasonable 
compromise of flexibility without complexity to me. Granted that CacheKey may 
be an improvement, I'd like to do that kind of refactor in another ticket to 
simplify review of the new functionality.

Personally I like CacheKey because it allows to remove AutoSaving{Key/Row}Cache 
classes and make code better generalized. But I agree that it makes it kind of 
hard to review...

bq. Do we actually benefit from caching DecoratedKey instead of byte[] ? 
DecoratedKey costs a lot of memory for small row keys. Since the cache is 
unordered I can't think of any benefit to using DK instead of byte[]. (Another 
reason I think CacheKey may be the wrong way to go.)

I don't think we do. Attaching 0008 which changes {Row/Key}Cache to use raw 
(ByteBuffer) key instead of DecoratedKey.
                
> 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