[jira] [Updated] (CASSANDRA-7079) allow filtering within wide row

2014-06-30 Thread Ashot Golovenko (JIRA)

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

Ashot Golovenko updated CASSANDRA-7079:
---

Reproduced In: 2.0.9, 2.0.8  (was: 2.0.8)

> allow filtering within wide row
> ---
>
> Key: CASSANDRA-7079
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7079
> Project: Cassandra
>  Issue Type: Bug
>  Components: API, Core
>Reporter: Ashot Golovenko
>
> Let's say I have a table with wide rows.
> CREATE TABLE relation (
> u1 bigint,
> u2 bigint,
> f boolean,
> PRIMARY KEY (u1, u2));
> Usually I need to retrieve the whole row: 
> select * from relation where u1 = ?;
> But sometimes I just need the relations within u1 with f = true.
> By now I can't perform the following without creating an index which will 
> degrade write performance:
> select * from relation where u1 = ? and f=true allow filtering;
> So now I filter rows on server side which means more network traffic and I 
> don't know how much more server resources. Filtering rows in this case on a 
> server side looks like nothing hard.



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


[jira] [Updated] (CASSANDRA-7079) allow filtering within wide row

2014-06-30 Thread Ashot Golovenko (JIRA)

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

Ashot Golovenko updated CASSANDRA-7079:
---

Reproduced In: 2.0.9, 2.0.8, 2.0.7  (was: 2.0.8, 2.0.9)

> allow filtering within wide row
> ---
>
> Key: CASSANDRA-7079
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7079
> Project: Cassandra
>  Issue Type: Bug
>  Components: API, Core
>Reporter: Ashot Golovenko
>
> Let's say I have a table with wide rows.
> CREATE TABLE relation (
> u1 bigint,
> u2 bigint,
> f boolean,
> PRIMARY KEY (u1, u2));
> Usually I need to retrieve the whole row: 
> select * from relation where u1 = ?;
> But sometimes I just need the relations within u1 with f = true.
> By now I can't perform the following without creating an index which will 
> degrade write performance:
> select * from relation where u1 = ? and f=true allow filtering;
> So now I filter rows on server side which means more network traffic and I 
> don't know how much more server resources. Filtering rows in this case on a 
> server side looks like nothing hard.



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


[jira] [Updated] (CASSANDRA-6222) Allow multiple updates to a single wide row

2014-06-30 Thread Ashot Golovenko (JIRA)

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

Ashot Golovenko updated CASSANDRA-6222:
---

Component/s: API

