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 0C718182DA for ; Tue, 30 Jun 2015 13:25:38 +0000 (UTC) Received: (qmail 99041 invoked by uid 500); 30 Jun 2015 13:25:34 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 99002 invoked by uid 500); 30 Jun 2015 13:25:34 -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 98992 invoked by uid 99); 30 Jun 2015 13:25:34 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Jun 2015 13:25:34 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 25277C0045 for ; Tue, 30 Jun 2015 13:25:34 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.88 X-Spam-Level: ** X-Spam-Status: No, score=2.88 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=rocketfuelinc.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 5ZO-_cIAG-Ob for ; Tue, 30 Jun 2015 13:25:27 +0000 (UTC) Received: from mail-oi0-f42.google.com (mail-oi0-f42.google.com [209.85.218.42]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 6118320530 for ; Tue, 30 Jun 2015 13:25:26 +0000 (UTC) Received: by oift81 with SMTP id t81so7011085oif.3 for ; Tue, 30 Jun 2015 06:24:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rocketfuelinc.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=f9rTrJCW43XT9K01QNdmVkBDc4b4XTWwE9WXGt5bFJY=; b=NnFyiejns+O0lnWxlhw1ky/vcWgB1J8tTLY0AfUwHbNSdc8je2tUAngJQIFPuot1iZ FbmZzB6rp0BYB06BaQerSLmu5eOd/Zg3JpuM2Wnc16q/FaeycYbucEkN2uHayG52gM5Y xWNBxSU02hi/PAAZ57idXw7ySOlVD2cRnru6U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=f9rTrJCW43XT9K01QNdmVkBDc4b4XTWwE9WXGt5bFJY=; b=GN+kxBbLcTfsA//Mzz1f2CT6FkInEO2rIxKIA7xHKnrUn3+FxrLud8RdHHK9dn1cr2 d4STMvCPcIncVA1TIA8HB+BCpwYu8vopLdVrsQun43BcvfI32VgIVb8C5wY3eCeCI08V eV2plr9whJMhdAWfDdODE0UEAnAYGoesQGeoY4TahjLWapgeEhDj9eWO6O1iD4D9GSHa GbOoviENWx27tBbW26RqQQtZ+7cskbo2aZ/Fn71iZ9cd/chgEK9Y4eIeoicSDTCLk62e bS/1dvxiWzgk8SeuwTtFQWQGPSzNX/QJThj6uvbkanR1ptauHCk1xKXBRGzfJkzSLJUr J6pQ== X-Gm-Message-State: ALoCoQmqHYcPwmQiw++DMkkt9cZAoPxajVmtE46wx8ATzaB4iMU/nFz0cx3UN+illZmXZgS9FbxQ MIME-Version: 1.0 X-Received: by 10.202.60.87 with SMTP id j84mr12927833oia.48.1435670680279; Tue, 30 Jun 2015 06:24:40 -0700 (PDT) Received: by 10.202.95.2 with HTTP; Tue, 30 Jun 2015 06:24:40 -0700 (PDT) In-Reply-To: References: Date: Tue, 30 Jun 2015 09:24:40 -0400 Message-ID: Subject: Re: Insert (and delete) data loss? From: Jason Kushmaul To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=001a113cd25ce9baab0519bc20c2 --001a113cd25ce9baab0519bc20c2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Can you try two more tests: 1) Write the way you are, perform a repair on all nodes, then read the way you are. 2) Write with CL quorum, read with CL quorum. On Tue, Jun 30, 2015 at 8:34 AM, Mauri Moreno Cesare < morenocesare.mauri@italtel.com> wrote: > Hi all, > > I configured a Cassandra Cluster (3 nodes). > > > > Then I created a KEYSPACE: > > > > cql> CREATE KEYSPACE test WITH REPLICATION =3D { 'class' : > 'SimpleStrategy', 'replication_factor' : 2 }; > > > > and a table: > > > > cql> CREATE TABLE chiamate_stabili (chiave TEXT PRIMARY KEY, valore > BLOB); > > > > I inserted (synchronous) 10.000 rows (with a Java Client that connects > to one of 3 nodes during connection phase). > > > > Each row has a =E2=80=9Cvalore=E2=80=9D that contains an array of 100K by= tes. > > > > When Java Client ends, I wait some seconds and then I try this command > inside cql: > > > > cql> SELECT COUNT(*) FROM test.chiamate_stabili LIMIT 10000; > > > > Result is often 10000 but sometime 6666! > > > > The same 6666 records are found with my Java Client. > > > > Here is Java query code: > > > > for(int i =3D 1; i <=3D 10000; i++) { > > String key =3D "key-" + i; > > Clause eqClause =3D QueryBuilder.eq("chiave", key); > > Statement statement =3D QueryBuilder.select().all().from("test", > tableName).where(eqClause); > > session.execute(statement); > > } > > > > Same behaviour with deletes. > > > > When I try to delete all the records sometimes the table is empty, > > but sometimes 3333 records are still present. > > > > I think that something is wrong in my code or (probably) in cluster > configuration > > but I don=E2=80=99t know which kind of tuning or configuration options I = can > explore. > > > > Any help is very appreciated. > > Many thanks in advance. > > > > Moreno > > > Internet Email Confidentiality Footer > *************************************************************************= ******************************************************************* > La presente comunicazione, con le informazioni in essa contenute e ogni > documento o file allegato, e' rivolta unicamente alla/e persona/e cui e' > indirizzata ed alle altre da questa autorizzata/e a riceverla. Se non sie= te > i destinatari/autorizzati siete avvisati che qualsiasi azione, copia, > comunicazione, divulgazione o simili basate sul contenuto di tali > informazioni e' vietata e potrebbe essere contro la legge (art. 616 C.P., > D.Lgs n. 196/2003 Codice in materia di protezione dei dati personali). Se > avete ricevuto questa comunicazione per errore, vi preghiamo di darne > immediata notizia al mittente e di distruggere il messaggio originale e > ogni file allegato senza farne copia alcuna o riprodurne in alcun modo il > contenuto. ***************** This e-mail and its attachments are intended > for the addressee(s) only and are confidential and/or may contain legally > privileged information. If you have received this message by mistake or a= re > not one of the addressees above, you may take no action based on it, and > you may not copy or show it to anyone; please reply to this e-mail and > point out the error which has occurred. > *************************************************************************= ******************************************************************* > > --=20 Jason Kushmaul | 517.899.7852 Engineering Manager --001a113cd25ce9baab0519bc20c2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Can you try two more tests:

1) Write th= e way you are, perform a repair on all nodes, then read the way you are.=C2= =A0
<wipe data>
2) Write with CL quorum, read wit= h CL quorum.


