cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Halliday (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-7684) flush makes rows invisible to cluster key equality query
Date Tue, 05 Aug 2014 08:35:11 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-7684?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14086001#comment-14086001
] 

Jonathan Halliday commented on CASSANDRA-7684:
----------------------------------------------

reproducible on rc3 and rc4.

> flush makes rows invisible to cluster key equality query
> --------------------------------------------------------
>
>                 Key: CASSANDRA-7684
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7684
>             Project: Cassandra
>          Issue Type: Bug
>         Environment: 2.1.0.rc5
>            Reporter: Jonathan Halliday
>            Assignee: Sylvain Lebresne
>
> {noformat}
> CREATE KEYSPACE test WITH replication = {'class': 'SimpleStrategy', 'replication_factor':
1 };
> USE test;
> CREATE TYPE point_t (x double, y double);
> CREATE TABLE points (partitionkey int, b boolean static, clusteringkey point_t, PRIMARY
KEY (partitionkey, clusteringkey) );
> INSERT INTO points (partitionkey, clusteringkey) VALUES (1, {x:-104.9925100000,y:39.7476520000});
> select * from points WHERE partitionkey=1 AND clusteringkey = {x:-104.9925100000,y:39.7476520000};
>  partitionkey | clusteringkey           | b
> --------------+-------------------------+------
>             1 | {x: -104.99, y: 39.748} | null
> (1 rows)
> cqlsh:test> update points set b = true where partitionkey=1;
> cqlsh:test> select * from points WHERE partitionkey=1 AND clusteringkey = {x:-104.9925100000,y:39.7476520000};
>  partitionkey | clusteringkey           | b
> --------------+-------------------------+------
>             1 | {x: -104.99, y: 39.748} | True
> (1 rows)
> {noformat}
> // run bin/nodetool flush here
> {noformat}
> cqlsh:test> select * from points WHERE partitionkey=1 AND clusteringkey = {x:-104.9925100000,y:39.7476520000};
> (0 rows)
> cqlsh:test> select * from points WHERE partitionkey=1;
>  partitionkey | clusteringkey           | b
> --------------+-------------------------+------
>             1 | {x: -104.99, y: 39.748} | True
> (1 rows)
> {noformat}
> i.e. the data is not lost, it's just invisible when read from sstable, but visible when
read from memtable.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message