cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Yaskevich (Issue Comment Edited) (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Edited] (CASSANDRA-3611) Make checksum on a compressed blocks optional
Date Tue, 27 Dec 2011 10:36:30 GMT

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

Pavel Yaskevich edited comment on CASSANDRA-3611 at 12/27/11 10:34 AM:
-----------------------------------------------------------------------

{code}
if (FBUtilities.threadLocalRandom().nextDouble() > metadata.parameters.crcChance)
{code}

So when you have 1.0 in your parameters you will never get checksum checked (because nextDouble()
is 1.0d exclusive), on the other hand with 0.0 you will check checksum every time, shouldn't
it work the other way around?

I also think that we should add check for chance to be between 0.0 and 1.0 in CompressionParameters.
                
      was (Author: xedin):
    {code}
if (FBUtilities.threadLocalRandom().nextDouble() > metadata.parameters.crcChance)
{code}

So when you have 1.0 in your parameters you will never get checksum checked (because nextDouble()
is 1.0d exclusive), on the other hand with 0.0 you will check checksum every time, shouldn't
it work the other way around?
                  
> Make checksum on a compressed blocks optional
> ---------------------------------------------
>
>                 Key: CASSANDRA-3611
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3611
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.1
>            Reporter: Vijay
>            Assignee: Vijay
>            Priority: Minor
>              Labels: compression
>             Fix For: 1.1
>
>         Attachments: 0001-crc-check-chance-v2.patch, 0001-crc-check-chance.patch
>
>
> Currently every uncompressed block is run against checksum algo, there is cpu overhead
in doing same... We might want to make it configurable/optional for some use cases which might
not require checksum all the time.

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

        

Mime
View raw message