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 A35DD17633 for ; Wed, 22 Apr 2015 08:30:59 +0000 (UTC) Received: (qmail 47884 invoked by uid 500); 22 Apr 2015 08:30:59 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 47847 invoked by uid 500); 22 Apr 2015 08:30:59 -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 47808 invoked by uid 99); 22 Apr 2015 08:30:59 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Apr 2015 08:30:59 +0000 Date: Wed, 22 Apr 2015 08:30:59 +0000 (UTC) From: "Benjamin Lerer (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-9198) Deleting from an empty list produces an error 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-9198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14506644#comment-14506644 ] Benjamin Lerer commented on CASSANDRA-9198: ------------------------------------------- [~slebresne] could you commit? > Deleting from an empty list produces an error > --------------------------------------------- > > Key: CASSANDRA-9198 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9198 > Project: Cassandra > Issue Type: Bug > Components: API > Reporter: Olivier Michallat > Assignee: Jeff Jirsa > Priority: Minor > Fix For: 2.1.5 > > Attachments: 9198-v2-2.1.txt, 9198-v2-trunk.txt, 9198.txt > > > While deleting an element from a list that does not contain it is a no-op, deleting it from an empty list causes an error. > This edge case is a bit inconsistent, because it makes list deletion non idempotent: > {code} > cqlsh:test> create table foo (k int primary key, v list); > cqlsh:test> insert into foo(k,v) values (1, [1,2]); > cqlsh:test> update foo set v = v - [1] where k = 1; > cqlsh:test> update foo set v = v - [1] where k = 1; > cqlsh:test> update foo set v = v - [2] where k = 1; > cqlsh:test> update foo set v = v - [2] where k = 1; > InvalidRequest: code=2200 [Invalid query] message="Attempted to delete an element from a list which is null" > {code} > With speculative retries coming to the drivers, idempotency becomes more important because it determines which query we might retry or not. So it would be better if deleting from an empty list succeeded. -- This message was sent by Atlassian JIRA (v6.3.4#6332)