[jira] [Updated] (CASSANDRA-11513) Result set is not unique on primary key (cql)

2016-10-19 Thread Joel Knighton (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-11513?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Joel Knighton updated CASSANDRA-11513:
--
Component/s: Local Write-Read Paths

> Result set is not unique on primary key (cql) 
> --
>
> Key: CASSANDRA-11513
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11513
> Project: Cassandra
>  Issue Type: Bug
>  Components: Local Write-Read Paths
>Reporter: Tianshi Wang
>Assignee: Joel Knighton
> Fix For: 3.6
>
>
> [cqlsh 5.0.1 | Cassandra 3.4 | CQL spec 3.4.0 | Native protocol v4]
> Run followings,
> {code}
> drop table if exists test0;
> CREATE TABLE test0 (
> pk int,
> a int,
> b text,
> s text static,
> PRIMARY KEY (pk, a)
> );
> insert into test0 (pk,a,b,s) values (0,1,'b1','hello b1');
> insert into test0 (pk,a,b,s) values (0,2,'b2','hello b2');
> insert into test0 (pk,a,b,s) values (0,3,'b3','hello b3');
> create index on test0 (b);
> insert into test0 (pk,a,b,s) values (0,2,'b2 again','b2 again');
> {code}
> Now select one record based on primary key, we got all three records.
> {code}
> cqlsh:ops> select * from test0 where pk=0 and a=2;
>  pk | a | s| b
> +---+--+--
>   0 | 1 | b2 again |   b1
>   0 | 2 | b2 again | b2 again
>   0 | 3 | b2 again |   b3
> {code}
> {code}
> cqlsh:ops> desc test0;
> CREATE TABLE ops.test0 (
> pk int,
> a int,
> b text,
> s text static,
> PRIMARY KEY (pk, a)
> ) WITH CLUSTERING ORDER BY (a ASC)
> AND bloom_filter_fp_chance = 0.01
> AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
> AND comment = ''
> AND compaction = {'class': 
> 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 
> 'max_threshold': '32', 'min_threshold': '4'}
> AND compression = {'chunk_length_in_kb': '64', 'class': 
> 'org.apache.cassandra.io.compress.LZ4Compressor'}
> AND crc_check_chance = 1.0
> AND dclocal_read_repair_chance = 0.1
> AND default_time_to_live = 0
> AND gc_grace_seconds = 864000
> AND max_index_interval = 2048
> AND memtable_flush_period_in_ms = 0
> AND min_index_interval = 128
> AND read_repair_chance = 0.0
> AND speculative_retry = '99PERCENTILE';
> CREATE INDEX test0_b_idx ON ops.test0 (b);
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-11513) Result set is not unique on primary key (cql)

