[jira] [Commented] (CASSANDRA-6893) Unintended update with conditional statement

2014-04-02 Thread Sylvain Lebresne (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6893?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13957499#comment-13957499
 ] 

Sylvain Lebresne commented on CASSANDRA-6893:
-

Fair enough, the test should be handling timeouts. But outside of that, I was 
wrong when I said that this was a test to reproduce that issue since that issue 
only happen with prepared statements and the dtest wasn't using them. So 
anyway, I pushed a fix of the paxos dtest so that it does uses a prepared 
statement and properly handles timeouts. The test doesn't pass on cassandra-2.0 
(there is no {{errors}] but the value is incorrect), but does pass with the 
patch.

 Unintended update with conditional statement
 

 Key: CASSANDRA-6893
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6893
 Project: Cassandra
  Issue Type: Bug
 Environment: Ubuntu Precise 64bit / Cassandra 2.0.6
Reporter: Suguru Namura
Assignee: Sylvain Lebresne
 Fix For: 2.0.7

 Attachments: 6893.txt, ConcurrentCASUpdate.java


 After updated to 2.0.6, I have encountered the strange behavior of 
 conditional updates.
 When I executed CQL like UPDATE test SET value = ? WHERE id = ? IF value = ? 
 in concurrent, sometimes cassandra returns true even if value is not 
 satisfied the condition.
 I have attached the program which reproduce this issue. The program works 
 fine in cassandra 2.0.5. But it seems that resets values while execution in 
 2.0.6.



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


[jira] [Commented] (CASSANDRA-6893) Unintended update with conditional statement

2014-04-02 Thread Aleksey Yeschenko (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6893?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13957883#comment-13957883
 ] 

Aleksey Yeschenko commented on CASSANDRA-6893:
--

All right, after switching castorture to use prepared statements was able to 
repro immediately with default params (w/ 30% of acknowledged writes lost). The 
attached patch fixes the issue. Reviewing now.

 Unintended update with conditional statement
 

 Key: CASSANDRA-6893
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6893
 Project: Cassandra
  Issue Type: Bug
 Environment: Ubuntu Precise 64bit / Cassandra 2.0.6
Reporter: Suguru Namura
Assignee: Sylvain Lebresne
 Fix For: 2.0.7

 Attachments: 6893.txt, ConcurrentCASUpdate.java


 After updated to 2.0.6, I have encountered the strange behavior of 
 conditional updates.
 When I executed CQL like UPDATE test SET value = ? WHERE id = ? IF value = ? 
 in concurrent, sometimes cassandra returns true even if value is not 
 satisfied the condition.
 I have attached the program which reproduce this issue. The program works 
 fine in cassandra 2.0.5. But it seems that resets values while execution in 
 2.0.6.



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


[jira] [Commented] (CASSANDRA-6893) Unintended update with conditional statement

2014-04-02 Thread Aleksey Yeschenko (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6893?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13957923#comment-13957923
 ] 

Aleksey Yeschenko commented on CASSANDRA-6893:
--