> Allow multiple updates to a single wide row
> ---
>
> Key: CASSANDRA-6222
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6222
> Project: Cassandra
>  Issue Type: New Feature
>  Components: API, Core
>Reporter: Ashot Golovenko
>
> Let's say I have the following table
> CREATE TABLE rating (
> id bigint,
> hid int,
> r double,
> PRIMARY KEY (id, hid);
> In my case I have around 1000 records to insert with the same id value, so 
> basically I'm going to update physically the same row for 1000 times. It 
> would be nice to be able to do this update fast. Batching doesn't make it 
> really faster. Another case is to replace the row entirely with new values.



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


[jira] [Updated] (CASSANDRA-7079) allow filtering within wide row

2014-06-30 Thread Ashot Golovenko (JIRA)

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

Ashot Golovenko updated CASSANDRA-7079:
---

Component/s: API

> allow filtering within wide row
> ---
>
> Key: CASSANDRA-7079
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7079
> Project: Cassandra
>  Issue Type: Bug
>  Components: API, Core
>Reporter: Ashot Golovenko
>
> Let's say I have a table with wide rows.
> CREATE TABLE relation (
> u1 bigint,
> u2 bigint,
> f boolean,
> PRIMARY KEY (u1, u2));
> Usually I need to retrieve the whole row: 
> select * from relation where u1 = ?;
> But sometimes I just need the relations within u1 with f = true.
> By now I can't perform the following without creating an index which will 
> degrade write performance:
> select * from relation where u1 = ? and f=true allow filtering;
> So now I filter rows on server side which means more network traffic and I 
> don't know how much more server resources. Filtering rows in this case on a 
> server side looks like nothing hard.



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


[jira] [Commented] (CASSANDRA-7079) allow filtering within wide row

2014-06-20 Thread Ashot Golovenko (JIRA)

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

Ashot Golovenko commented on CASSANDRA-7079:


Any comments?

> allow filtering within wide row
> ---
>
> Key: CASSANDRA-7079
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7079
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Ashot Golovenko
>
> Let's say I have a table with wide rows.
> CREATE TABLE relation (
> u1 bigint,
> u2 bigint,
> f boolean,
> PRIMARY KEY (u1, u2));
> Usually I need to retrieve the whole row: 
> select * from relation where u1 = ?;
> But sometimes I just need the relations within u1 with f = true.
> By now I can't perform the following without creating an index which will 
> degrade write performance:
> select * from relation where u1 = ? and f=true allow filtering;
> So now I filter rows on server side which means more network traffic and I 
> don't know how much more server resources. Filtering rows in this case on a 
> server side looks like nothing hard.



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


[jira] [Updated] (CASSANDRA-7079) allow filtering within wide row

2014-06-11 Thread Ashot Golovenko (JIRA)

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

Ashot Golovenko updated CASSANDRA-7079:
---

Reproduced In: 2.0.8

> allow filtering within wide row
> ---
>
> Key: CASSANDRA-7079
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7079
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Ashot Golovenko
>
> Let's say I have a table with wide rows.
> CREATE TABLE relation (
> u1 bigint,
> u2 bigint,
> f boolean,
> PRIMARY KEY (u1, u2));
> Usually I need to retrieve the whole row: 
> select * from relation where u1 = ?;
> But sometimes I just need the relations within u1 with f = true.
> By now I can't perform the following without creating an index which will 
> degrade write performance:
> select * from relation where u1 = ? and f=true allow filtering;
> So now I filter rows on server side which means more network traffic and I 
> don't know how much more server resources. Filtering rows in this case on a 
> server side looks like nothing hard.



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


[jira] [Commented] (CASSANDRA-7379) updating a row with compound key with a null value removes the entire row

2014-06-11 Thread Ashot Golovenko (JIRA)

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

Ashot Golovenko commented on CASSANDRA-7379:


[~mishail], is it also expected from UPDATE and INSERT statements to produce 
different results?

> updating a row with compound key with a null value removes the entire row
> -
>
> Key: CASSANDRA-7379
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7379
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Ashot Golovenko
>Assignee: Michael Shuler
>Priority: Critical
>
> create a table
> CREATE TABLE relation (
> u1 bigint,
> u2 bigint,
> mf int,
> PRIMARY KEY (u1, u2));
> insert value:
> UPDATE relation SET mf = 1 WHERE u1 = 1 and u2 = 2;
> SELECT * from relation ;
>  u1 | u2 | mf
> ++
>   1 |  2 |  1
> insert null value:
> UPDATE relation SET mf = null WHERE u1 = 1 and u2 = 2;
> SELECT * from relation ;
> (0 rows) <--- WRONG!
> The INSERT statement however works:
> INSERT INTO relation (u1, u2, mf) VALUES (1, 2, null); 
> SELECT * from relation ;
>  u1 | u2 | mf
> ++--
>   1 |  2 | null
> (1 rows)
>  



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


[jira] [Updated] (CASSANDRA-7379) updating a row with compound key with a null value removes the entire row

2014-06-11 Thread Ashot Golovenko (JIRA)

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

Ashot Golovenko updated CASSANDRA-7379:
---

Reproduced In: 2.0.8, 2.0.7  (was: 2.0.7, 2.0.8)
  Summary: updating a row with compound key with a null value removes 
the entire row  (was: updating a row with composite key with a null value 
removes the entire row)

> updating a row with compound key with a null value removes the entire row
> -
>
> Key: CASSANDRA-7379
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7379
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Ashot Golovenko
>Assignee: Michael Shuler
>Priority: Critical
>
> create a table
> CREATE TABLE relation (
> u1 bigint,
> u2 bigint,
> mf int,
> PRIMARY KEY (u1, u2));
> insert value:
> UPDATE relation SET mf = 1 WHERE u1 = 1 and u2 = 2;
> SELECT * from relation ;
>  u1 | u2 | mf
> ++
>   1 |  2 |  1
> insert null value:
> UPDATE relation SET mf = null WHERE u1 = 1 and u2 = 2;
> SELECT * from relation ;
> (0 rows) <--- WRONG!
> The INSERT statement however works:
> INSERT INTO relation (u1, u2, mf) VALUES (1, 2, null); 
> SELECT * from relation ;
>  u1 | u2 | mf
> ++--
>   1 |  2 | null
> (1 rows)
>  



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


[jira] [Commented] (CASSANDRA-7379) updating a row with composite key with a null value removes the entire row

2014-06-11 Thread Ashot Golovenko (JIRA)

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

Ashot Golovenko commented on CASSANDRA-7379:


[~jkrupan], you're right, updated the title

> updating a row with composite key with a null value removes the entire row
> --
>
> Key: CASSANDRA-7379
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7379
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Ashot Golovenko
>Assignee: Michael Shuler
>Priority: Critical
>
> create a table
> CREATE TABLE relation (
> u1 bigint,
> u2 bigint,
> mf int,
> PRIMARY KEY (u1, u2));
> insert value:
> UPDATE relation SET mf = 1 WHERE u1 = 1 and u2 = 2;
> SELECT * from relation ;
>  u1 | u2 | mf
> ++
>   1 |  2 |  1
> insert null value:
> UPDATE relation SET mf = null WHERE u1 = 1 and u2 = 2;
> SELECT * from relation ;
> (0 rows) <--- WRONG!
> The INSERT statement however works:
> INSERT INTO relation (u1, u2, mf) VALUES (1, 2, null); 
> SELECT * from relation ;
>  u1 | u2 | mf
> ++--
>   1 |  2 | null
> (1 rows)
>  



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


[jira] [Updated] (CASSANDRA-7379) updating a row with composite key with a null value removes the entire row

2014-06-11 Thread Ashot Golovenko (JIRA)

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

Ashot Golovenko updated CASSANDRA-7379:
---

Reproduced In: 2.0.8, 2.0.7  (was: 2.0.7, 2.0.8)

> updating a row with composite key with a null value removes the entire row
> --
>
> Key: CASSANDRA-7379
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7379
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Ashot Golovenko
>Assignee: Michael Shuler
>Priority: Critical
>
> create a table
> CREATE TABLE relation (
> u1 bigint,
> u2 bigint,
> mf int,
> PRIMARY KEY (u1, u2));
> insert value:
> UPDATE relation SET mf = 1 WHERE u1 = 1 and u2 = 2;
> SELECT * from relation ;
>  u1 | u2 | mf
> ++
>   1 |  2 |  1
> insert null value:
> UPDATE relation SET mf = null WHERE u1 = 1 and u2 = 2;
> SELECT * from relation ;
> (0 rows) <--- WRONG!
> The INSERT statement however works:
> INSERT INTO relation (u1, u2, mf) VALUES (1, 2, null); 
> SELECT * from relation ;
>  u1 | u2 | mf
> ++--
>   1 |  2 | null
> (1 rows)
>  



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


[jira] [Created] (CASSANDRA-7379) updating a row with composite key with a null value removes the entire row

2014-06-11 Thread Ashot Golovenko (JIRA)
Ashot Golovenko created CASSANDRA-7379:
--

 Summary: updating a row with composite key with a null value 
removes the entire row
 Key: CASSANDRA-7379
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7379
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Ashot Golovenko
Priority: Critical


create a table

CREATE TABLE relation (
u1 bigint,
u2 bigint,
mf int,
PRIMARY KEY (u1, u2));

insert value:
UPDATE facebook_user_relation SET mf = 1 WHERE u1 = 1 and u2 = 2;

SELECT * from relation ;

 u1 | u2 | mf
++
  1 |  2 |  1

insert null value:
UPDATE relation SET mf = null WHERE u1 = 1 and u2 = 2;

SELECT * from relation ;

(0 rows) <--- WRONG!

The INSERT statement however works:
INSERT INTO relation (u1, u2, mf) VALUES (1, 2, null); 

SELECT * from relation ;

 u1 | u2 | mf
++--
  1 |  2 | null

(1 rows)
 








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


[jira] [Updated] (CASSANDRA-7379) updating a row with composite key with a null value removes the entire row

2014-06-11 Thread Ashot Golovenko (JIRA)

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

Ashot Golovenko updated CASSANDRA-7379:
---

Description: 
create a table

CREATE TABLE relation (
u1 bigint,
u2 bigint,
mf int,
PRIMARY KEY (u1, u2));

insert value:
UPDATE relation SET mf = 1 WHERE u1 = 1 and u2 = 2;

SELECT * from relation ;

 u1 | u2 | mf
++
  1 |  2 |  1

insert null value:
UPDATE relation SET mf = null WHERE u1 = 1 and u2 = 2;

SELECT * from relation ;

(0 rows) <--- WRONG!

The INSERT statement however works:
INSERT INTO relation (u1, u2, mf) VALUES (1, 2, null); 

SELECT * from relation ;

 u1 | u2 | mf
++--
  1 |  2 | null

(1 rows)
 






  was:
create a table

CREATE TABLE relation (
u1 bigint,
u2 bigint,
mf int,
PRIMARY KEY (u1, u2));

insert value:
UPDATE facebook_user_relation SET mf = 1 WHERE u1 = 1 and u2 = 2;

SELECT * from relation ;

 u1 | u2 | mf
++
  1 |  2 |  1

insert null value:
UPDATE relation SET mf = null WHERE u1 = 1 and u2 = 2;

SELECT * from relation ;

(0 rows) <--- WRONG!

The INSERT statement however works:
INSERT INTO relation (u1, u2, mf) VALUES (1, 2, null); 

SELECT * from relation ;

 u1 | u2 | mf
++--
  1 |  2 | null

(1 rows)
 







> updating a row with composite key with a null value removes the entire row
> --
>
> Key: CASSANDRA-7379
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7379
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Ashot Golovenko
>Priority: Critical
>
> create a table
> CREATE TABLE relation (
> u1 bigint,
> u2 bigint,
> mf int,
> PRIMARY KEY (u1, u2));
> insert value:
> UPDATE relation SET mf = 1 WHERE u1 = 1 and u2 = 2;
> SELECT * from relation ;
>  u1 | u2 | mf
> ++
>   1 |  2 |  1
> insert null value:
> UPDATE relation SET mf = null WHERE u1 = 1 and u2 = 2;
> SELECT * from relation ;
> (0 rows) <--- WRONG!
> The INSERT statement however works:
> INSERT INTO relation (u1, u2, mf) VALUES (1, 2, null); 
> SELECT * from relation ;
>  u1 | u2 | mf
> ++--
>   1 |  2 | null
> (1 rows)
>  



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


[jira] [Updated] (CASSANDRA-7079) allow filtering within wide row

2014-05-15 Thread Ashot Golovenko (JIRA)

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

Ashot Golovenko updated CASSANDRA-7079:
---

Description: 
Let's say I have a table with wide rows.
CREATE TABLE relation (
u1 bigint,
u2 bigint,
f boolean,
PRIMARY KEY (u1, u2));

Usually I need to retrieve the whole row: 
select * from relation where u1 = ?;

But sometimes I just need the relations within u1 with f = true.
By now I can't perform the following without creating an index which will 
degrade write performance:

select * from relation where u1 = ? and f=true allow filtering;

So now I filter rows on server side which means more network traffic and I 
don't know how much more server resources. Filtering rows in this case on a 
server side looks like nothing hard.

  was:
Let's say I have a table with wide rows.
CREATE TABLE relation (
u1 bigint,
u2 bigint,
f boolean,
PRIMARY KEY (u1, u2));

Usually I need to retrieve the whole row: 
select * from relation where u1 = ?;

But sometimes I just need the relations within u1 with f = true.
By now I cant perform the following without creating an index which will 
degrade write performance:

select * from relation where u1 = ? and f=true allow filtering;

So now I filter rows on server side which means more network traffic and I 
don't know how much more server resources. Filtering rows in this case on a 
server side looks like nothing hard.

 Issue Type: Bug  (was: Wish)

> allow filtering within wide row
> ---
>
> Key: CASSANDRA-7079
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7079
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Ashot Golovenko
>
> Let's say I have a table with wide rows.
> CREATE TABLE relation (
> u1 bigint,
> u2 bigint,
> f boolean,
> PRIMARY KEY (u1, u2));
> Usually I need to retrieve the whole row: 
> select * from relation where u1 = ?;
> But sometimes I just need the relations within u1 with f = true.
> By now I can't perform the following without creating an index which will 
> degrade write performance:
> select * from relation where u1 = ? and f=true allow filtering;
> So now I filter rows on server side which means more network traffic and I 
> don't know how much more server resources. Filtering rows in this case on a 
> server side looks like nothing hard.



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


[jira] [Created] (CASSANDRA-7079) allow filtering within wide row

2014-04-23 Thread Ashot Golovenko (JIRA)
Ashot Golovenko created CASSANDRA-7079:
--

 Summary: allow filtering within wide row
 Key: CASSANDRA-7079
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7079
 Project: Cassandra
  Issue Type: Wish
  Components: Core
Reporter: Ashot Golovenko


Let's say I have a table with wide rows.
CREATE TABLE relation (
u1 bigint,
u2 bigint,
f boolean,
PRIMARY KEY (u1, u2));

Usually I need to retrieve the whole row: 
select * from relation where u1 = ?;

But sometimes I just need the relations within u1 with f = true.
By now I cant perform the following without creating an index which will 
degrade write performance:

select * from relation where u1 = ? and f=true allow filtering;

So now I filter rows on server side which means more network traffic and I 
don't know how much more server resources. Filtering rows in this case on a 
server side looks like nothing hard.



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


[jira] [Commented] (CASSANDRA-6220) Unable to select multiple entries using In clause on clustering part of compound key

2013-10-21 Thread Ashot Golovenko (JIRA)

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

Ashot Golovenko commented on CASSANDRA-6220:


For inserts I was using a datastax java driver 1.0.3 with cassandra 2.0.1, 
single node on MacOsX 10.8.5 with SSD.
Wrong result sets can be seen through java driver and cqlsh as well.


> Unable to select multiple entries using In clause on clustering part of 
> compound key
> 
>
> Key: CASSANDRA-6220
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6220
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Ashot Golovenko
> Attachments: inserts.zip
>
>
> I have the following table:
> CREATE TABLE rating (
> id bigint,
> mid int,
> hid int,
> r double,
> PRIMARY KEY ((id, mid), hid));
> And I get really really strange result sets on the following queries:
> cqlsh:bm> SELECT hid, r FROM rating WHERE id  = 755349113 and mid = 201310 
> and hid = 201329320;
>  hid   | r
> ---+
>  201329320 | 45.476
> (1 rows)
> cqlsh:bm> SELECT hid, r FROM rating WHERE id  = 755349113 and mid = 201310 
> and hid = 201329220;
>  hid   | r
> ---+---
>  201329220 | 53.62
> (1 rows)
> cqlsh:bm> SELECT hid, r FROM rating WHERE id  = 755349113 and mid = 201310 
> and hid in (201329320, 201329220);
>  hid   | r
> ---+
>  201329320 | 45.476
> (1 rows)  <-- WRONG - should be two records
> As you can see although both records exist I'm not able the fetch all of them 
> using in clause. By now I have to cycle my requests which are about 30 and I 
> find it highly inefficient given that I query physically the same row. 
> More of that  - it doesn't happen all the time! For different id values 
> sometimes I get the correct dataset.
> Ideally I'd like the following select to work:
> SELECT hid, r FROM rating WHERE id  = 755349113 and mid in ? and hid in ?;
> Which doesn't work either.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Updated] (CASSANDRA-6220) Unable to select multiple entries using In clause on clustering part of compound key

2013-10-21 Thread Ashot Golovenko (JIRA)

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

Ashot Golovenko updated CASSANDRA-6220:
---

Attachment: inserts.zip

I've generated some insert scripts... Well the bug disappeared meanwhile but 
It'll be back=)

> Unable to select multiple entries using In clause on clustering part of 
> compound key
> 
>
> Key: CASSANDRA-6220
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6220
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Ashot Golovenko
> Attachments: inserts.zip
>
>
> I have the following table:
> CREATE TABLE rating (
> id bigint,
> mid int,
> hid int,
> r double,
> PRIMARY KEY ((id, mid), hid));
> And I get really really strange result sets on the following queries:
> cqlsh:bm> SELECT hid, r FROM rating WHERE id  = 755349113 and mid = 201310 
> and hid = 201329320;
>  hid   | r
> ---+
>  201329320 | 45.476
> (1 rows)
> cqlsh:bm> SELECT hid, r FROM rating WHERE id  = 755349113 and mid = 201310 
> and hid = 201329220;
>  hid   | r
> ---+---
>  201329220 | 53.62
> (1 rows)
> cqlsh:bm> SELECT hid, r FROM rating WHERE id  = 755349113 and mid = 201310 
> and hid in (201329320, 201329220);
>  hid   | r
> ---+
>  201329320 | 45.476
> (1 rows)  <-- WRONG - should be two records
> As you can see although both records exist I'm not able the fetch all of them 
> using in clause. By now I have to cycle my requests which are about 30 and I 
> find it highly inefficient given that I query physically the same row. 
> More of that  - it doesn't happen all the time! For different id values 
> sometimes I get the correct dataset.
> Ideally I'd like the following select to work:
> SELECT hid, r FROM rating WHERE id  = 755349113 and mid in ? and hid in ?;
> Which doesn't work either.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Created] (CASSANDRA-6222) Allow multiple updates to a single wide row

2013-10-20 Thread Ashot Golovenko (JIRA)
Ashot Golovenko created CASSANDRA-6222:
--

 Summary: Allow multiple updates to a single wide row
 Key: CASSANDRA-6222
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6222
 Project: Cassandra
  Issue Type: New Feature
  Components: Core
Reporter: Ashot Golovenko


Let's say I have the following table

CREATE TABLE rating (
id bigint,
hid int,
r double,
PRIMARY KEY (id, hid);

In my case I have around 1000 records to insert with the same id value, so 
basically I'm going to update physically the same row for 1000 times. It would 
be nice to be able to do this update fast. Batching doesn't make it really 
faster. Another case is to replace the row entirely with new values.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (CASSANDRA-6220) Unable to select multiple entries using In clause on clustering part of compound key

2013-10-20 Thread Ashot Golovenko (JIRA)

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

Ashot Golovenko commented on CASSANDRA-6220:


looks like the same problem

> Unable to select multiple entries using In clause on clustering part of 
> compound key
> 
>
> Key: CASSANDRA-6220
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6220
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Ashot Golovenko
>
> I have the following table:
> CREATE TABLE rating (
> id bigint,
> mid int,
> hid int,
> r double,
> PRIMARY KEY ((id, mid), hid));
> And I get really really strange result sets on the following queries:
> cqlsh:bm> SELECT hid, r FROM rating WHERE id  = 755349113 and mid = 201310 
> and hid = 201329320;
>  hid   | r
> ---+
>  201329320 | 45.476
> (1 rows)
> cqlsh:bm> SELECT hid, r FROM rating WHERE id  = 755349113 and mid = 201310 
> and hid = 201329220;
>  hid   | r
> ---+---
>  201329220 | 53.62
> (1 rows)
> cqlsh:bm> SELECT hid, r FROM rating WHERE id  = 755349113 and mid = 201310 
> and hid in (201329320, 201329220);
>  hid   | r
> ---+
>  201329320 | 45.476
> (1 rows)  <-- WRONG - should be two records
> As you can see although both records exist I'm not able the fetch all of them 
> using in clause. By now I have to cycle my requests which are about 30 and I 
> find it highly inefficient given that I query physically the same row. 
> More of that  - it doesn't happen all the time! For different id values 
> sometimes I get the correct dataset.
> Ideally I'd like the following select to work:
> SELECT hid, r FROM rating WHERE id  = 755349113 and mid in ? and hid in ?;
> Which doesn't work either.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (CASSANDRA-6137) CQL3 SELECT IN CLAUSE inconsistent

2013-10-20 Thread Ashot Golovenko (JIRA)

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

Ashot Golovenko commented on CASSANDRA-6137:


Oh, I think I've just created a duplicate bug.
Check this out - https://issues.apache.org/jira/browse/CASSANDRA-6220 
Reproduced on 2.0.1

> CQL3 SELECT IN CLAUSE inconsistent
> --
>
> Key: CASSANDRA-6137
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6137
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
> Environment: Ubuntu AWS Cassandra 2.0.1 SINGLE NODE on EBS RAID 
> storage
> OSX Cassandra 1.2.8 on SSD storage
>Reporter: Constance Eustace
>Priority: Minor
>
> I am elevating this to Critical after doing some trace and reproducing in 
> several environments. No one has commented on this bug from the cassandra 
> team, and I view unreliable/corrupted data a pretty big deal. We are 
> considering pulling cassandra and using something else.
> We have the data state reproduced locally in an environment that we can set 
> TRACE logging, attach a debugger, etc. Some guidance as to where to look 
> would be greatly appreciated.
> --
> We are encountering inconsistent results from CQL3 queries with column keys 
> using IN clause in WHERE. This has been reproduced in cqlsh and the jdbc 
> driver.
> Rowkey is e_entid
> Column key is p_prop
> This returns roughly 21 rows for 21 column keys that match p_prop.
> cqlsh> SELECT 
> e_entid,e_entname,e_enttype,p_prop,p_flags,p_propid,e_entlinks,p_proplinks,p_subents,p_val,p_vallinks,p_vars
>  FROM internal_submission.Entity_Job WHERE e_entid = 
> '845b38f1-2b91-11e3-854d-126aad0075d4-CJOB';
> These three queries each return one row for the requested single column key 
> in the IN clause:
> SELECT 
> e_entid,e_entname,e_enttype,p_prop,p_flags,p_propid,e_entlinks,p_proplinks,p_subents,p_val,p_vallinks,p_vars
>  FROM internal_submission.Entity_Job WHERE e_entid = 
> '845b38f1-2b91-11e3-854d-126aad0075d4-CJOB'  AND p_prop in 
> ('urn:bby:pcm:job:ingest:content:complete:count');
> SELECT 
> e_entid,e_entname,e_enttype,p_prop,p_flags,p_propid,e_entlinks,p_proplinks,p_subents,p_val,p_vallinks,p_vars
>  FROM internal_submission.Entity_Job WHERE e_entid = 
> '845b38f1-2b91-11e3-854d-126aad0075d4-CJOB'  AND p_prop in 
> ('urn:bby:pcm:job:ingest:content:all:count');
> SELECT 
> e_entid,e_entname,e_enttype,p_prop,p_flags,p_propid,e_entlinks,p_proplinks,p_subents,p_val,p_vallinks,p_vars
>  FROM internal_submission.Entity_Job WHERE e_entid = 
> '845b38f1-2b91-11e3-854d-126aad0075d4-CJOB'  AND p_prop in 
> ('urn:bby:pcm:job:ingest:content:fail:count');
> This query returns ONLY ONE ROW (one column key), not three as I would expect 
> from the three-column-key IN clause:
> cqlsh> SELECT 
> e_entid,e_entname,e_enttype,p_prop,p_flags,p_propid,e_entlinks,p_proplinks,p_subents,p_val,p_vallinks,p_vars
>  FROM internal_submission.Entity_Job WHERE e_entid = 
> '845b38f1-2b91-11e3-854d-126aad0075d4-CJOB'  AND p_prop in 
> ('urn:bby:pcm:job:ingest:content:complete:count','urn:bby:pcm:job:ingest:content:all:count','urn:bby:pcm:job:ingest:content:fail:count');
> This query does return two rows however for the requested two column keys:
> cqlsh> SELECT 
> e_entid,e_entname,e_enttype,p_prop,p_flags,p_propid,e_entlinks,p_proplinks,p_subents,p_val,p_vallinks,p_vars
>  FROM internal_submission.Entity_Job WHERE e_entid = 
> '845b38f1-2b91-11e3-854d-126aad0075d4-CJOB'  AND p_prop in (  
>   
> 'urn:bby:pcm:job:ingest:content:all:count','urn:bby:pcm:job:ingest:content:fail:count');
> cqlsh> describe table internal_submission.entity_job;
> CREATE TABLE entity_job (
>   e_entid text,
>   p_prop text,
>   describes text,
>   dndcondition text,
>   e_entlinks text,
>   e_entname text,
>   e_enttype text,
>   ingeststatus text,
>   ingeststatusdetail text,
>   p_flags text,
>   p_propid text,
>   p_proplinks text,
>   p_storage text,
>   p_subents text,
>   p_val text,
>   p_vallang text,
>   p_vallinks text,
>   p_valtype text,
>   p_valunit text,
>   p_vars text,
>   partnerid text,
>   referenceid text,
>   size int,
>   sourceip text,
>   submitdate bigint,
>   submitevent text,
>   userid text,
>   version text,
>   PRIMARY KEY (e_entid, p_prop)
> ) WITH
>   bloom_filter_fp_chance=0.01 AND
>   caching='KEYS_ONLY' AND
>   comment='' AND
>   dclocal_read_repair_chance=0.00 AND
>   gc_grace_seconds=864000 AND
>   index_interval=128 AND
>   read_repair_chance=0.10 AND
>   replicate_on_write='true' AND
>   populate_io_cache_on_flush='false' AND
>   default_time_to_live=0 AND
>   speculative_retry='NONE' AND
>   memtable_flush_period_in_ms=0 AND
>   compaction={'class': 'SizeTieredCompa

[jira] [Updated] (CASSANDRA-6220) Unable to select multiple entries using In clause on clustering part of compound key

2013-10-20 Thread Ashot Golovenko (JIRA)

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

Ashot Golovenko updated CASSANDRA-6220:
---

Description: 
I have the following table:

CREATE TABLE rating (
id bigint,
mid int,
hid int,
r double,
PRIMARY KEY ((id, mid), hid));

And I get really really strange result sets on the following queries:

cqlsh:bm> SELECT hid, r FROM rating WHERE id  = 755349113 and mid = 201310 and 
hid = 201329320;

 hid   | r
---+
 201329320 | 45.476

(1 rows)

cqlsh:bm> SELECT hid, r FROM rating WHERE id  = 755349113 and mid = 201310 and 
hid = 201329220;

 hid   | r
---+---
 201329220 | 53.62

(1 rows)

cqlsh:bm> SELECT hid, r FROM rating WHERE id  = 755349113 and mid = 201310 and 
hid in (201329320, 201329220);

 hid   | r
---+
 201329320 | 45.476

(1 rows)  <-- WRONG - should be two records

As you can see although both records exist I'm not able the fetch all of them 
using in clause. By now I have to cycle my requests which are about 30 and I 
find it highly inefficient given that I query physically the same row. 
More of that  - it doesn't happen all the time! For different id values 
sometimes I get the correct dataset.

Ideally I'd like the following select to work:
SELECT hid, r FROM rating WHERE id  = 755349113 and mid in ? and hid in ?;
Which doesn't work either.



  was:
I have the following table:

CREATE TABLE rating (
id bigint,
mid int,
hid int,
r double,
PRIMARY KEY ((id, mid), hid));

And I get really really strange result sets on the following queries:

cqlsh:bm> SELECT hid, r FROM rating WHERE id  = 755349113 and mid = 201310 and 
hid = 201329320;

 hid   | r
---+
 201329320 | 45.476

(1 rows)

cqlsh:bm> SELECT hid, r FROM rating WHERE id  = 755349113 and mid = 201310 and 
hid = 201329220;

 hid   | r
---+---
 201329220 | 53.62

(1 rows)

cqlsh:bm> SELECT hid, r FROM rating WHERE id  = 755349113 and mid = 201310 and 
hid in (201329320, 201329220);

 hid   | r
---+
 201329320 | 45.476

(1 rows)  <-- WRONG - should be two records

As you can see although both records exist I'm not able the fetch all of them 
using in clause. By now I have to cycle my requests which are about 30 and I 
find it highly inefficient given that I query physically the same row. 

Ideally I'd like the following select to work:
SELECT hid, r FROM rating WHERE id  = 755349113 and mid in ? and hid in ?;
Which doesn't work either.




> Unable to select multiple entries using In clause on clustering part of 
> compound key
> 
>
> Key: CASSANDRA-6220
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6220
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Ashot Golovenko
>
> I have the following table:
> CREATE TABLE rating (
> id bigint,
> mid int,
> hid int,
> r double,
> PRIMARY KEY ((id, mid), hid));
> And I get really really strange result sets on the following queries:
> cqlsh:bm> SELECT hid, r FROM rating WHERE id  = 755349113 and mid = 201310 
> and hid = 201329320;
>  hid   | r
> ---+
>  201329320 | 45.476
> (1 rows)
> cqlsh:bm> SELECT hid, r FROM rating WHERE id  = 755349113 and mid = 201310 
> and hid = 201329220;
>  hid   | r
> ---+---
>  201329220 | 53.62
> (1 rows)
> cqlsh:bm> SELECT hid, r FROM rating WHERE id  = 755349113 and mid = 201310 
> and hid in (201329320, 201329220);
>  hid   | r
> ---+
>  201329320 | 45.476
> (1 rows)  <-- WRONG - should be two records
> As you can see although both records exist I'm not able the fetch all of them 
> using in clause. By now I have to cycle my requests which are about 30 and I 
> find it highly inefficient given that I query physically the same row. 
> More of that  - it doesn't happen all the time! For different id values 
> sometimes I get the correct dataset.
> Ideally I'd like the following select to work:
> SELECT hid, r FROM rating WHERE id  = 755349113 and mid in ? and hid in ?;
> Which doesn't work either.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Updated] (CASSANDRA-6220) Unable to select multiple entries using In clause on clustering part of compound key

2013-10-20 Thread Ashot Golovenko (JIRA)

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

Ashot Golovenko updated CASSANDRA-6220:
---

Description: 
I have the following table:

CREATE TABLE rating (
id bigint,
mid int,
hid int,
r double,
PRIMARY KEY ((id, mid), hid));

And I get really really strange result sets on the following queries:

cqlsh:bm> SELECT hid, r FROM rating WHERE id  = 755349113 and mid = 201310 and 
hid = 201329320;

 hid   | r
---+
 201329320 | 45.476

(1 rows)

cqlsh:bm> SELECT hid, r FROM rating WHERE id  = 755349113 and mid = 201310 and 
hid = 201329220;

 hid   | r
---+---
 201329220 | 53.62

(1 rows)

cqlsh:bm> SELECT hid, r FROM rating WHERE id  = 755349113 and mid = 201310 and 
hid in (201329320, 201329220);

 hid   | r
---+
 201329320 | 45.476

(1 rows)  <-- WRONG - should be two records

As you can see although both records exist I'm not able the fetch all of them 
using in clause. By now I have to cycle my requests which are about 30 and I 
find it highly inefficient given that I query physically the same row. 

Ideally I'd like the following select to work:
SELECT hid, r FROM rating WHERE id  = 755349113 and mid in ? and hid in ?;
Which doesn't work either.



  was:
I have the following table:

CREATE TABLE rating (
id bigint,
mid int,
hid int,
r double,
PRIMARY KEY ((id, mid), hid));

And I get really really strange result sets on the following queries:

cqlsh:bm> SELECT hid, r FROM rating WHERE id  = 755349113 and mid = 201310 and 
hid = 201329320;

 hid   | r
---+
 201329320 | 45.476

(1 rows)

cqlsh:bm> SELECT hid, r FROM rating WHERE id  = 755349113 and mid = 201310 and 
hid = 201329220;

 hid   | r
---+---
 201329220 | 53.62

(1 rows)

cqlsh:bm> SELECT hid, r FROM rating WHERE id  = 755349113 and mid = 201310 and 
hid in (201329320, 201329220);

 hid   | r
---+
 201329320 | 45.476  <-- WRONG - only one result

As you can see although both records exist I'm not able the fetch all of them 
using in clause. By now I have to cycle my requests which are about 30 and I 
find it highly inefficient given that I query physically the same row. 

Ideally I'd like the following select to work:
SELECT hid, r FROM rating WHERE id  = 755349113 and mid in ? and hid in ?;
Which doesn't work either.




> Unable to select multiple entries using In clause on clustering part of 
> compound key
> 
>
> Key: CASSANDRA-6220
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6220
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Ashot Golovenko
>
> I have the following table:
> CREATE TABLE rating (
> id bigint,
> mid int,
> hid int,
> r double,
> PRIMARY KEY ((id, mid), hid));
> And I get really really strange result sets on the following queries:
> cqlsh:bm> SELECT hid, r FROM rating WHERE id  = 755349113 and mid = 201310 
> and hid = 201329320;
>  hid   | r
> ---+
>  201329320 | 45.476
> (1 rows)
> cqlsh:bm> SELECT hid, r FROM rating WHERE id  = 755349113 and mid = 201310 
> and hid = 201329220;
>  hid   | r
> ---+---
>  201329220 | 53.62
> (1 rows)
> cqlsh:bm> SELECT hid, r FROM rating WHERE id  = 755349113 and mid = 201310 
> and hid in (201329320, 201329220);
>  hid   | r
> ---+
>  201329320 | 45.476
> (1 rows)  <-- WRONG - should be two records
> As you can see although both records exist I'm not able the fetch all of them 
> using in clause. By now I have to cycle my requests which are about 30 and I 
> find it highly inefficient given that I query physically the same row. 
> Ideally I'd like the following select to work:
> SELECT hid, r FROM rating WHERE id  = 755349113 and mid in ? and hid in ?;
> Which doesn't work either.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Created] (CASSANDRA-6220) Unable to select multiple entries using In clause on clustering part of compound key

2013-10-20 Thread Ashot Golovenko (JIRA)
Ashot Golovenko created CASSANDRA-6220:
--

 Summary: Unable to select multiple entries using In clause on 
clustering part of compound key
 Key: CASSANDRA-6220
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6220
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Ashot Golovenko


I have the following table:

CREATE TABLE rating (
id bigint,
mid int,
hid int,
r double,
PRIMARY KEY ((id, mid), hid));

And I get really really strange result sets on the following queries:

cqlsh:bm> SELECT hid, r FROM rating WHERE id  = 755349113 and mid = 201310 and 
hid = 201329320;

 hid   | r
---+
 201329320 | 45.476

(1 rows)

cqlsh:bm> SELECT hid, r FROM rating WHERE id  = 755349113 and mid = 201310 and 
hid = 201329220;

 hid   | r
---+---
 201329220 | 53.62

(1 rows)

cqlsh:bm> SELECT hid, r FROM rating WHERE id  = 755349113 and mid = 201310 and 
hid in (201329320, 201329220);

 hid   | r
---+
 201329320 | 45.476  <-- WRONG - only one result

As you can see although both records exist I'm not able the fetch all of them 
using in clause. By now I have to cycle my requests which are about 30 and I 
find it highly inefficient given that I query physically the same row. 

Ideally I'd like the following select to work:
SELECT hid, r FROM rating WHERE id  = 755349113 and mid in ? and hid in ?;
Which doesn't work either.





--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Created] (CASSANDRA-6173) Unable to delete multiple entries using In clause on clustering part of compound key

2013-10-09 Thread Ashot Golovenko (JIRA)
Ashot Golovenko created CASSANDRA-6173:
--

 Summary: Unable to delete multiple entries using In clause on 
clustering part of compound key
 Key: CASSANDRA-6173
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6173
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Ashot Golovenko


I have the following table:

CREATE TABLE user_relation (
u1 bigint,
u2 bigint,
mf int,
i boolean,
PRIMARY KEY (u1, u2));

And I'm trying to delete two entries using In clause on clustering part of 
compound key and I fail to do so:

cqlsh:bm> DELETE from user_relation WHERE u1 = 755349113 and u2 in 
(13404014120, 12537242743);
Bad Request: Invalid operator IN for PRIMARY KEY part u2

Although the select statement works just fine:

cqlsh:bm> select * from user_relation WHERE u1 = 755349113 and u2 in 
(13404014120, 12537242743);

 u1| u2  | i| mf
---+-+--+
 755349113 | 12537242743 | null | 27
 755349113 | 13404014120 | null |  0

(2 rows)



--
This message was sent by Atlassian JIRA
(v6.1#6144)