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

Ariel Weisberg commented on CASSANDRA-10232:
--------------------------------------------

The comment in cache serializer. We are going to have a new cache version so 
you won't run into old entry formats. They are reformatted when written to the 
saved cache so they will always be the new version for now. It could be an 
issue in future versions because the cache format is versioned independently 
and does not take into account changes to the database format (unless we are 
careful).

For #4 you switch to a signed vint. I think you still want unsigned. It will 
roundtrip the bytes you give it correctly either way. The difference is that if 
you really believe the values will be 0 and up then you want unsigned so that 
you get the biggest range >= 0 for the fewest bytes. Using signed makes 
encoding negative values near 0 more space efficient at the expense of positive 
values. Maybe the choice depends on how common you think users changing the 
size will be.

As a CYA thing I like to see constants like WIDTH as a Java property even if I 
don't seriously intend to change them. Better to have and not need sort of 
thing.

> Small optimizations in index entry serialization
> ------------------------------------------------
>
>                 Key: CASSANDRA-10232
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10232
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>             Fix For: 3.0.0 rc1
>
>
> While we should improve the data structure we use for our on-disk index in 
> future versions, it occurred to me that we had a few _very_ low hanging fruit 
> optimization (as in, for 3.0) we could do for the serialization of our 
> current entries, like using vint encodings.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to