Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 63AC611ED7 for ; Wed, 20 Aug 2014 10:27:31 +0000 (UTC) Received: (qmail 62627 invoked by uid 500); 20 Aug 2014 10:27:26 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 62593 invoked by uid 500); 20 Aug 2014 10:27:26 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 62579 invoked by uid 99); 20 Aug 2014 10:27:26 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Aug 2014 10:27:26 +0000 Date: Wed, 20 Aug 2014 10:27:26 +0000 (UTC) From: "Martin Fransson (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-7801) A successful INSERT with CAS does not always store data in the DB after a DELETE MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-7801?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14103733#comment-14103733 ] Martin Fransson commented on CASSANDRA-7801: -------------------------------------------- I have tested on a single node. > A successful INSERT with CAS does not always store data in the DB after a DELETE > -------------------------------------------------------------------------------- > > Key: CASSANDRA-7801 > URL: https://issues.apache.org/jira/browse/CASSANDRA-7801 > Project: Cassandra > Issue Type: Bug > Components: Core > Environment: PC with Windows 7 and on Linux installation. > Have seen the fault on Cassandra 2.0.9 and Cassandra 2.1.0-rc5 > Reporter: Martin Fransson > Attachments: cas.zip > > > When I run a loop with CQL statements to DELETE, INSERT with CAS and then a GET. > The INSERT opertion is successful (Applied), but no data is stored in the database. I have checked the database manually after the test to verify that the DB is empty. > for (int i = 0; i < 10000; ++i) > { > try > { > t.del(); > t.cas(); > t.select(); > } > catch (Exception e) > { > System.err.println("i=" + i); > e.printStackTrace(); > break; > } > } > myCluster = Cluster.builder().addContactPoint("localhost").withPort(12742).build(); > mySession = myCluster.connect(); > mySession.execute("CREATE KEYSPACE IF NOT EXISTS castest WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };"); > mySession.execute("CREATE TABLE IF NOT EXISTS castest.users (userid text PRIMARY KEY, name text)"); > myInsert = mySession.prepare("INSERT INTO castest.users (userid, name) values ('user1', 'calle') IF NOT EXISTS"); > myDelete = mySession.prepare("DELETE FROM castest.users where userid='user1'"); > myGet = mySession.prepare("SELECT * FROM castest.users where userid='user1'"); > } > I can reproduce the fault with the attached program on a PC with windows 7. > You need a cassandra runing and you need to set the port in the program. -- This message was sent by Atlassian JIRA (v6.2#6252)