From user-return-60064-archive-asf-public=cust-asf.ponee.io@cassandra.apache.org Tue Feb 27 12:49:20 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 90083180651 for ; Tue, 27 Feb 2018 12:49:19 +0100 (CET) Received: (qmail 59449 invoked by uid 500); 27 Feb 2018 11:49:17 -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 59439 invoked by uid 99); 27 Feb 2018 11:49:17 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Feb 2018 11:49:17 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 42788C22C0 for ; Tue, 27 Feb 2018 11:49:17 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.879 X-Spam-Level: * X-Spam-Status: No, score=1.879 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 9Xqj8y_xPir6 for ; Tue, 27 Feb 2018 11:49:13 +0000 (UTC) Received: from mail-pl0-f49.google.com (mail-pl0-f49.google.com [209.85.160.49]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 642315F3B5 for ; Tue, 27 Feb 2018 11:49:13 +0000 (UTC) Received: by mail-pl0-f49.google.com with SMTP id u13so11223384plq.1 for ; Tue, 27 Feb 2018 03:49:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=YRUUM1SBV+uYDO+TILnhLe/gflkW+gFX2sngsH00QfU=; b=HQpZcWqsGRVPRvk1IEtd+BOMcpCzrl2d4m5UOaNUkuaUoYL4tmbGVJmg7RWGO2L9Wa EDdZ3Pnchi1UYaceDmfk06r+qr8a4JOncTtamT2gUqOZeXb8cPkYGqxnTx9cgIf3/1wv sC/iEgcO1eTeu4zVCJRLQnYB/L5Ctx/QL7fSGfSux1YUJT12R3Ag3tHBnWKh5atAXJl2 WNRR+e9JvNtZel4irTXBaP0k0DHmCETYEtkf1FiHBsDpgnzsDFvPIWv/d1KCB1j/FnOU ZI+wzDU/xcAY205cU/rg8ZhVYLxLQpfc/ssRjUAVxjowwhs/eqcPsVooTH9GyBqwCqGr bjWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=YRUUM1SBV+uYDO+TILnhLe/gflkW+gFX2sngsH00QfU=; b=LHNMLpIKntCm+uh82kSIGYUmj5hSTxmIqNdE2ND2LNMWexxrT9kCmpQBxwvGA8mk1m wqcJNwuLUTKdzs0deMGq3M1/nOhy8xhWQPq6oMopWs9/YHbYOWehkABPH9ZrU2jZnPXI ooztZvbPDq11RsZ3xsbP4eBg+99CpuA22EP6N7XMQT1H9BwyO7z1zdFnpXO4lq5QTGIU tv9wgj2uMhFn9ce1iQlGYMLDCBl/IY4FYrKGNz/lsCGuhIwRNSzQ8+Fr3qg6YPi80KqY 16QgFS7aDcqja5zNrp7b+41VVjeTiUqAiQaQ5b8HTpaQG2mdqm/n4qxCctJ0iM4IHq6Q efHQ== X-Gm-Message-State: APf1xPDIKN66BgidOdPXBlT9q2wbPLFlWhvA5ZL4BgPSXX/iCAb3CTK/ 26gpoA6s3pJWx4qLV1XDsJPgTseAFdktKTXqih7p9w== X-Google-Smtp-Source: AH8x226VeV+y23XJU4JIeLPsAQlUpEKzFy1dkThgopWANgKKTHKkX7otcA5dvJmVs87294Jhadk7AW3I8NIkdfy54xk= X-Received: by 2002:a17:902:2b84:: with SMTP id l4-v6mr14094442plb.338.1519732145569; Tue, 27 Feb 2018 03:49:05 -0800 (PST) MIME-Version: 1.0 Received: by 10.100.160.199 with HTTP; Tue, 27 Feb 2018 03:49:05 -0800 (PST) In-Reply-To: References: From: horschi Date: Tue, 27 Feb 2018 12:49:05 +0100 Message-ID: Subject: Re: Driver consistency issue To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary="000000000000b0c379056630361f" --000000000000b0c379056630361f Content-Type: text/plain; charset="UTF-8" Hi Abhishek & everyone else, might it be related to https://issues.apache.org/jira/browse/CASSANDRA-7868 ? regards, Christian On Tue, Feb 27, 2018 at 12:46 PM, Abhishek Kumar Maheshwari < abhishek.maheshwari@timesinternet.in> wrote: > Hi, > > Not always. Randomly i am getting this exception. (one observation, mostly > i got this exception when i add new node in cluster.) > > On Tue, Feb 27, 2018 at 4:29 PM, Nicolas Guyomar < > nicolas.guyomar@gmail.com> wrote: > >> Hi, >> >> Adding the java-driver ML for further question, because this does look >> like a bug >> >> Are you able to reproduce it a clean environnement using the same C* >> version and driver version ? >> >> >> On 27 February 2018 at 10:05, Abhishek Kumar Maheshwari < >> abhishek.maheshwari@timesinternet.in> wrote: >> >>> Hi Alex, >>> >>> i have only One DC (with name DC1) and have only one keyspace. So i dont >>> think so both of the scenario is possible. (yes in my case QUORUM is equivalent >>> of ALL) >>> >>> cqlsh> SELECT * FROM system_schema.keyspaces where >>> keyspace_name='adlog' ; >>> >>> keyspace_name | durable_writes | replication >>> ---------------+----------------+--------------------------- >>> ---------------------------------------------------- >>> adlog | True | {'DC1': '2', 'class': >>> 'org.apache.cassandra.locator.NetworkTopologyStrategy'} >>> >>> >>> On Tue, Feb 27, 2018 at 2:27 PM, Oleksandr Shulgin < >>> oleksandr.shulgin@zalando.de> wrote: >>> >>>> On Tue, Feb 27, 2018 at 9:45 AM, Abhishek Kumar Maheshwari < >>>> abhishek.maheshwari@timesinternet.in> wrote: >>>> >>>>> >>>>> i have a KeySpace in Cassandra (cassandra version 3.0.9- total 12 >>>>> Servers )With below definition: >>>>> >>>>> {'DC1': '2', 'class': 'org.apache.cassandra.locator. >>>>> NetworkTopologyStrategy'} >>>>> >>>>> Some time i am getting below exception >>>>> >>>>> [snip] >>>> >>>>> Caused by: com.datastax.driver.core.exceptions.WriteTimeoutException: >>>>> Cassandra timeout during write query at consistency QUORUM (3 replica were >>>>> required but only 2 acknowledged the write) >>>>> at com.datastax.driver.core.excep >>>>> tions.WriteTimeoutException.copy(WriteTimeoutException.java:100) >>>>> at com.datastax.driver.core.Respo >>>>> nses$Error.asException(Responses.java:134) >>>>> at com.datastax.driver.core.Reque >>>>> stHandler$SpeculativeExecution.onSet(RequestHandler.java:525) >>>>> at com.datastax.driver.core.Conne >>>>> ction$Dispatcher.channelRead0(Connection.java:1077) >>>>> >>>>> why its waiting for acknowledged from 3rd server as replication >>>>> factor is 2? >>>>> >>>> >>>> I see two possibilities: >>>> >>>> 1) The data in this keyspace is replicated to another DC, so there is >>>> also 'DC2': '2', for example, but you didn't show it. In this case QUORUM >>>> requires more than 2 nodes. >>>> 2) The write was targeting a table in a different keyspace than you >>>> think. >>>> >>>> In any case QUORUM (or LOCAL_QUORUM) with RF=2 is equivalent of ALL. >>>> Not sure why would you use it in the first place. >>>> >>>> For consistency levels involving quorum you want to go with RF=3 in a >>>> single DC. For multi DC you should think if you want QUORUM or EACH_QUORUM >>>> for your writes and figure out the RFs from that. >>>> >>>> Cheers, >>>> -- >>>> Alex >>>> >>>> >>> >>> >>> -- >>> >>> *Thanks & Regards,* >>> *Abhishek Kumar Maheshwari* >>> *+91- 9999805591 <+91%2099998%2005591> (Mobile)* >>> >>> Times Internet Ltd. | A Times of India Group Company >>> >>> FC - 6, Sector 16A, Film City, Noida, U.P. 201301 | INDIA >>> >>> *P** Please do not print this email unless it is absolutely necessary. >>> Spread environmental awareness.* >>> >> >> > > > -- > > *Thanks & Regards,* > *Abhishek Kumar Maheshwari* > *+91- 9999805591 <+91%2099998%2005591> (Mobile)* > > Times Internet Ltd. | A Times of India Group Company > > FC - 6, Sector 16A, Film City, Noida, U.P. 201301 | INDIA > > *P** Please do not print this email unless it is absolutely necessary. > Spread environmental awareness.* > --000000000000b0c379056630361f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Abhishek & everyone else,

might = it be related to=C2=A0https://issues.apache.org/jira/browse/CASSANDRA-7868 ?

regards,
Christian


On Tue, Feb 27, 2018 at 12:46 PM, Abhishek Kumar Maheshwari <abhishek.maheshwari@timesinternet.in> wrote:
Hi,

Not alwa= ys. Randomly i am getting this exception. (one observation, mostly i got th= is exception when i add new node in cluster.)

On Tue, Feb 27, 2018 at 4:29 PM, Nicolas Guyomar <= ;nicolas.guy= omar@gmail.com> wrote:
Hi,

Adding the java-driver ML for further q= uestion, because this does look like a bug

Are you= able to reproduce it a clean environnement using the same C* version and d= river version ?=C2=A0


On 27 February 2018 at 10:05, Abhis= hek Kumar Maheshwari <abhishek.maheshwari@timesinternet.in> wrote:
Hi Alex,

i have only One DC (with name DC1) and= have only one keyspace. So i dont think so both of the scenario is possibl= e. (yes in my case=C2=A0QUORUM is=C2=A0 <= span style=3D"color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12= .8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:norm= al;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;t= ext-transform:none;white-space:normal;word-spacing:0px;background-color:rgb= (255,255,255);text-decoration-style:initial;text-decoration-color:initial;f= loat:none;display:inline">equivalent of ALL)

cqlsh> SELECT * FROM system_schema.keyspaces=C2=A0 where keyspace= _name=3D'adlog' ;

=C2=A0keyspace_name | du= rable_writes | replication
---------------+----------------+= -----------------------------------------------------------------= --------------
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0adlog |=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0True | {'DC1': '2', '= class': 'org.apache.cassandra.locator.NetworkTopologyStrategy&= #39;}


On Tue, Feb 27, 2018 at 2:27 PM, Oleksandr Shulgin <oleksandr.shulgin@zalando.de> wrote:
On Tue, Feb 27, 2018 at 9:45 AM, Abhishek Kumar Maheshwari = <abhishek.maheshwari@timesinternet.in> wrote:

i have a KeySpace in Cassandra (cassandra version 3.0.9- total 12 Ser= vers )With below definition:

{'DC1': '= 2', 'class': 'org.apache.cassandra.locator.NetworkTopo= logyStrategy'}

Some time i am getting belo= w exception

[snip]=C2=A0=
Caused by: com.datastax.driver.core.exceptions.WriteTimeoutExcep= tion: Cassandra timeout during write query at consistency QUORUM (3 replica= were required but only 2 acknowledged the write)
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 at com.datastax.driver.core.exceptions.WriteTimeoutExceptio= n.copy(WriteTimeoutException.java:100)
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 at com.datastax.driver.core.Responses$Error.asExcept= ion(Responses.java:134)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at com.d= atastax.driver.core.RequestHandler$SpeculativeExecution.onSet(Req= uestHandler.java:525)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at com.dat= astax.driver.core.Connection$Dispatcher.channelRead0(Connection.j= ava:1077)

why its waiting for=C2=A0acknowledged from 3rd server as replication factor is 2?

I see two possibil= ities:

1) The data in this keyspace is replicated = to another DC, so there is also 'DC2': '2', for example, bu= t you didn't show it.=C2=A0 In this case QUORUM requires more than 2 no= des.
2) The write was targeting a table in a different keyspace t= han you think.

In any case QUORUM (or LOCAL_QUORUM= ) with RF=3D2 is equivalent of ALL.=C2=A0 Not sure why would you use it in = the first place.

For consistency levels involving = quorum you want to go with RF=3D3 in a single DC.=C2=A0 For multi DC you sh= ould think if you want QUORUM or EACH_QUORUM for your writes and figure out= the RFs from that.

Cheers,
--
Alex




-= -

Thanks & Regards, Abhishek Kumar Maheshwari
+91-=C2=A09999805591=C2=A0(Mobile)

Times Internet Ltd. | A Times of India Group Company

FC - 6, Sector 16A, Film City,=C2=A0 Noida,=C2=A0 U.P. 201301 | INDIA

P Please do not print this email unless it is = absolutely necessary. Spread environmental awareness.





--
=

Thanks & Regards,
Abhishek Kumar Maheshwari
+91-=C2=A09999805591=C2=A0(Mobile)

Times Internet Ltd. | A Times of India Group Company

FC - 6, Sector 16A, Film City,=C2=A0 Noida,=C2=A0 U.P. 201301 | INDIA

P Please do not print this email unless it is = absolutely necessary. Spread environmental awareness.


--000000000000b0c379056630361f--