2016-04-18 Thread Sylvain Lebresne (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-11513?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sylvain Lebresne updated CASSANDRA-11513:
-
   Resolution: Fixed
Fix Version/s: 3.6
   Status: Resolved  (was: Patch Available)

Lgtm, +1. Committed, thanks.

> Result set is not unique on primary key (cql) 
> --
>
> Key: CASSANDRA-11513
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11513
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Tianshi Wang
>Assignee: Joel Knighton
> Fix For: 3.6
>
>
> [cqlsh 5.0.1 | Cassandra 3.4 | CQL spec 3.4.0 | Native protocol v4]
> Run followings,
> {code}
> drop table if exists test0;
> CREATE TABLE test0 (
> pk int,
> a int,
> b text,
> s text static,
> PRIMARY KEY (pk, a)
> );
> insert into test0 (pk,a,b,s) values (0,1,'b1','hello b1');
> insert into test0 (pk,a,b,s) values (0,2,'b2','hello b2');
> insert into test0 (pk,a,b,s) values (0,3,'b3','hello b3');
> create index on test0 (b);
> insert into test0 (pk,a,b,s) values (0,2,'b2 again','b2 again');
> {code}
> Now select one record based on primary key, we got all three records.
> {code}
> cqlsh:ops> select * from test0 where pk=0 and a=2;
>  pk | a | s| b
> +---+--+--
>   0 | 1 | b2 again |   b1
>   0 | 2 | b2 again | b2 again
>   0 | 3 | b2 again |   b3
> {code}
> {code}
> cqlsh:ops> desc test0;
> CREATE TABLE ops.test0 (
> pk int,
> a int,
> b text,
> s text static,
> PRIMARY KEY (pk, a)
> ) WITH CLUSTERING ORDER BY (a ASC)
> AND bloom_filter_fp_chance = 0.01
> AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
> AND comment = ''
> AND compaction = {'class': 
> 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 
> 'max_threshold': '32', 'min_threshold': '4'}
> AND compression = {'chunk_length_in_kb': '64', 'class': 
> 'org.apache.cassandra.io.compress.LZ4Compressor'}
> AND crc_check_chance = 1.0
> AND dclocal_read_repair_chance = 0.1
> AND default_time_to_live = 0
> AND gc_grace_seconds = 864000
> AND max_index_interval = 2048
> AND memtable_flush_period_in_ms = 0
> AND min_index_interval = 128
> AND read_repair_chance = 0.0
> AND speculative_retry = '99PERCENTILE';
> CREATE INDEX test0_b_idx ON ops.test0 (b);
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-11513) Result set is not unique on primary key (cql)

2016-04-18 Thread Sylvain Lebresne (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-11513?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sylvain Lebresne updated CASSANDRA-11513:
-
Reviewer: Sylvain Lebresne

> Result set is not unique on primary key (cql) 
> --
>
> Key: CASSANDRA-11513
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11513
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Tianshi Wang
>Assignee: Joel Knighton
>
> [cqlsh 5.0.1 | Cassandra 3.4 | CQL spec 3.4.0 | Native protocol v4]
> Run followings,
> {code}
> drop table if exists test0;
> CREATE TABLE test0 (
> pk int,
> a int,
> b text,
> s text static,
> PRIMARY KEY (pk, a)
> );
> insert into test0 (pk,a,b,s) values (0,1,'b1','hello b1');
> insert into test0 (pk,a,b,s) values (0,2,'b2','hello b2');
> insert into test0 (pk,a,b,s) values (0,3,'b3','hello b3');
> create index on test0 (b);
> insert into test0 (pk,a,b,s) values (0,2,'b2 again','b2 again');
> {code}
> Now select one record based on primary key, we got all three records.
> {code}
> cqlsh:ops> select * from test0 where pk=0 and a=2;
>  pk | a | s| b
> +---+--+--
>   0 | 1 | b2 again |   b1
>   0 | 2 | b2 again | b2 again
>   0 | 3 | b2 again |   b3
> {code}
> {code}
> cqlsh:ops> desc test0;
> CREATE TABLE ops.test0 (
> pk int,
> a int,
> b text,
> s text static,
> PRIMARY KEY (pk, a)
> ) WITH CLUSTERING ORDER BY (a ASC)
> AND bloom_filter_fp_chance = 0.01
> AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
> AND comment = ''
> AND compaction = {'class': 
> 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 
> 'max_threshold': '32', 'min_threshold': '4'}
> AND compression = {'chunk_length_in_kb': '64', 'class': 
> 'org.apache.cassandra.io.compress.LZ4Compressor'}
> AND crc_check_chance = 1.0
> AND dclocal_read_repair_chance = 0.1
> AND default_time_to_live = 0
> AND gc_grace_seconds = 864000
> AND max_index_interval = 2048
> AND memtable_flush_period_in_ms = 0
> AND min_index_interval = 128
> AND read_repair_chance = 0.0
> AND speculative_retry = '99PERCENTILE';
> CREATE INDEX test0_b_idx ON ops.test0 (b);
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-11513) Result set is not unique on primary key (cql)

