From user-return-24590-apmail-cassandra-user-archive=cassandra.apache.org@cassandra.apache.org Tue Mar 6 18:03:05 2012 Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 66E129CC0 for ; Tue, 6 Mar 2012 18:03:05 +0000 (UTC) Received: (qmail 42329 invoked by uid 500); 6 Mar 2012 18:03:02 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 42306 invoked by uid 500); 6 Mar 2012 18:03:02 -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 42298 invoked by uid 99); 6 Mar 2012 18:03:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Mar 2012 18:03:02 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [208.113.200.5] (HELO homiemail-a92.g.dreamhost.com) (208.113.200.5) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Mar 2012 18:02:57 +0000 Received: from homiemail-a92.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a92.g.dreamhost.com (Postfix) with ESMTP id 003AE3DC080 for ; Tue, 6 Mar 2012 10:02:35 -0800 (PST) Received: from [172.16.1.3] (125-236-193-159.adsl.xtra.co.nz [125.236.193.159]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: aaron@thelastpickle.com) by homiemail-a92.g.dreamhost.com (Postfix) with ESMTPSA id 6E68E3DC06E for ; Tue, 6 Mar 2012 10:02:09 -0800 (PST) From: aaron morton Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: multipart/alternative; boundary="Apple-Mail=_6B66E733-815C-4ED7-8E35-E2F6E34683AE" Subject: Re: Old data coming alive after adding node Date: Wed, 7 Mar 2012 07:02:07 +1300 In-Reply-To: <4F55E362.3080307@unitedgames.com> To: user@cassandra.apache.org References: <4F55D522.7080807@unitedgames.com> <745045D3-5C52-4B71-BFF4-2B14EEBC6EFA@thelastpickle.com> <4F55E362.3080307@unitedgames.com> Message-Id: <0679AE72-BB02-4B19-ADE3-6DE95932E35F@thelastpickle.com> X-Mailer: Apple Mail (2.1257) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_6B66E733-815C-4ED7-8E35-E2F6E34683AE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 > All our writes/deletes are done with CL.QUORUM. > Our reads are done with CL.ONE. Although the reads that confirmed the = old data were done with CL.QUORUM. mmmm > According to = https://svn.apache.org/viewvc/cassandra/branches/cassandra-0.6/CHANGES.txt= 0.6.6 has the same patch > for (CASSANDRA-1074) as 0.7 and so I assumed that minor compactions in = 0.6.6 and up also purged tombstones. My bad. As you were.=20 After the repair did the un-deleted data remain un-deleted ? Are you = back to a stable situation ?=20 Without a lot more detail I am at a bit of a loss.=20 I know it's painful but migrating to 1.0 *really* will make your life so = much easier and faster. At some point you may hit a bug or a problem in = 0.6 and the solution may be to upgrade, quickly. Cheers ----------------- Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 6/03/2012, at 11:13 PM, Stefan Reek wrote: > Hi Aaron, >=20 > Thanks for the quick reply. > All our writes/deletes are done with CL.QUORUM. > Our reads are done with CL.ONE. Although the reads that confirmed the = old data were done with CL.QUORUM. > According to = https://svn.apache.org/viewvc/cassandra/branches/cassandra-0.6/CHANGES.txt= 0.6.6 has the same patch > for (CASSANDRA-1074) as 0.7 and so I assumed that minor compactions in = 0.6.6 and up also purged tombstones. > The only suspicious thing I noticed was that after adding the fourth = node repairs became extremely slow and heavy. > Running it degraded the performance of the whole cluster and the new = node even went OOM when running it. >=20 > Cheers, >=20 > Stefan >=20 > On 03/06/2012 10:51 AM, aaron morton wrote: >>=20 >>> After we added a fourth node, keeping RF=3D3, some old data appeared = in the database. >> What CL are you working at ? (Should not matter too much with repair = working, just asking) >>=20 >>=20 >>> We don't run compact on the nodes explicitly as I understand that = running repair will trigger a >>> major compaction. I'm not entirely sure if it does so, but in any = case the tombstones will be removed by a minor >>> compaction. >> In 0.6.x tombstones were only purged during a major / manual = compaction. Purging during minor compaction came in during 0.7 >> https://github.com/apache/cassandra/blob/trunk/CHANGES.txt#L1467 >>=20 >>> Can anyone think of any reason why the old data reappeared? >> It sounds like you are doing things correctly. The complicating = factor is 0.6 is so very old.=20 >>=20 >>=20 >> If I wanted to poke around some more I would conduct reads as CL one = against nodes and see if they return the "deleted" data or not. This = would help me understand if the tombstone is still out there.=20 >>=20 >> I would also poke around a lot in the logs to make sure repair was = running as expected and completing. If you find anything suspicious post = examples.=20 >>=20 >> Finally I would ensure CL QUROUM was been used.=20 >>=20 >> Hope that helps. >>=20 >>=20 >> ----------------- >> Aaron Morton >> Freelance Developer >> @aaronmorton >> http://www.thelastpickle.com >>=20 >> On 6/03/2012, at 10:13 PM, Stefan Reek wrote: >>=20 >>> Hi, >>>=20 >>> We were running a 3-node cluster of cassandra 0.6.13 with RF=3D3. >>> After we added a fourth node, keeping RF=3D3, some old data appeared = in the database. >>> As far as I understand this can only happen if nodetool repair = wasn't run for more than GCGraceSeconds. >>> Our GCGraceSeconds is set to the default of 10 days (864000 = seconds). >>> We have a scheduled cronjob to run repair once each week on every = node, each on another day. >>> I'm sure that none of the nodes ever skipped running a repair. >>> We don't run compact on the nodes explicitly as I understand that = running repair will trigger a >>> major compaction. I'm not entirely sure if it does so, but in any = case the tombstones will be removed by a minor >>> compaction. So I expected that the reappearing data, which is a = couple of months old in some cases, was long gone >>> by the time we added the node. >>>=20 >>> Can anyone think of any reason why the old data reappeared? >>>=20 >>> Stefan >>=20 >=20 --Apple-Mail=_6B66E733-815C-4ED7-8E35-E2F6E34683AE Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=iso-8859-1
All = our writes/deletes are done with CL.QUORUM.
Our reads are done with = CL.ONE. Although the reads that confirmed the old data were done with = CL.QUORUM.
mmmm

