From user-return-24606-apmail-cassandra-user-archive=cassandra.apache.org@cassandra.apache.org Wed Mar 7 09:40:44 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 4B7629180 for ; Wed, 7 Mar 2012 09:40:44 +0000 (UTC) Received: (qmail 50578 invoked by uid 500); 7 Mar 2012 09:40:41 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 50559 invoked by uid 500); 7 Mar 2012 09:40:41 -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 50543 invoked by uid 99); 7 Mar 2012 09:40:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Mar 2012 09:40:41 +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-a52.g.dreamhost.com) (208.113.200.5) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Mar 2012 09:40:35 +0000 Received: from homiemail-a52.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a52.g.dreamhost.com (Postfix) with ESMTP id 093AE6B8216 for ; Wed, 7 Mar 2012 01:40:15 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=thelastpickle.com; h=from :mime-version:content-type:subject:date:in-reply-to:to :references:message-id; q=dns; s=thelastpickle.com; b=WodLIPAdD8 fwUspCEchFglbBhxTB1QT0H/u/0D4gcLw+REU/f5bfVBzbnyxm4L/gHx9xVGtFct n/gfh2/+lOCE77kdrZc/BEpoXTJfyXZmPK90a3KFrAiBvAjpSTG+PUBBOKXPh89N 3XyhfUScIVgZNqWFSlTfXRvAAdiTrqhZE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=thelastpickle.com; h=from :mime-version:content-type:subject:date:in-reply-to:to :references:message-id; s=thelastpickle.com; bh=xLLazpgVlx6kuMbo lHQZLMtIjSE=; b=ohihxvD/sOU12Ce9Iv/kWGe0oUfPXUJGynkN+zjmDAF2wNWZ Wfda+aaZoix9CXo0HeW2Dn8fh6ai1ZqF3e9x0/DReX2RWosdcifQsha4C4vawrnY CPJarIQWJHimH7rUR7cMQyiTS1YgU4EC+iwuJGVEEBj5Y5Yw1EeikLKsa9E= 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-a52.g.dreamhost.com (Postfix) with ESMTPSA id 6FB526B8057 for ; Wed, 7 Mar 2012 01:40:14 -0800 (PST) From: aaron morton Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: multipart/alternative; boundary="Apple-Mail=_36888D65-F3E9-4DBB-A87B-841C84D26245" Subject: Re: Repairing nodes when two schema versions appear Date: Wed, 7 Mar 2012 22:40:12 +1300 In-Reply-To: To: user@cassandra.apache.org References: <7F512340-3919-4939-A205-C5A4AF8DF9F1@thelastpickle.com> Message-Id: X-Mailer: Apple Mail (2.1257) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_36888D65-F3E9-4DBB-A87B-841C84D26245 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 > 1. Can this schema version issue happen in newer versions of Cassandra = (>1.0) ? AFAIK yes. Schema changes are assumed to happen infrequently, and to = only be started if the cluster is in schema agreement. Clients (include = the CLI and CQL) take care of this.=20 > 2. When the node is UP and we do this, even though logs errors, still = would everything come back to normal just like we shut down and delete = and restart? You need to shut it down to delete the files, then start. Assuming RF = >=3D3 and QUOURM CL, if the restarting node fails to read or write data = requests will still succeed.=20 Cheers ----------------- Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 7/03/2012, at 9:12 PM, Tharindu Mathew wrote: > Thanks Aaron.=20 >=20 > This is great. A couple of questions if you don't mind... >=20 > 1. Can this schema version issue happen in newer versions of Cassandra = (>1.0) ? >=20 > 2. When the node is UP and we do this, even though logs errors, still = would everything come back to normal just like we shut down and delete = and restart? >=20 > On Wed, Mar 7, 2012 at 2:07 AM, aaron morton = wrote: > Go to one of the nodes, stop it and delete the Migrations and Schema = files in the system keyspace.=20 >=20 > When you restart the node it will stream the migrations the other. = Note that if the node is UP and accepting traffic it may log errors = about missing CF's during this time.=20 >=20 > Cheers=20 >=20 >=20 > ----------------- > Aaron Morton > Freelance Developer > @aaronmorton > http://www.thelastpickle.com >=20 > On 7/03/2012, at 1:43 AM, Tharindu Mathew wrote: >=20 >> Hi, >>=20 >> I try to add column families programatically and end up with 2 schema = versions in the Cassandra cluster. Using Cassandra 0.7. >>=20 >> Is there a way to bring this back to normal (to one schema version) = through the cli or through the API? >>=20 >> --=20 >> Regards, >>=20 >> Tharindu >>=20 >> blog: http://mackiemathew.com/ >>=20 >=20 >=20 >=20 >=20 > --=20 > Regards, >=20 > Tharindu >=20 > blog: http://mackiemathew.com/ >=20 --Apple-Mail=_36888D65-F3E9-4DBB-A87B-841C84D26245 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=iso-8859-1 1. Can this schema version issue happen in = newer versions of Cassandra (>1.0) ?
AFAIK yes. = Schema changes are assumed to happen infrequently, and to only be = started if the cluster is in schema agreement. Clients (include the CLI = and CQL) take care of this. 

2. When the node is UP and we do this, even though logs = errors, still would everything come back to normal just like we shut = down and delete and restart?
You need to shut it down to = delete the files, then start. Assuming RF >=3D3 and QUOURM CL, if the = restarting node fails to read or write data requests will still = succeed. 

Cheers

http://www.thelastpickle.com

On 7/03/2012, at 9:12 PM, Tharindu Mathew wrote:

Thanks = Aaron.

This is great. A couple of questions if you don't = mind...

1. Can this schema version issue happen in newer versions = of Cassandra (>1.0) ?

2. When the node is UP and we do this, = even though logs errors, still would everything come back to normal just = like we shut down and delete and restart?

On Wed, Mar 7, 2012 at 2:07 AM, aaron = morton <aaron@thelastpickle.com> wrote:
Go to one of the nodes, stop it and = delete the Migrations and Schema files in the system = keyspace. 

When you restart the node it will = stream the migrations the other. Note that if the node is UP and = accepting traffic it may log errors about missing CF's during this = time. 

Cheers 


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

On 7/03/2012, at 1:43 AM, Tharindu Mathew = wrote:

Hi,

I try to add column = families programatically and end up with 2 schema versions in the = Cassandra cluster. Using Cassandra 0.7.

Is there a way to bring this back to normal (to one schema version) = through the cli or through the API?

--
Regards,

Tharindu


=



-- =
Regards,

Tharindu



= --Apple-Mail=_36888D65-F3E9-4DBB-A87B-841C84D26245--