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 C4B41C054 for ; Fri, 28 Jun 2013 04:52:29 +0000 (UTC) Received: (qmail 95698 invoked by uid 500); 28 Jun 2013 04:52:27 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 95681 invoked by uid 500); 28 Jun 2013 04:52:26 -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 95673 invoked by uid 99); 28 Jun 2013 04:52:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Jun 2013 04:52:26 +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-a80.g.dreamhost.com) (208.113.200.5) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Jun 2013 04:52:21 +0000 Received: from homiemail-a80.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a80.g.dreamhost.com (Postfix) with ESMTP id EA69C37A06B for ; Thu, 27 Jun 2013 21:51:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=thelastpickle.com; h=from :content-type:message-id:mime-version:subject:date:references:to :in-reply-to; s=thelastpickle.com; bh=d0TIAjkG/kEYemeRQy37VKgVjD M=; b=VC5a+sm9/Ry+A30uY+rSvRHud/CwYE0EfzH3y4CYXUYDCYOOrQZWc4kzMd edyBPCkYX0Mwge3JVM+O+aejjHWOjRIa/SyY99okTkIHxjYJ6duNxv0mKtVl7Tvp 6J+MxSAoQglzhBOmxsrNBPADBi8rOPWVNBDnryM0UF6w0sFgg= Received: from [172.16.1.7] (unknown [203.86.207.101]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: aaron@thelastpickle.com) by homiemail-a80.g.dreamhost.com (Postfix) with ESMTPSA id 619CA37A065 for ; Thu, 27 Jun 2013 21:51:59 -0700 (PDT) From: aaron morton Content-Type: multipart/alternative; boundary="Apple-Mail=_BBCECFB5-E7D9-4CC0-9EC8-673EEBE97074" Message-Id: <4080F9F6-14EC-4A3C-BC15-B5C55DA54E84@thelastpickle.com> Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: what happen if coordinator node fails during write Date: Fri, 28 Jun 2013 16:51:57 +1200 References: To: user@cassandra.apache.org In-Reply-To: X-Mailer: Apple Mail (2.1508) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_BBCECFB5-E7D9-4CC0-9EC8-673EEBE97074 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 > As far as I know in 1.2 coordinator logs request before it updates = replicas. You may be thinking about atomic batches, which are enabled by default = for 1.2 via CQL but must be supported by Thrift clients. I would guess = Hector is not using them.=20 These logs are stored on other machines, which then reply the mutation = if they have not been removed by a certain time.=20 >=20 > I am writing data to Cassandra by thrift client (not hector) and > wonder what happen if the coordinator node fails. How and when it fails is important. But lets say their was an OS level OOM situation and the process was = killed just after it sent messages to the remote replicas. In that case = all you know if the request was applied on 0 to RF number of replicas. = So it's the same as a TimedOutException.=20 The request did not complete at the request CL so reads to that data = will be working eventual consistency until the next successful write.=20 Cheers ----------------- Aaron Morton Freelance Cassandra Consultant New Zealand @aaronmorton http://www.thelastpickle.com On 26/06/2013, at 12:45 PM, Andrey Ilinykh wrote: > It depends on cassandra version. As far as I know in 1.2 coordinator = logs request before it updates replicas. If it fails it will replay log = on startup. > In 1.1 you may have inconsistant state, because only part of your = request is propagated to replicas. >=20 > Thank you, > Andrey >=20 >=20 > On Tue, Jun 25, 2013 at 5:11 PM, Jiaan Zeng = wrote: > Hi there, >=20 > I am writing data to Cassandra by thrift client (not hector) and > wonder what happen if the coordinator node fails. The same question > applies for bulk loader which uses gossip protocol instead of thrift > protocol. In my understanding, the HintedHandoff only takes care of > the replica node fails. >=20 > Thanks. >=20 > -- > Regards, > Jiaan >=20 --Apple-Mail=_BBCECFB5-E7D9-4CC0-9EC8-673EEBE97074 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=iso-8859-1
As far as I know in 1.2 = coordinator logs request before it updates = replicas.
You may be thinking about atomic batches, = which are enabled by default for 1.2 via CQL but must be supported by = Thrift clients. I would guess Hector is not using them. 
These = logs are stored on other machines, which then reply the mutation if they = have not been removed by a certain = time. 


I am writing data to Cassandra by thrift client (not hector) = and
wonder what happen if the coordinator node = fails.
How and when it = fails is important.
But lets say their was an OS level OOM = situation and the process was killed just after it sent messages to the = remote replicas. In that case all you know if the request was applied on = 0 to RF number of replicas. So it's the same as a = TimedOutException. 

The request did not = complete at the request CL so reads to that data will be working = eventual consistency until the next successful = write. 

Cheers


=
http://www.thelastpickle.com

On 26/06/2013, at 12:45 PM, Andrey Ilinykh <ailinykh@gmail.com> = wrote:

It depends on cassandra version. As far = as I know in 1.2 coordinator logs request before it updates replicas. If = it fails it will replay log on startup.
In 1.1 you may = have inconsistant state, because only part of your request = is propagated to replicas.

Thank you,
  Andrey


On Tue, Jun 25, = 2013 at 5:11 PM, Jiaan Zeng <jiaan@bloomreach.com> wrote:
Hi there,

I am writing data to Cassandra by thrift client (not hector) and
wonder what happen if the coordinator node fails. The same question
applies for bulk loader which uses gossip protocol instead of thrift
protocol. In my understanding, the HintedHandoff only takes care of
the replica node fails.

Thanks.

--
Regards,
Jiaan


= --Apple-Mail=_BBCECFB5-E7D9-4CC0-9EC8-673EEBE97074--