According to https://svn.apache.org/viewvc/cassandra/branches/cassandra-0.6/C= HANGES.txt 0.6.6 has the same patch
for (CASSANDRA-1074) as = 0.7 and so I assumed that minor compactions in 0.6.6 and up also purged = tombstones.
My bad. As you = were. 

After the repair did the un-deleted data = remain un-deleted ? Are you back to a stable situation = ? 

Without a lot more detail I am at a bit = of a loss. 

I know it's painful but = migrating to 1.0 *really* will make your life so much easier and faster. = At some point you may hit a bug or a problem in 0.6 and the solution may = be to upgrade, quickly.

Cheers

http://www.thelastpickle.com

On 6/03/2012, at 11:13 PM, Stefan Reek wrote:

Hi Aaron,

Thanks for the quick reply.
All our writes/deletes are done with CL.QUORUM.
Our reads are done with CL.ONE. Although the reads that confirmed the old data were done with CL.QUORUM.
According to https://svn.apache.org/viewvc/cassandra/branches/cassandra-0.6/C= HANGES.txt 0.6.6 has the same patch
for (CASSANDRA-1074) as 0.7 and so I assumed that minor compactions in 0.6.6 and up also purged tombstones.
The only suspicious thing I noticed was that after adding the fourth node repairs became extremely slow and heavy.
Running it degraded the performance of the whole cluster and the new node even went OOM when running it.

Cheers,

Stefan

On 03/06/2012 10:51 AM, aaron morton wrote:
After we added a fourth node, keeping RF=3D3, some old data appeared in the database.
What CL are you working at ? (Should not matter too much with repair working, just asking)


We don't run compact on the nodes explicitly as I understand that running repair will trigger a
major compaction. I'm not entirely sure if it does so, but in any case the tombstones will be removed by a minor
compaction.
In 0.6.x tombstones were only purged during a major / manual compaction. Purging during minor compaction came in during 0.7
= https://github.com/apache/cassandra/blob/trunk/CHANGES.txt#L1467

Can anyone think of any reason why the old data reappeared?
It sounds like you are doing things correctly. The complicating factor is 0.6 is so very old. 


If I wanted to poke around some more I would conduct reads as CL one against nodes and see if they return the "deleted" data or not. This would help me understand if the tombstone is still out = there. 

I would also poke around a lot in the logs to make sure repair was running as expected and completing. If you find anything suspicious post examples. 

Finally I would ensure CL QUROUM was been used. 

Hope that helps.


-----------------
Aaron Morton
Freelance Developer
@aaronmorton

On 6/03/2012, at 10:13 PM, Stefan Reek wrote:

Hi,

We were running a 3-node cluster of cassandra 0.6.13 with RF=3D3.
After we added a fourth node, keeping RF=3D3, some old data appeared in the database.
As far as I understand this can only happen if nodetool repair wasn't run for more than GCGraceSeconds.
Our GCGraceSeconds is set to the default of 10 days (864000 = seconds).
We have  a scheduled cronjob to run repair once each week on every node, each on another day.
I'm sure that none of the nodes ever skipped running a repair.
We don't run compact on the nodes explicitly as I understand that running repair will trigger a
major compaction. I'm not entirely sure if it does so, but in any case the tombstones will be removed by a minor
compaction. So I expected that the reappearing data, which is a couple of months old in some cases, was long gone
by the time we added the node.

Can anyone think of any reason why the old data reappeared?

Stefan



= --Apple-Mail=_6B66E733-815C-4ED7-8E35-E2F6E34683AE--