{code}
private boolean listAppliesTo(CFMetaData cfm, IteratorColumn iter, 
ListByteBuffer elements)
{
for (ByteBuffer e : elements)
if (!iter.hasNext() || iter.next().value().equals(e))
return false;
{code}

should be !iter.next().value().equals(e), I think. Other than that LGTM.

 Unintended update with conditional statement
 

 Key: CASSANDRA-6893
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6893
 Project: Cassandra
  Issue Type: Bug
 Environment: Ubuntu Precise 64bit / Cassandra 2.0.6
Reporter: Suguru Namura
Assignee: Sylvain Lebresne
 Fix For: 2.0.7

 Attachments: 6893.txt, ConcurrentCASUpdate.java


 After updated to 2.0.6, I have encountered the strange behavior of 
 conditional updates.
 When I executed CQL like UPDATE test SET value = ? WHERE id = ? IF value = ? 
 in concurrent, sometimes cassandra returns true even if value is not 
 satisfied the condition.
 I have attached the program which reproduce this issue. The program works 
 fine in cassandra 2.0.5. But it seems that resets values while execution in 
 2.0.6.



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


[jira] [Commented] (CASSANDRA-6893) Unintended update with conditional statement

2014-04-01 Thread Aleksey Yeschenko (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6893?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13957298#comment-13957298
 ] 

Aleksey Yeschenko commented on CASSANDRA-6893:
--

Not able to reproduce on my macbook, neither using modified dtest not 
https://github.com/iamaleksey/castorture, with or without the patch, so far. 
Able to fail the test, but it's too conservative in its assert - 

{code}
assert (value == N * I) and (errors == 0) and (gaveup == 0)
{code}

is unrealistic with high enough contention.

 Unintended update with conditional statement
 

 Key: CASSANDRA-6893
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6893
 Project: Cassandra
  Issue Type: Bug
 Environment: Ubuntu Precise 64bit / Cassandra 2.0.6
Reporter: Suguru Namura
Assignee: Sylvain Lebresne
 Fix For: 2.0.7

 Attachments: 6893.txt, ConcurrentCASUpdate.java


 After updated to 2.0.6, I have encountered the strange behavior of 
 conditional updates.
 When I executed CQL like UPDATE test SET value = ? WHERE id = ? IF value = ? 
 in concurrent, sometimes cassandra returns true even if value is not 
 satisfied the condition.
 I have attached the program which reproduce this issue. The program works 
 fine in cassandra 2.0.5. But it seems that resets values while execution in 
 2.0.6.



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


[jira] [Commented] (CASSANDRA-6893) Unintended update with conditional statement

2014-04-01 Thread Aleksey Yeschenko (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6893?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13957303#comment-13957303
 ] 

Aleksey Yeschenko commented on CASSANDRA-6893:
--

Not saying there isn't a bug - haven't looked at the patch yet - but you 
shouldn't expect a nice clean 1-1000 update under heavy contention, really.

 Unintended update with conditional statement
 

 Key: CASSANDRA-6893
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6893
 Project: Cassandra
  Issue Type: Bug
 Environment: Ubuntu Precise 64bit / Cassandra 2.0.6
Reporter: Suguru Namura
Assignee: Sylvain Lebresne
 Fix For: 2.0.7

 Attachments: 6893.txt, ConcurrentCASUpdate.java


 After updated to 2.0.6, I have encountered the strange behavior of 
 conditional updates.
 When I executed CQL like UPDATE test SET value = ? WHERE id = ? IF value = ? 
 in concurrent, sometimes cassandra returns true even if value is not 
 satisfied the condition.
 I have attached the program which reproduce this issue. The program works 
 fine in cassandra 2.0.5. But it seems that resets values while execution in 
 2.0.6.



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


[jira] [Commented] (CASSANDRA-6893) Unintended update with conditional statement

2014-03-26 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6893?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13947937#comment-13947937
 ] 

Jonathan Ellis commented on CASSANDRA-6893:
---

[~thobbs] to review

 Unintended update with conditional statement
 

 Key: CASSANDRA-6893
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6893
 Project: Cassandra
  Issue Type: Bug
 Environment: Ubuntu Precise 64bit / Cassandra 2.0.6
Reporter: Suguru Namura
Assignee: Sylvain Lebresne
 Fix For: 2.0.7

 Attachments: 6893.txt, ConcurrentCASUpdate.java


 After updated to 2.0.6, I have encountered the strange behavior of 
 conditional updates.
 When I executed CQL like UPDATE test SET value = ? WHERE id = ? IF value = ? 
 in concurrent, sometimes cassandra returns true even if value is not 
 satisfied the condition.
 I have attached the program which reproduce this issue. The program works 
 fine in cassandra 2.0.5. But it seems that resets values while execution in 
 2.0.6.



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


[jira] [Commented] (CASSANDRA-6893) Unintended update with conditional statement

2014-03-25 Thread Michael Shuler (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6893?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13946598#comment-13946598
 ] 

Michael Shuler commented on CASSANDRA-6893:
---

Applied the patch to cassandra-2.0 HEAD and the test case now gives me a clean 
1-1000 series.  +1

 Unintended update with conditional statement
 

 Key: CASSANDRA-6893
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6893
 Project: Cassandra
  Issue Type: Bug
 Environment: Ubuntu Precise 64bit / Cassandra 2.0.6
Reporter: Suguru Namura
Assignee: Sylvain Lebresne
 Fix For: 2.0.7

 Attachments: 6893.txt, ConcurrentCASUpdate.java


 After updated to 2.0.6, I have encountered the strange behavior of 
 conditional updates.
 When I executed CQL like UPDATE test SET value = ? WHERE id = ? IF value = ? 
 in concurrent, sometimes cassandra returns true even if value is not 
 satisfied the condition.
 I have attached the program which reproduce this issue. The program works 
 fine in cassandra 2.0.5. But it seems that resets values while execution in 
 2.0.6.



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


[jira] [Commented] (CASSANDRA-6893) Unintended update with conditional statement

2014-03-25 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6893?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13946642#comment-13946642
 ] 

Jonathan Ellis commented on CASSANDRA-6893:
---

Can we add a unit and/or dtest?

 Unintended update with conditional statement
 

 Key: CASSANDRA-6893
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6893
 Project: Cassandra
  Issue Type: Bug
 Environment: Ubuntu Precise 64bit / Cassandra 2.0.6
