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 5B8BC17F8F for ; Tue, 31 Mar 2015 04:56:53 +0000 (UTC) Received: (qmail 16119 invoked by uid 500); 31 Mar 2015 04:56:53 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 16083 invoked by uid 500); 31 Mar 2015 04:56:53 -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 16072 invoked by uid 99); 31 Mar 2015 04:56:53 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Mar 2015 04:56:53 +0000 Date: Tue, 31 Mar 2015 04:56:53 +0000 (UTC) From: "Jeff Jirsa (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-9077) NPE 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-9077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14387992#comment-14387992 ] Jeff Jirsa commented on CASSANDRA-9077: --------------------------------------- Reproduced in trunk, I'll see if I can track it down. > NPE > --- > > Key: CASSANDRA-9077 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9077 > Project: Cassandra > Issue Type: Bug > Components: Core > Reporter: dan jatnieks > Priority: Minor > Attachments: 9077-stacktrace.log > > > I am seeing an NPE on the latest 2.1 branch with this sequence of deletes from a list - first delete the entire list, then attempt to delete one element. > I expected to see {{List index 0 out of bound, list has size 0}} but instead got an NPE. > {noformat} > ./bin/cqlsh > Connected to Test Cluster at 127.0.0.1:9042. > [cqlsh 5.0.1 | Cassandra 2.1.3-SNAPSHOT | CQL spec 3.2.0 | Native protocol v3] > Use HELP for help. > cqlsh> use frozen_collections ; > cqlsh:frozen_collections> DROP TABLE IF EXISTS t; > cqlsh:frozen_collections> CREATE TABLE t (id text PRIMARY KEY, l list, s set); > cqlsh:frozen_collections> INSERT INTO t (id, l, s) VALUES ('user', ['1'], {'1'}); > cqlsh:frozen_collections> > cqlsh:frozen_collections> DELETE l FROM t WHERE id ='user'; > cqlsh:frozen_collections> //INSERT INTO t (id, l) VALUES ('user', ['1']); > cqlsh:frozen_collections> DELETE l[0] FROM t WHERE id = 'user'; > ServerError: > cqlsh:frozen_collections> > cqlsh:frozen_collections> DELETE s FROM t WHERE id ='user'; > cqlsh:frozen_collections> DELETE s['1'] FROM t WHERE id = 'user'; > {noformat} > It appears the {{DELETE emails...}} directly followed by {{DELETE emails[0]...}} is the offending sequence. Either one alone works fine, as does adding an intervening insert/update. > The same sequence performed on a Set rather than List works (as shown above). -- This message was sent by Atlassian JIRA (v6.3.4#6332)