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 1F31110653 for ; Tue, 26 Nov 2013 14:14:57 +0000 (UTC) Received: (qmail 26279 invoked by uid 500); 26 Nov 2013 14:14:54 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 26231 invoked by uid 500); 26 Nov 2013 14:14:53 -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 26220 invoked by uid 99); 26 Nov 2013 14:14:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Nov 2013 14:14:52 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of janne.jalkanen@ecyrd.com designates 87.108.86.67 as permitted sender) Received: from [87.108.86.67] (HELO mail.ecyrd.com) (87.108.86.67) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Nov 2013 14:14:47 +0000 Received: from [192.168.0.24] (unknown [83.145.245.61]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.ecyrd.com (Postfix) with ESMTPSA id 585E197C145 for ; Tue, 26 Nov 2013 16:14:25 +0200 (EET) From: Janne Jalkanen Content-Type: multipart/alternative; boundary="Apple-Mail=_678E6E5B-048E-4B00-8C37-1ECCC8827602" Message-Id: <291531F8-BA29-40D8-AD31-6122BD161E6F@ecyrd.com> Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Subject: Re: Data loss when swapping out cluster Date: Tue, 26 Nov 2013 16:14:25 +0200 References: To: user@cassandra.apache.org In-Reply-To: X-Mailer: Apple Mail (2.1510) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_678E6E5B-048E-4B00-8C37-1ECCC8827602 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii That sounds bad! Did you run repair at any stage? Which CL are you = reading with?=20 /Janne On 25 Nov 2013, at 19:00, Christopher J. Bottaro = wrote: > Hello, >=20 > We recently experienced (pretty severe) data loss after moving our 4 = node Cassandra cluster from one EC2 availability zone to another. Our = strategy for doing so was as follows: > One at a time, bring up new nodes in the new availability zone and = have them join the cluster. > One at a time, decommission the old nodes in the old availability zone = and turn them off (stop the Cassandra process). > Everything seemed to work as expected. As we decommissioned each = node, we checked the logs for messages indicating "yes, this node is = done decommissioning" before turning the node off. >=20 > Pretty quickly after the old nodes left the cluster, we started = getting client calls about data missing. >=20 > We immediately turned the old nodes back on and when they rejoined the = cluster *most* of the reported missing data returned. For the rest of = the missing data, we had to spin up a new cluster from EBS snapshots and = copy it over. >=20 > What did we do wrong? >=20 > In hindsight, we noticed a few things which may be clues... > The new nodes had much lower load after joining the cluster than the = old ones (3-4 gb as opposed to 10 gb). > We have EC2Snitch turned on, although we're using SimpleStrategy for = replication. > The new nodes showed even ownership (via nodetool status) after = joining the cluster. > Here's more info about our cluster... > Cassandra 1.2.10 > Replication factor of 3 > Vnodes with 256 tokens > All tables made via CQL > Data dirs on EBS (yes, we are aware of the performance implications) >=20 > Thanks for the help. --Apple-Mail=_678E6E5B-048E-4B00-8C37-1ECCC8827602 Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=us-ascii

That sounds bad!  Did you run repair at any stage?  Which CL are you reading with? 

/Janne

On 25 Nov 2013, at 19:00, Christopher J. Bottaro <cjbottaro@academicworks.com> wrote:

Hello,

We recently experienced (pretty severe) data loss after moving our 4 node Cassandra cluster from one EC2 availability zone to another.  Our strategy for doing so was as follows:
  • One at a time, bring up new nodes in the new availability zone and have them join the cluster.
  • One at a time, decommission the old nodes in the old availability zone and turn them off (stop the Cassandra process).
Everything seemed to work as expected.  As we decommissioned each node, we checked the logs for messages indicating "yes, this node is done decommissioning" before turning the node off.

Pretty quickly after the old nodes left the cluster, we started getting client calls about data missing.

We immediately turned the old nodes back on and when they rejoined the cluster *most* of the reported missing data returned.  For the rest of the missing data, we had to spin up a new cluster from EBS snapshots and copy it over.

What did we do wrong?

In hindsight, we noticed a few things which may be clues...
  • The new nodes had much lower load after joining the cluster than the old ones (3-4 gb as opposed to 10 gb).
  • We have EC2Snitch turned on, although we're using SimpleStrategy for replication.
  • The new nodes showed even ownership (via nodetool status) after joining the cluster.
Here's more info about our cluster...
  • Cassandra 1.2.10
  • Replication factor of 3
  • Vnodes with 256 tokens
  • All tables made via CQL
  • Data dirs on EBS (yes, we are aware of the performance implications)

Thanks for the help.

--Apple-Mail=_678E6E5B-048E-4B00-8C37-1ECCC8827602--