2016-04-10 Thread Joel Knighton (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-11513?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Joel Knighton updated CASSANDRA-11513:
--
Reproduced In: 3.4
   Status: Patch Available  (was: In Progress)

I've uploaded a small patch that adds a NoRowsReader (analogous to the 
noRowsIterator used in the memtable case) as well as tests covering when slices 
is empty. This is the most elegant and least invasive solution I could find, 
but I'm pretty unfamiliar with this part of the codebase, so any alternatives 
suggestion would be appreciated.

CI looks clean relative to upstream.
||branch||testall||dtest||
|[11513-trunk|https://github.com/jkni/cassandra/tree/11513-trunk]|[testall|http://cassci.datastax.com/view/Dev/view/jkni/job/jkni-11513-trunk-testall]|[dtest|http://cassci.datastax.com/view/Dev/view/jkni/job/jkni-11513-trunk-dtest]|


> Result set is not unique on primary key (cql) 
> --
>
> Key: CASSANDRA-11513
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11513
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Tianshi Wang
>Assignee: Joel Knighton
>
> [cqlsh 5.0.1 | Cassandra 3.4 | CQL spec 3.4.0 | Native protocol v4]
> Run followings,
> {code}
> drop table if exists test0;
> CREATE TABLE test0 (
> pk int,
> a int,
> b text,
> s text static,
> PRIMARY KEY (pk, a)
> );
> insert into test0 (pk,a,b,s) values (0,1,'b1','hello b1');
> insert into test0 (pk,a,b,s) values (0,2,'b2','hello b2');
> insert into test0 (pk,a,b,s) values (0,3,'b3','hello b3');
> create index on test0 (b);
> insert into test0 (pk,a,b,s) values (0,2,'b2 again','b2 again');
> {code}
> Now select one record based on primary key, we got all three records.
> {code}
> cqlsh:ops> select * from test0 where pk=0 and a=2;
>  pk | a | s| b
> +---+--+--
>   0 | 1 | b2 again |   b1
>   0 | 2 | b2 again | b2 again
>   0 | 3 | b2 again |   b3
> {code}
> {code}
> cqlsh:ops> desc test0;
> CREATE TABLE ops.test0 (
> pk int,
> a int,
> b text,
> s text static,
> PRIMARY KEY (pk, a)
> ) WITH CLUSTERING ORDER BY (a ASC)
> AND bloom_filter_fp_chance = 0.01
> AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
> AND comment = ''
> AND compaction = {'class': 
> 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 
> 'max_threshold': '32', 'min_threshold': '4'}
> AND compression = {'chunk_length_in_kb': '64', 'class': 
> 'org.apache.cassandra.io.compress.LZ4Compressor'}
> AND crc_check_chance = 1.0
> AND dclocal_read_repair_chance = 0.1
> AND default_time_to_live = 0
> AND gc_grace_seconds = 864000
> AND max_index_interval = 2048
> AND memtable_flush_period_in_ms = 0
> AND min_index_interval = 128
> AND read_repair_chance = 0.0
> AND speculative_retry = '99PERCENTILE';
> CREATE INDEX test0_b_idx ON ops.test0 (b);
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-11513) Result set is not unique on primary key (cql)

