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

Sylvain Lebresne commented on CASSANDRA-10232:
----------------------------------------------

bq. The comment in cache serializer. We are going to have a new cache version 
so you won't run into old entry formats.

I suppose you mean it's not done yet. Can you point to the ticket that will do 
that for the records. Otherwise, is my understanding correct that you're just 
suggesting the comment may be removed?

bq. For #4 you switch to a signed vint. I think you still want unsigned. 
\[...\]  Maybe the choice depends on how common you think users changing the 
size will be.

As you said, that depends on user usages and unfortunately we don't have strong 
data on that. But, even if it's surely a minority, I'm sure some people do play 
with slightly smaller or slightly bigger values than the default. Using 
unsigned will give disproportionately bad results for 'slightly smaller than 
default' for the index size and that's what I wanted to avoid. I don't feel 
strongly because, as I said, I don't have real data to back if this is the 
right choice or not, it just feels a little bit more conservative to me.

bq. 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.

I subscribe to the general idea but that's an exception. It's really important 
that a given index is deserialized with the value it was serialized with, or 
deserialization will fail (basically, the sstable will be considered 
corrupted). So we should not expose any way to change that value, doing so is 
wrong. As as said above, the _right_ way to do this would be to save the value 
used for serialization with the sstable (which would also allow us to more 
simply use the configured index size), but that's more involved that what we 
should do for 3.0 at this point imo.

bq. Where do we test that we can still load the old version of the 
serialization?

We have different upgrade tests that test that. You can read the comments on 
CASSANDRA-10136 for more details, which happens to also be the issue that will 
fix the code you pointed to.


> 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