Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 22414 invoked from network); 8 Feb 2011 14:38:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Feb 2011 14:38:33 -0000 Received: (qmail 38324 invoked by uid 500); 8 Feb 2011 14:38:31 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 38102 invoked by uid 500); 8 Feb 2011 14:38:27 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 38094 invoked by uid 99); 8 Feb 2011 14:38:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Feb 2011 14:38:26 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of shaun@cuttshome.net designates 69.17.117.50 as permitted sender) Received: from [69.17.117.50] (HELO mail6.sea5.speakeasy.net) (69.17.117.50) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Feb 2011 14:38:20 +0000 Received: (qmail 8870 invoked from network); 8 Feb 2011 14:37:59 -0000 Received: from dsl092-072-228.bos1.dsl.speakeasy.net (HELO [192.168.0.196]) (shaunc@[66.92.72.228]) (envelope-sender ) by mail6.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 8 Feb 2011 14:37:59 -0000 From: Shaun Cutts Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: multipart/alternative; boundary=Apple-Mail-73-1041093609 Subject: Re: Best way to detect/fix bitrot today? Date: Tue, 8 Feb 2011 09:37:53 -0500 In-Reply-To: To: user@cassandra.apache.org References: Message-Id: X-Mailer: Apple Mail (2.1082) --Apple-Mail-73-1041093609 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii One thing that we're doing for (guaranteed) immutable data is to use MD5 = signatures as keys... this will also prevent duplication, and it will = allow detection (if not correction) of bitrot at the app level easy. On Feb 8, 2011, at 9:23 AM, Anand Somani wrote: > I should have clarified we have 3 copies, so in that case as long as 2 = match we should be ok?=20 >=20 > Even if there were checksumming at the SStable level, I assume it has = to check and report these errors on compaction (or node repair)?=20 >=20 > I have seen some JIRA open on these issues ( 47 and 1717), but if I = need something today, a read repair ( or a node repair) is the only = viable option?=20 >=20 > =20 >=20 > On Mon, Feb 7, 2011 at 12:09 PM, Peter Schuller = wrote: > > Our application space is such that there is data that might not be = read for > > a long time. The data is mostly immutable. How should I approach > > detecting/solving the bitrot problem? One approach is read data and = let read > > repair do the detection, but given the size of data, that does not = look very > > efficient. >=20 > Note that read-repair is not really intended to repair arbitrary > corruptions. Unless I'm mistaken, arbitrary corruption, unless it > triggers a serialization failure that causes row skipping, it's a > toss-up which version of the data is retained (or both, if the > corruption is in the key). Given the same key and column timestamp, > the tie breaker is the volumn value. So depending on whether > corruption results in a "lesser" or "greater" value, you might get the > corrupt or non-corrupt data. >=20 > > Has anybody solved/workaround this or has any other suggestions to = detect > > and fix bitrot? >=20 > My feel/tentative opinion is that the clean fix is for Cassandra to > support strong checksumming at the sstable level. >=20 > Deploying on e.g. ZFS would help a lot with this, but that's a problem > for deployment on Linux (which is the recommended platform for > Cassandra). >=20 > -- > / Peter Schuller >=20 --Apple-Mail-73-1041093609 Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=us-ascii One thing that we're doing for (guaranteed) immutable data is to use MD5 signatures as keys... this will also prevent duplication, and it will allow detection (if not correction) of bitrot at the app level easy.

On Feb 8, 2011, at 9:23 AM, Anand Somani wrote:

I should have clarified we have 3 copies, so in that case as long as 2 match we should be ok?

Even if there were checksumming at the SStable level, I assume it has to check and report these errors on compaction (or node repair)?

I have seen some JIRA open on these issues ( 47 and 1717), but if I need something today, a read repair ( or a node repair) is the only viable option?

 

On Mon, Feb 7, 2011 at 12:09 PM, Peter Schuller <peter.schuller@infidyne.com> wrote:
> Our application space is such that there is data that might not be read for
> a long time. The data is mostly immutable. How should I approach
> detecting/solving the bitrot problem? One approach is read data and let read
> repair do the detection, but given the size of data, that does not look very
> efficient.

Note that read-repair is not really intended to repair arbitrary
corruptions. Unless I'm mistaken, arbitrary corruption, unless it
triggers a serialization failure that causes row skipping, it's a
toss-up which version of the data is retained (or both, if the
corruption is in the key). Given the same key and column timestamp,
the tie breaker is the volumn value. So depending on whether
corruption results in a "lesser" or "greater" value, you might get the
corrupt or non-corrupt data.

> Has anybody solved/workaround this or has any other suggestions to detect
> and fix bitrot?

My feel/tentative opinion is that the clean fix is for Cassandra to
support strong checksumming at the sstable level.

Deploying on e.g. ZFS would help a lot with this, but that's a problem
for deployment on Linux (which is the recommended platform for
Cassandra).

--
/ Peter Schuller


--Apple-Mail-73-1041093609--