2016-04-06 Thread Tianshi Wang (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-11513?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tianshi Wang updated CASSANDRA-11513:
-
Description: 
[cqlsh 5.0.1 | Cassandra 3.4 | CQL spec 3.4.0 | Native protocol v4]

Run followings,
{code}
drop table if exists test0;
CREATE TABLE test0 (
pk int,
a int,
b text,
s text static,
PRIMARY KEY (pk, a)
);

insert into test0 (pk,a,b,s) values (0,1,'b1','hello b1');
insert into test0 (pk,a,b,s) values (0,2,'b2','hello b2');
insert into test0 (pk,a,b,s) values (0,3,'b3','hello b3');
create index on test0 (b);
insert into test0 (pk,a,b,s) values (0,2,'b2 again','b2 again');
{code}

Now select one record based on primary key, we got all three records.
{code}
cqlsh:ops> select * from test0 where pk=0 and a=2;

 pk | a | s| b
+---+--+--
  0 | 1 | b2 again |   b1
  0 | 2 | b2 again | b2 again
  0 | 3 | b2 again |   b3
{code}

{code}
cqlsh:ops> desc test0;

CREATE TABLE ops.test0 (
pk int,
a int,
b text,
s text static,
PRIMARY KEY (pk, a)
) WITH CLUSTERING ORDER BY (a ASC)
AND bloom_filter_fp_chance = 0.01
AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
AND comment = ''
AND compaction = {'class': 
'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 
'max_threshold': '32', 'min_threshold': '4'}
AND compression = {'chunk_length_in_kb': '64', 'class': 
'org.apache.cassandra.io.compress.LZ4Compressor'}
AND crc_check_chance = 1.0
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99PERCENTILE';
CREATE INDEX test0_b_idx ON ops.test0 (b);
{code}

  was:
[cqlsh 5.0.1 | Cassandra 3.4 | CQL spec 3.4.0 | Native protocol v4]

Run followings,
{code}
drop table if exists test0;
CREATE TABLE test0 (
pk int,
a int,
b text,
s text static,
PRIMARY KEY (pk, a)
);

insert into test0 (pk,a,b,s) values (0,1,'b1','hello b1');
insert into test0 (pk,a,b,s) values (0,2,'b2','hello b2');
insert into test0 (pk,a,b,s) values (0,3,'b3','hello b3');
create index on test0 (b);
insert into test0 (pk,a,b,s) values (0,2,'b2 again','b2 again');
{code}

Now select one record based on primary key, we got all three records.
{code}
cqlsh:ops> select * from test0 where pk=0 and a=2;

 pk | a | s| b
+---+--+--
  0 | 1 | b2 again |   b1
  0 | 2 | b2 again | b2 again
  0 | 3 | b2 again |   b3
{code}


> Result set is not unique on primary key (cql) 
> --
>
> Key: CASSANDRA-11513
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11513
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Tianshi Wang
>
> [cqlsh 5.0.1 | Cassandra 3.4 | CQL spec 3.4.0 | Native protocol v4]
> Run followings,
> {code}
> drop table if exists test0;
> CREATE TABLE test0 (
> pk int,
> a int,
> b text,
> s text static,
> PRIMARY KEY (pk, a)
> );
> insert into test0 (pk,a,b,s) values (0,1,'b1','hello b1');
> insert into test0 (pk,a,b,s) values (0,2,'b2','hello b2');
> insert into test0 (pk,a,b,s) values (0,3,'b3','hello b3');
> create index on test0 (b);
> insert into test0 (pk,a,b,s) values (0,2,'b2 again','b2 again');
> {code}
> Now select one record based on primary key, we got all three records.
> {code}
> cqlsh:ops> select * from test0 where pk=0 and a=2;
>  pk | a | s| b
> +---+--+--
>   0 | 1 | b2 again |   b1
>   0 | 2 | b2 again | b2 again
>   0 | 3 | b2 again |   b3
> {code}
> {code}
> cqlsh:ops> desc test0;
> CREATE TABLE ops.test0 (
> pk int,
> a int,
> b text,
> s text static,
> PRIMARY KEY (pk, a)
> ) WITH CLUSTERING ORDER BY (a ASC)
> AND bloom_filter_fp_chance = 0.01
> AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
> AND comment = ''
> AND compaction = {'class': 
> 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 
> 'max_threshold': '32', 'min_threshold': '4'}
> AND compression = {'chunk_length_in_kb': '64', 'class': 
> 'org.apache.cassandra.io.compress.LZ4Compressor'}
> AND crc_check_chance = 1.0
> AND dclocal_read_repair_chance = 0.1
> AND default_time_to_live = 0
> AND gc_grace_seconds = 864000
> AND max_index_interval = 2048
> AND memtable_flush_period_in_ms = 0
> AND min_index_interval = 128
> AND read_repair_chance = 0.0
> AND speculative_retry = '99PERCENTILE';
> CREATE INDEX test0_b_idx ON ops.test0 (b);
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)