Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3007F7B70 for ; Tue, 27 Dec 2011 10:36:55 +0000 (UTC) Received: (qmail 9214 invoked by uid 500); 27 Dec 2011 10:36:55 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 9189 invoked by uid 500); 27 Dec 2011 10:36:55 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 9181 invoked by uid 99); 27 Dec 2011 10:36:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Dec 2011 10:36:55 +0000 X-ASF-Spam-Status: No, hits=-2001.3 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Dec 2011 10:36:52 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id BA08F12B408 for ; Tue, 27 Dec 2011 10:36:30 +0000 (UTC) Date: Tue, 27 Dec 2011 10:36:30 +0000 (UTC) From: "Pavel Yaskevich (Issue Comment Edited) (JIRA)" To: commits@cassandra.apache.org Message-ID: <517087650.46249.1324982190763.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1691424904.62751.1323623079907.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Issue Comment Edited] (CASSANDRA-3611) Make checksum on a compressed blocks optional MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ 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