cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vladimir Prudnikov <v.prudni...@gmail.com>
Subject Problem inserting set when query contains IF NOT EXISTS.
Date Mon, 13 Jan 2014 17:56:55 GMT
Hi all,
I've spend a lot of time finding a bug in system, but it turns out that the
problem is in Cassandra.

Here is how to reproduce.

=============
CREATE KEYSPACE IF NOT EXISTS test_set WITH REPLICATION = { 'class' :
'SimpleStrategy', 'replication_factor' : 1 };
USE test_set;

CREATE TABLE IF NOT EXISTS user (
 key timeuuid PRIMARY KEY,
username text,
email text,
 first_name text,
last_name text,
features set<text>,
) WITH caching='all';

INSERT INTO user(key,username,email,first_name,last_name,features) VALUES
(now(),'ainsttp0ess2kiphu2pe1bbrle','
l3b7brn6jp9e8s0mmsr7ae55t4@mmcm4jf9a9g9b95c053ksbsi18.com','gqh9ekmv6vc9nf1ce8eo3rjcdd','fmg92158br9ddivoj59417q514',{'i6v8i4a5gpnris5chjibllqf0','480m4c1obiq61ilii1g7rm0v17','50kovlifrtrtqihnvmbefaeacl'})
IF NOT EXISTS;

select * from user;
==============

The problem here is that user.features is null instead of set of 3 strings.
If you remove `IF NOT EXISTS` it executes correctly and set of string will
be inserted.

I don't see any problem with the queries, seems to be the problem with C*.

-- 
Vladimir Prudnikov

Mime
View raw message