On Tue, Jun 30, 2015 at 8:34 AM, Mauri Moreno Cesare = <morenocesare.mauri@italtel.com> wrote:

Hi all,

I configured a Cassandra C= luster (3 nodes).

=C2=A0

Then I created a KEYSPACE:=

=C2=A0

cql> CREATE =C2=A0KEYSPACE =C2=A0test =C2=A0WIT= H REPLICATION =3D { 'class' : 'SimpleStrategy', 'replic= ation_factor' : 2 };

=C2=A0

and a table:=

=C2=A0

cql> CREATE TABLE =C2= =A0chiamate_stabili =C2=A0(chiave =C2=A0TEXT =C2=A0PRIMARY =C2=A0KEY, =C2= =A0valore =C2=A0BLOB);

=C2=A0

I inserted =C2=A0(synchron= ous) 10.000 rows (with a Java Client that connects =C2=A0to one of 3 nodes = during connection phase).

=C2=A0

Each row has a =E2=80=9Cva= lore=E2=80=9D that contains an array of 100K bytes.

=C2=A0

When Java Client ends, I w= ait some seconds and then I try this command inside cql:

=C2=A0

cql> SELECT =C2=A0COUNT= (*) =C2=A0FROM =C2=A0test.chiamate_stabili =C2=A0LIMIT =C2=A010000;<= u>

=C2=A0

Result is often 10000 but = sometime 6666!

=C2=A0

The same 6666 records are = found with my Java Client.

=C2=A0

Here is Java query code:

=C2=A0

for(int i =3D 1; =C2=A0i &= lt;=3D 10000; i++) {

=C2=A0 String key =3D "key-" + i;

=C2=A0 Clause eqClause =3D QueryBuilder.eq("chiave", key);=

=C2=A0 Statement statement =3D QueryBuilder.select().all().from("t= est", tableName).where(eqClause);=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0

=C2=A0 sess= ion.execute(statement);

}=

=C2= =A0

Same behaviour with deletes.

=C2=A0

When I try to delete all the records sometimes the table is empty,

but sometimes 3333 records are still present.

=C2=A0

I think that something is wrong in my code or (probably) in cluster con= figuration

but I don=E2=80=99t know which kind of tuning or configuration options = I can explore.

=C2=A0

Any help is very appreciated.

Many thanks in advance.

=C2=A0

Moreno

=C2=A0

Internet Email Confidentiality Footer *************************************= ***************************************************************************= **************************** La presente comunicazione, con le informazioni= in essa contenute e ogni documento o file allegato, e' rivolta unicamente alla/e persona/e cui e' ind= irizzata ed alle altre da questa autorizzata/e a riceverla. Se non siete i = destinatari/autorizzati siete avvisati che qualsiasi azione, copia, comunic= azione, divulgazione o simili basate sul contenuto di tali informazioni e' vietata e potrebbe essere contro la = legge (art. 616 C.P., D.Lgs n. 196/2003 Codice in materia di protezione dei= dati personali). Se avete ricevuto questa comunicazione per errore, vi pre= ghiamo di darne immediata notizia al mittente e di distruggere il messaggio originale e ogni file allegato senz= a farne copia alcuna o riprodurne in alcun modo il contenuto. *************= **** This e-mail and its attachments are intended for the addressee(s) only= and are confidential and/or may contain legally privileged information. If you have received this message = by mistake or are not one of the addressees above, you may take no action b= ased on it, and you may not copy or show it to anyone; please reply to this= e-mail and point out the error which has occurred. ******************************************************= ***************************************************************************= ***********



--
Jason Kushmaul=C2=A0| 517.899.7852
Engineering Manager
--001a113cd25ce9baab0519bc20c2--