Reporter: Suguru Namura
Assignee: Sylvain Lebresne
 Fix For: 2.0.7

 Attachments: 6893.txt, ConcurrentCASUpdate.java


 After updated to 2.0.6, I have encountered the strange behavior of 
 conditional updates.
 When I executed CQL like UPDATE test SET value = ? WHERE id = ? IF value = ? 
 in concurrent, sometimes cassandra returns true even if value is not 
 satisfied the condition.
 I have attached the program which reproduce this issue. The program works 
 fine in cassandra 2.0.5. But it seems that resets values while execution in 
 2.0.6.



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


[jira] [Commented] (CASSANDRA-6893) Unintended update with conditional statement

2014-03-25 Thread Sylvain Lebresne (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6893?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13946747#comment-13946747
 ] 

Sylvain Lebresne commented on CASSANDRA-6893:
-

Actually, we kind of have a dtest already: 
[paxos_test|https://github.com/riptano/cassandra-dtest/blob/master/paxos_tests.py].
 It's doing something very similar to the java example above. However, it's 
running on a relatively modest number of threads so that it isn't reproducing 
this bug on my box with the currently hardcoded setting. But if I change said 
setting to match the ones of the test above, i.e. 1000 threads with 1 iteration 
each, then it does reproduce.

So anyway, I modified said test so it runs with both the old parameters, and 
the new ones, the ones that reproduce this issue (let me note that I did run 
into CASSANDRA-6923 while reproducing, but that's a red herring). So anyway, we 
do have a dtest now.

 Unintended update with conditional statement
 

 Key: CASSANDRA-6893
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6893
 Project: Cassandra
  Issue Type: Bug
 Environment: Ubuntu Precise 64bit / Cassandra 2.0.6
Reporter: Suguru Namura
Assignee: Sylvain Lebresne
 Fix For: 2.0.7

 Attachments: 6893.txt, ConcurrentCASUpdate.java


 After updated to 2.0.6, I have encountered the strange behavior of 
 conditional updates.
 When I executed CQL like UPDATE test SET value = ? WHERE id = ? IF value = ? 
 in concurrent, sometimes cassandra returns true even if value is not 
 satisfied the condition.
 I have attached the program which reproduce this issue. The program works 
 fine in cassandra 2.0.5. But it seems that resets values while execution in 
 2.0.6.



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


[jira] [Commented] (CASSANDRA-6893) Unintended update with conditional statement

2014-03-24 Thread Michael Shuler (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6893?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13945818#comment-13945818
 ] 

Michael Shuler commented on CASSANDRA-6893:
---

If I understand the test case correctly, I should get (as I do in 2.0.5) a nice 
clean 1-1000 update series of:
{noformat}
creating keyspace
creating table
insert default value
APPLIED 1
APPLIED 2
APPLIED 3
  snip 4-997
APPLIED 998
APPLIED 999
APPLIED 1000
FINAL VALUE IS 1000
{noformat}

In 2.0.6, I get random series of 1-X, ending in a random FINAL VALUE.  Using 
the 2.0.6 and 2.0.5 git tags, this bisects to:

{noformat}
b09d876914ad9c9fdf1af35cf48cdb98c27bbf32 is the first bad commit
commit b09d876914ad9c9fdf1af35cf48cdb98c27bbf32
Author: Sylvain Lebresne sylv...@datastax.com
Date:   Thu Jan 9 18:44:21 2014 +0100

Add static columns in CQL3

patch by slebresne; reviewed by iamaleksey for CASSANDRA-6561

:100644 100644 4fffb9acefb1fbb9172b5ed99bbeaa0d537b967b 
bbacc4d83babaf4880ab9f175509dc5fb88d6461 M  CHANGES.txt
:04 04 7ac6d76f9b69884c07342eed468327a2da1403ad 
aa93d5ffb85ce62b3cbe8d6d3e987cd9f147a26e M  doc
:04 04 7d15a4bf52f49b432b297a4e22554e40cabb6035 
3fcc45ef24616cf2026b84059409a249d65cb9fd M  src
{noformat}

 Unintended update with conditional statement
 

 Key: CASSANDRA-6893
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6893
 Project: Cassandra
  Issue Type: Bug
 Environment: Ubuntu Precise 64bit / Cassandra 2.0.6
Reporter: Suguru Namura
Assignee: Michael Shuler
 Fix For: 2.0.7

 Attachments: ConcurrentCASUpdate.java


 After updated to 2.0.6, I have encountered the strange behavior of 
 conditional updates.
 When I executed CQL like UPDATE test SET value = ? WHERE id = ? IF value = ? 
 in concurrent, sometimes cassandra returns true even if value is not 
 satisfied the condition.
 I have attached the program which reproduce this issue. The program works 
 fine in cassandra 2.0.5. But it seems that resets values while execution in 
 2.0.6.



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