[jira] [Commented] (CASSANDRA-12784) ReplicationAwareTokenAllocatorTest times out almost every time for 3.X and trunk

2016-10-13 Thread Stefania (JIRA)

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

Stefania commented on CASSANDRA-12784:
--

These are the new timings on my laptop with 64 vnodes for Murmur3 and 16 vnodes 
for Random:

{code}

...




...




{code}

Unfortunately Jenkins is much slower. I multiplexed the test 10 times 
[here|https://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-testall-multiplex/25/testReport/org.apache.cassandra.dht.tokenallocator/]
 and each iteration took approximately 5.5 minutes. There were no failures, so 
I could not reproduce the problem mentioned above.

Because {{testNewClusterWithMurmur3Partitioner}} takes 2.5 minutes on Jenkins, 
a flaky test will timeout if it performs more than 2 additional runs, so I 
changed the iterations to 2 for Murmur3 and 3 for Random. I've also split the 
class into two sub-classes, so that the total limit of 10 minutes is doubled. 
Otherwise, if both tests are flaky in the same run, it will certainly timeout, 
and even if only {{testNewClusterWithMurmur3Partitioner}} is flaky, the total 
time is very close to the 10 minutes limit.

This is the full patch:

||3.X||trunk||
|[patch|https://github.com/stef1927/cassandra/commits/12784-3.X]|[patch|https://github.com/stef1927/cassandra/commits/12784]|
|[testall|http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-12784-3.X-testall/]|[testall|http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-12784-testall/]|

I'm also multiplexing 50 times the random partitioner tests 
[here|https://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-testall-multiplex/26/],
 to see if we can reproduce any failures despite the flaky utility.

[~blambov], [~dikanggu]: who wants to be the reviewer?

> ReplicationAwareTokenAllocatorTest times out almost every time for 3.X and 
> trunk
> 
>
> Key: CASSANDRA-12784
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12784
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Stefania
>Assignee: Stefania
> Fix For: 3.x
>
> Attachments: ReplicationAwareTokenAllocatorTest.jfr.gz
>
>
> Example failure: 
> http://cassci.datastax.com/view/cassandra-3.X/job/cassandra-3.X_testall/lastCompletedBuild/testReport/org.apache.cassandra.dht.tokenallocator/ReplicationAwareTokenAllocatorTest/testNewClusterWithMurmur3Partitioner/



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


[jira] [Updated] (CASSANDRA-12784) ReplicationAwareTokenAllocatorTest times out almost every time for 3.X and trunk

2016-10-13 Thread Stefania (JIRA)

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

Stefania updated CASSANDRA-12784:
-
Status: Patch Available  (was: Awaiting Feedback)

> ReplicationAwareTokenAllocatorTest times out almost every time for 3.X and 
> trunk
> 
>
> Key: CASSANDRA-12784
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12784
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Stefania
>Assignee: Stefania
> Fix For: 3.x
>
> Attachments: ReplicationAwareTokenAllocatorTest.jfr.gz
>
>
> Example failure: 
> http://cassci.datastax.com/view/cassandra-3.X/job/cassandra-3.X_testall/lastCompletedBuild/testReport/org.apache.cassandra.dht.tokenallocator/ReplicationAwareTokenAllocatorTest/testNewClusterWithMurmur3Partitioner/



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


[jira] [Commented] (CASSANDRA-12784) ReplicationAwareTokenAllocatorTest times out almost every time for 3.X and trunk

2016-10-13 Thread Stefania (JIRA)

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

Stefania commented on CASSANDRA-12784:
--

Sure, will do!

> ReplicationAwareTokenAllocatorTest times out almost every time for 3.X and 
> trunk
> 
>
> Key: CASSANDRA-12784
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12784
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Stefania
>Assignee: Stefania
> Fix For: 3.x
>
> Attachments: ReplicationAwareTokenAllocatorTest.jfr.gz
>
>
> Example failure: 
> http://cassci.datastax.com/view/cassandra-3.X/job/cassandra-3.X_testall/lastCompletedBuild/testReport/org.apache.cassandra.dht.tokenallocator/ReplicationAwareTokenAllocatorTest/testNewClusterWithMurmur3Partitioner/



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


[jira] [Commented] (CASSANDRA-12786) Fix a bug in CASSANDRA-11005(Split consisten range movement flag)

2016-10-13 Thread Jeff Jirsa (JIRA)

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

Jeff Jirsa commented on CASSANDRA-12786:


Patch merged cleanly from 2.2 -> trunk, assuming those are the branches you're 
targeting [~kohlisankalp] ? 

Looks pretty straight forward, but pushed to my github to kick off CI:

| [trunk|https://github.com/jeffjirsa/cassandra/tree/cassandra-12786] | 
[utest|http://cassci.datastax.com/job/jeffjirsa-cassandra-12786-testall/] | 
[dtest|http://cassci.datastax.com/job/jeffjirsa-cassandra-12786-dtest/] |
| [3.X|https://github.com/jeffjirsa/cassandra/tree/cassandra-12786-3.X] | 
[utest|http://cassci.datastax.com/job/jeffjirsa-cassandra-12786-3.X-testall/] | 
[dtest|http://cassci.datastax.com/job/jeffjirsa-cassandra-12786-3.X-dtest/] |
| [3.0|https://github.com/jeffjirsa/cassandra/tree/cassandra-12786-3.0] | 
[utest|http://cassci.datastax.com/job/jeffjirsa-cassandra-12786-3.0-testall/] | 
[dtest|http://cassci.datastax.com/job/jeffjirsa-cassandra-12786-3.0-dtest/] |
| [2.2|https://github.com/jeffjirsa/cassandra/tree/cassandra-12786-2.2] | 
[utest|http://cassci.datastax.com/job/jeffjirsa-cassandra-12786-2.2-testall/] | 
[dtest|http://cassci.datastax.com/job/jeffjirsa-cassandra-12786-2.2-dtest/] |


> Fix a bug in CASSANDRA-11005(Split consisten range movement flag)
> -
>
> Key: CASSANDRA-12786
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12786
> Project: Cassandra
>  Issue Type: Bug
>Reporter: sankalp kohli
>Assignee: sankalp kohli
>Priority: Minor
> Attachments: CASSANDRA-12786.txt
>
>
> I missed a place in the code where we need to split this flag for bootstrap



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


[jira] [Updated] (CASSANDRA-12788) AbstractReplicationStrategy is not extendable from outside the package

2016-10-13 Thread Kurt Greaves (JIRA)

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

Kurt Greaves updated CASSANDRA-12788:
-
Reproduced In: 3.0.9, 2.2.8, 2.1.16, 2.0.17, 3.x  (was: 2.0.17, 2.1.16, 
2.2.8, 3.0.9, 3.x)
   Status: Awaiting Feedback  (was: Open)

> AbstractReplicationStrategy is not extendable from outside the package
> --
>
> Key: CASSANDRA-12788
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12788
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Kurt Greaves
> Attachments: 12788.patch
>
>
> The constructor for ARS is package-private (no modifier), which means that 
> custom RS implementations cannot call it. That is, calling super(...) fails 
> unless you create your replication strategy inside 
> org.apache.cassandra.locator. This obviously isn't ideal.
> I propose adding protected to the constructor in ARS. The attached patch was 
> against trunk however I believe it should work for 2.1, 2.2, 3.0, and 3.x.



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


[jira] [Updated] (CASSANDRA-12788) AbstractReplicationStrategy is not extendable from outside the package

2016-10-13 Thread Kurt Greaves (JIRA)

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

Kurt Greaves updated CASSANDRA-12788:
-
Reproduced In: 3.0.9, 2.2.8, 2.1.16, 2.0.17, 3.x
Since Version: 2.0 beta 1

> AbstractReplicationStrategy is not extendable from outside the package
> --
>
> Key: CASSANDRA-12788
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12788
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Kurt Greaves
> Attachments: 12788.patch
>
>
> The constructor for ARS is package-private (no modifier), which means that 
> custom RS implementations cannot call it. That is, calling super(...) fails 
> unless you create your replication strategy inside 
> org.apache.cassandra.locator. This obviously isn't ideal.
> I propose adding protected to the constructor in ARS. The attached patch was 
> against trunk however I believe it should work for 2.1, 2.2, 3.0, and 3.x.



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


[jira] [Updated] (CASSANDRA-12788) AbstractReplicationStrategy is not extendable from outside the package

2016-10-13 Thread Kurt Greaves (JIRA)

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

Kurt Greaves updated CASSANDRA-12788:
-
Attachment: 12788.patch

> AbstractReplicationStrategy is not extendable from outside the package
> --
>
> Key: CASSANDRA-12788
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12788
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Kurt Greaves
> Attachments: 12788.patch
>
>
> The constructor for ARS is package-private (no modifier), which means that 
> custom RS implementations cannot call it. That is, calling super(...) fails 
> unless you create your replication strategy inside 
> org.apache.cassandra.locator. This obviously isn't ideal.
> I propose adding protected to the constructor in ARS. The attached patch was 
> against trunk however I believe it should work for 2.1, 2.2, 3.0, and 3.x.



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


[jira] [Created] (CASSANDRA-12788) AbstractReplicationStrategy is not extendable from outside the package

2016-10-13 Thread Kurt Greaves (JIRA)
Kurt Greaves created CASSANDRA-12788:


 Summary: AbstractReplicationStrategy is not extendable from 
outside the package
 Key: CASSANDRA-12788
 URL: https://issues.apache.org/jira/browse/CASSANDRA-12788
 Project: Cassandra
  Issue Type: Bug
Reporter: Kurt Greaves


The constructor for ARS is package-private (no modifier), which means that 
custom RS implementations cannot call it. That is, calling super(...) fails 
unless you create your replication strategy inside 
org.apache.cassandra.locator. This obviously isn't ideal.

I propose adding protected to the constructor in ARS. The attached patch was 
against trunk however I believe it should work for 2.1, 2.2, 3.0, and 3.x.



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


[jira] [Commented] (CASSANDRA-12490) Add sequence distribution type to cassandra stress

2016-10-13 Thread Ben Slater (JIRA)

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

Ben Slater commented on CASSANDRA-12490:


I realised [~tjake] was saying the a validation error is the expected behaviour 
and occurs in 3.9 but not trunk. 

I just tried but can't get a validation error in 3.9 with a YAML file (as I 
said, I wasn't aware that validation functionality existed for YAML specs). Can 
you provide some more details on how to reproduce?

> Add sequence distribution type to cassandra stress
> --
>
> Key: CASSANDRA-12490
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12490
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Tools
>Reporter: Ben Slater
>Assignee: Ben Slater
>Priority: Minor
> Fix For: 3.10
>
> Attachments: 12490-trunk.patch, 12490.yaml, cqlstress-seq-example.yaml
>
>
> When using the write command, cassandra stress sequentially generates seeds. 
> This ensures generated values don't overlap (unless the sequence wraps) 
> providing more predictable number of inserted records (and generating a base 
> set of data without wasted writes).
> When using a yaml stress spec there is no sequenced distribution available. 
> It think it would be useful to have this for doing initial load of data for 
> testing 



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


[jira] [Commented] (CASSANDRA-12490) Add sequence distribution type to cassandra stress

2016-10-13 Thread Ben Slater (JIRA)

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

Ben Slater commented on CASSANDRA-12490:


Moving back from dev list where I think the discussion ended up by accident. 

Jake said:
No I'm not using a seq anywhere else then the command line

I said:
OK, I think it’s pretty unlikely to be this change as I didn’t change the 
existing code (certainly nothing near what is used by -pop) and also I just 
noticed you said you had the issue in 3.9 and CASS-12490 is destined for 3.10. 

Also, last time I looked, I thought stress didn’t validate returned results for 
YAML specs. Did I miss something or did that get added recently? Can you add 
your actual command, etc to the ticket?

Anyway, I will try to do some more digging over the weekend as I still suspect 
there is something wrong (or at least unexpected) going on aside from this 
change.

> Add sequence distribution type to cassandra stress
> --
>
> Key: CASSANDRA-12490
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12490
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Tools
>Reporter: Ben Slater
>Assignee: Ben Slater
>Priority: Minor
> Fix For: 3.10
>
> Attachments: 12490-trunk.patch, 12490.yaml, cqlstress-seq-example.yaml
>
>
> When using the write command, cassandra stress sequentially generates seeds. 
> This ensures generated values don't overlap (unless the sequence wraps) 
> providing more predictable number of inserted records (and generating a base 
> set of data without wasted writes).
> When using a yaml stress spec there is no sequenced distribution available. 
> It think it would be useful to have this for doing initial load of data for 
> testing 



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


[jira] [Updated] (CASSANDRA-12786) Fix a bug in CASSANDRA-11005(Split consisten range movement flag)

2016-10-13 Thread sankalp kohli (JIRA)

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

sankalp kohli updated CASSANDRA-12786:
--
Status: Patch Available  (was: Open)

> Fix a bug in CASSANDRA-11005(Split consisten range movement flag)
> -
>
> Key: CASSANDRA-12786
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12786
> Project: Cassandra
>  Issue Type: Bug
>Reporter: sankalp kohli
>Assignee: sankalp kohli
>Priority: Minor
> Attachments: CASSANDRA-12786.txt
>
>
> I missed a place in the code where we need to split this flag for bootstrap



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


[jira] [Created] (CASSANDRA-12787) Reduce instanceOf() type checking to improve performance

2016-10-13 Thread shylaja kokoori (JIRA)
shylaja kokoori created CASSANDRA-12787:
---

 Summary: Reduce instanceOf() type checking to improve performance
 Key: CASSANDRA-12787
 URL: https://issues.apache.org/jira/browse/CASSANDRA-12787
 Project: Cassandra
  Issue Type: Improvement
 Environment: The tests and examples stated were run on:
Intel (R) Xeon (R) CPU E5-2699 v3 @ 2.30GHz, HT Enabled
Oracle JDK 1.8
Cassandra 3.10-SNAPSHOT
Linux kernel 4.7

Reporter: shylaja kokoori
 Fix For: 3.x
 Attachments: reduce_instanceof_typechecking.pdf

While performance profiling Cassandra with cassandra-stress test on a  pure 
write workload, we noticed that one of the hot methods for Cassandra server is 
the compareTo( PartitionPosition pos) function in 
org.apache.cassandra.db.DecoratedKey. The actual root cause of the problem is a 
slowdown in Java's instanceof operator.

Our initial performance testing using a hacked JVM shows about 61% increase in 
throughput and about 15% reduction in 99 percentile latency. Data shows that 
improvements are from the removal of thread contention caused by Instanceof 
operator.

Currently, we are working on a JDK fix to solve this issue. In the meantime, we 
think it will be beneficial to address this issue at Java application level as 
well. We are in the process of creating a patch to Cassandra replacing 
instanceof check with virtual method calls. The patch will be available in this 
thread for review soon. Please let us know your feedback and comments.

For more details please refer to the attached pdf.



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


[jira] [Comment Edited] (CASSANDRA-12777) Optimize the vnode allocation for single replica per DC

2016-10-13 Thread Dikang Gu (JIRA)

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

Dikang Gu edited comment on CASSANDRA-12777 at 10/13/16 9:51 PM:
-

It's not perfect yet, but I'd like to send it out to let people take a look 
first: 
https://github.com/DikangGu/cassandra/commit/3711f9c00f47aba768ceba70fd9bd54f1d64

Currently it supports Murmur3Partitioner and RandomPartitioner. [~blambov] do 
you mind to take a look?

I will continue to clean it up.
Thanks!


was (Author: dikanggu):
It's not perfect yet, but I'd like to send it out to let people take a look 
first: 
https://github.com/DikangGu/cassandra/commit/404e7238dfe6c5147e9681093572aad4e6aa779d

Currently it supports Murmur3Partitioner and RandomPartitioner. [~blambov] do 
you mind to take a look?

I will continue to clean it up.
Thanks!

> Optimize the vnode allocation for single replica per DC
> ---
>
> Key: CASSANDRA-12777
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12777
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Dikang Gu
>Assignee: Dikang Gu
> Fix For: 3.x
>
>
> The new vnode allocation algorithm introduced in CASSANDRA-7032 is optimized 
> for the situation that there are multiple replicas per DC.
> In our production environment, most cluster only has one replica, in this 
> case, the algorithm does not work perfectly. It always tries to split token 
> ranges by half, so that the ownership of "min" node could go as low as ~60% 
> compared to avg.
> So for single replica case, I'm working on a new algorithm, which is based on 
> Branimir's previous commit, to split token ranges by "some" percentage, 
> instead of always by half. In this way, we can get a very small variation of 
> the ownership among different nodes.



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


[jira] [Updated] (CASSANDRA-12786) Fix a bug in CASSANDRA-11005(Split consisten range movement flag)

2016-10-13 Thread sankalp kohli (JIRA)

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

sankalp kohli updated CASSANDRA-12786:
--
Attachment: CASSANDRA-12786.txt

> Fix a bug in CASSANDRA-11005(Split consisten range movement flag)
> -
>
> Key: CASSANDRA-12786
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12786
> Project: Cassandra
>  Issue Type: Bug
>Reporter: sankalp kohli
>Assignee: sankalp kohli
>Priority: Minor
> Attachments: CASSANDRA-12786.txt
>
>
> I missed a place in the code where we need to split this flag for bootstrap



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


[jira] [Updated] (CASSANDRA-12786) Fix a bug in CASSANDRA-11005(Split consisten range movement flag)

2016-10-13 Thread sankalp kohli (JIRA)

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

sankalp kohli updated CASSANDRA-12786:
--
Description: I missed a place in the code where we need to split this flag 
for bootstrap  (was: I missed a place in the code where we need to split this 
flag. Also cleaning up the consistent range movement flag. )

> Fix a bug in CASSANDRA-11005(Split consisten range movement flag)
> -
>
> Key: CASSANDRA-12786
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12786
> Project: Cassandra
>  Issue Type: Bug
>Reporter: sankalp kohli
>Assignee: sankalp kohli
>Priority: Minor
>
> I missed a place in the code where we need to split this flag for bootstrap



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


[jira] [Created] (CASSANDRA-12786) Fix a bug in CASSANDRA-11005(Split consisten range movement flag)

2016-10-13 Thread sankalp kohli (JIRA)
sankalp kohli created CASSANDRA-12786:
-

 Summary: Fix a bug in CASSANDRA-11005(Split consisten range 
movement flag)
 Key: CASSANDRA-12786
 URL: https://issues.apache.org/jira/browse/CASSANDRA-12786
 Project: Cassandra
  Issue Type: Bug
Reporter: sankalp kohli
Priority: Minor


I missed a place in the code where we need to split this flag. Also cleaning up 
the consistent range movement flag. 



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


[jira] [Assigned] (CASSANDRA-12786) Fix a bug in CASSANDRA-11005(Split consisten range movement flag)

2016-10-13 Thread sankalp kohli (JIRA)

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

sankalp kohli reassigned CASSANDRA-12786:
-

Assignee: sankalp kohli

> Fix a bug in CASSANDRA-11005(Split consisten range movement flag)
> -
>
> Key: CASSANDRA-12786
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12786
> Project: Cassandra
>  Issue Type: Bug
>Reporter: sankalp kohli
>Assignee: sankalp kohli
>Priority: Minor
>
> I missed a place in the code where we need to split this flag. Also cleaning 
> up the consistent range movement flag. 



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


[jira] [Commented] (CASSANDRA-12490) Add sequence distribution type to cassandra stress

2016-10-13 Thread Ben Slater (JIRA)

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

Ben Slater commented on CASSANDRA-12490:


Just to check [~tjake] when you say "this also breaks validation", I assume you 
mean it breaks validation when you use the sequence distribution type, not in 
the case where you don't use seq()?

> Add sequence distribution type to cassandra stress
> --
>
> Key: CASSANDRA-12490
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12490
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Tools
>Reporter: Ben Slater
>Assignee: Ben Slater
>Priority: Minor
> Fix For: 3.10
>
> Attachments: 12490-trunk.patch, 12490.yaml, cqlstress-seq-example.yaml
>
>
> When using the write command, cassandra stress sequentially generates seeds. 
> This ensures generated values don't overlap (unless the sequence wraps) 
> providing more predictable number of inserted records (and generating a base 
> set of data without wasted writes).
> When using a yaml stress spec there is no sequenced distribution available. 
> It think it would be useful to have this for doing initial load of data for 
> testing 



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


[jira] [Commented] (CASSANDRA-12490) Add sequence distribution type to cassandra stress

2016-10-13 Thread Ben Slater (JIRA)

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

Ben Slater commented on CASSANDRA-12490:


Yeah, that would be my misunderstanding and misimplementation of setSeed(). The 
fix appears to be trivial (discussed somewhere in the wall of text above). I'll 
test a bit more and submit a patch in the next day or two.

> Add sequence distribution type to cassandra stress
> --
>
> Key: CASSANDRA-12490
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12490
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Tools
>Reporter: Ben Slater
>Assignee: Ben Slater
>Priority: Minor
> Fix For: 3.10
>
> Attachments: 12490-trunk.patch, 12490.yaml, cqlstress-seq-example.yaml
>
>
> When using the write command, cassandra stress sequentially generates seeds. 
> This ensures generated values don't overlap (unless the sequence wraps) 
> providing more predictable number of inserted records (and generating a base 
> set of data without wasted writes).
> When using a yaml stress spec there is no sequenced distribution available. 
> It think it would be useful to have this for doing initial load of data for 
> testing 



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


[jira] [Comment Edited] (CASSANDRA-11887) Duplicate rows after a 2.2.5 to 3.0.4 migration

2016-10-13 Thread Tim Kieschnick (JIRA)

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

Tim Kieschnick edited comment on CASSANDRA-11887 at 10/13/16 8:01 PM:
--

This issue is still occurring.  

We migrated in place directly from 2.2.5 to 3.0.9 and did an upgradesstables on 
each of the 6 storage nodes.  We have the same duplicate row problem.  This has 
occurred in multiple tables during our migration and each of those tables used 
a map collection type.  The original issue was specifically related to UDTs but 
we specifically see it with map types.  

The simplest scenario is below.

{noformat}
cqlsh:*> consistency all;
Consistency level set to ALL.
cqlsh:*> desc table *.customers;
CREATE TABLE *.customers (
customer_id uuid PRIMARY KEY,

order_by decimal,
udf_values map
) WITH ... 
AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
AND compaction = {'class': 
'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'}
AND compression = {'enabled': 'false'}
AND gc_grace_seconds = 2592000
...;
cqlsh:*> select customer_id, order_by, last_modified, udf_values from 
customers where customer_id=4f7c602e-9022-431f-a949-f4382988c862;   
 

 customer_id  | order_by | last_modified| 
udf_values
--+--+--+---
 4f7c602e-9022-431f-a949-f4382988c862 | null | 2016-10-13 12:51:36+ | 
{'STR_LATEST_RECORD_DATE': '2016-10-08T07:00:00.000Z', 'STR_LOAD_DATE': 
'2016-10-12T20:21:30.186Z', 'TCLK_LOAD_DATE': '2016-10-13T12:51:34.944Z'}
 4f7c602e-9022-431f-a949-f4382988c862 | null | null | 
{'STR_LATEST_RECORD_DATE': '2016-09-24T07:00:00.000Z', 'STR_LOAD_DATE': 
'2016-09-28T20:25:16.900Z', 'TCLK_LOAD_DATE': '2016-10-03T12:51:56.407Z'}

(2 rows)
cqlsh:abvprp> update customers set order_by=1, last_modified=toTimestamp(now()) 
where customer_id=4f7c602e-9022-431f-a949-f4382988c862; 
   
cqlsh:abvprp> select customer_id, order_by, last_modified, udf_values from 
customers where customer_id=4f7c602e-9022-431f-a949-f4382988c862;

 customer_id  | order_by | last_modified| 
udf_values
--+--+--+---
 4f7c602e-9022-431f-a949-f4382988c862 |1 | 2016-10-13 17:20:32+ | 
{'STR_LATEST_RECORD_DATE': '2016-10-08T07:00:00.000Z', 'STR_LOAD_DATE': 
'2016-10-12T20:21:30.186Z', 'TCLK_LOAD_DATE': '2016-10-13T12:51:34.944Z'}
 4f7c602e-9022-431f-a949-f4382988c862 | null | null | 
{'STR_LATEST_RECORD_DATE': '2016-09-24T07:00:00.000Z', 'STR_LOAD_DATE': 
'2016-09-28T20:25:16.900Z', 'TCLK_LOAD_DATE': '2016-10-03T12:51:56.407Z'}

(2 rows)
{noformat}

We also have a table with UDTs and did not detect any duplicate rows.

Can you please reopen this issue and investigate the issues with maps creating 
duplicate rows with the same primary key?  

Thank you.


was (Author: timkieschnick):
This issue is still occurring.  

We migrated in place directly from 2.2.5 to 3.0.9 and did an upgradesstables on 
each of the 6 storage nodes.  We have the same duplicate row problem.  This has 
occurred in multiple tables during our migration and each of those tables used 
a map collection type.  The original issue was specifically related to UDTs but 
we specifically see it with map types.  

The simplest scenario is below.

{noformat}
cqlsh:*> consistency all;
Consistency level set to ALL.
cqlsh:*> desc table *.customers;
CREATE TABLE *.customers (
customer_id uuid PRIMARY KEY,

order_by decimal,
udf_values map
) WITH ... 
AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
AND compaction = {'class': 
'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'}
AND compression = {'enabled': 'false'}
AND gc_grace_seconds = 2592000
...;
cqlsh:*> select customer_id, order_by, last_modified, udf_values from 
customers where customer_id=4f7c602e-9022-431f-a949-f4382988c862;   
 

 customer_id  | order_by | last_modified| 
udf_values
--+--+--+---
 4f7c602e-9022-431f-a949-f4382988c862 | null | 

[jira] [Commented] (CASSANDRA-12784) ReplicationAwareTokenAllocatorTest times out almost every time for 3.X and trunk

2016-10-13 Thread Dikang Gu (JIRA)

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

Dikang Gu commented on CASSANDRA-12784:
---

Thanks [~Stefania] and [~blambov], let me know if there are anything I can help.

> ReplicationAwareTokenAllocatorTest times out almost every time for 3.X and 
> trunk
> 
>
> Key: CASSANDRA-12784
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12784
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Stefania
>Assignee: Stefania
> Fix For: 3.x
>
> Attachments: ReplicationAwareTokenAllocatorTest.jfr.gz
>
>
> Example failure: 
> http://cassci.datastax.com/view/cassandra-3.X/job/cassandra-3.X_testall/lastCompletedBuild/testReport/org.apache.cassandra.dht.tokenallocator/ReplicationAwareTokenAllocatorTest/testNewClusterWithMurmur3Partitioner/



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


[jira] [Commented] (CASSANDRA-12490) Add sequence distribution type to cassandra stress

2016-10-13 Thread T Jake Luciani (JIRA)

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

T Jake Luciani commented on CASSANDRA-12490:


I'm pretty sure this also breaks read validation somehow.

If you write with a yaml profile and -pop seq=1..1000 then read with -pop 
seq=1..1m it will return without error. In 3.9 this errors as it should.


> Add sequence distribution type to cassandra stress
> --
>
> Key: CASSANDRA-12490
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12490
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Tools
>Reporter: Ben Slater
>Assignee: Ben Slater
>Priority: Minor
> Fix For: 3.10
>
> Attachments: 12490-trunk.patch, 12490.yaml, cqlstress-seq-example.yaml
>
>
> When using the write command, cassandra stress sequentially generates seeds. 
> This ensures generated values don't overlap (unless the sequence wraps) 
> providing more predictable number of inserted records (and generating a base 
> set of data without wasted writes).
> When using a yaml stress spec there is no sequenced distribution available. 
> It think it would be useful to have this for doing initial load of data for 
> testing 



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


[jira] [Reopened] (CASSANDRA-12490) Add sequence distribution type to cassandra stress

2016-10-13 Thread T Jake Luciani (JIRA)

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

T Jake Luciani reopened CASSANDRA-12490:


> Add sequence distribution type to cassandra stress
> --
>
> Key: CASSANDRA-12490
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12490
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Tools
>Reporter: Ben Slater
>Assignee: Ben Slater
>Priority: Minor
> Fix For: 3.10
>
> Attachments: 12490-trunk.patch, 12490.yaml, cqlstress-seq-example.yaml
>
>
> When using the write command, cassandra stress sequentially generates seeds. 
> This ensures generated values don't overlap (unless the sequence wraps) 
> providing more predictable number of inserted records (and generating a base 
> set of data without wasted writes).
> When using a yaml stress spec there is no sequenced distribution available. 
> It think it would be useful to have this for doing initial load of data for 
> testing 



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


[jira] [Updated] (CASSANDRA-12777) Optimize the vnode allocation for single replica per DC

2016-10-13 Thread Dikang Gu (JIRA)

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

Dikang Gu updated CASSANDRA-12777:
--
Status: Patch Available  (was: Open)

It's not perfect yet, but I'd like to send it out to let people take a look 
first: 
https://github.com/DikangGu/cassandra/commit/404e7238dfe6c5147e9681093572aad4e6aa779d

Currently it supports Murmur3Partitioner and RandomPartitioner. [~blambov] do 
you mind to take a look?

I will continue to clean it up.
Thanks!

> Optimize the vnode allocation for single replica per DC
> ---
>
> Key: CASSANDRA-12777
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12777
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Dikang Gu
>Assignee: Dikang Gu
> Fix For: 3.x
>
>
> The new vnode allocation algorithm introduced in CASSANDRA-7032 is optimized 
> for the situation that there are multiple replicas per DC.
> In our production environment, most cluster only has one replica, in this 
> case, the algorithm does not work perfectly. It always tries to split token 
> ranges by half, so that the ownership of "min" node could go as low as ~60% 
> compared to avg.
> So for single replica case, I'm working on a new algorithm, which is based on 
> Branimir's previous commit, to split token ranges by "some" percentage, 
> instead of always by half. In this way, we can get a very small variation of 
> the ownership among different nodes.



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


[jira] [Commented] (CASSANDRA-11887) Duplicate rows after a 2.2.5 to 3.0.4 migration

2016-10-13 Thread Alex Petrov (JIRA)

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

Alex Petrov commented on CASSANDRA-11887:
-

You can send them over to oleksandr.pet...@gmail.com to avoid posting files. An 
sstable data file (and schema) would be extremely helpful.
If you still have non-upgraded data somewhere (possibly from the backup), that 
could help to understand why upgrade path fails. 

> Duplicate rows after a 2.2.5 to 3.0.4 migration
> ---
>
> Key: CASSANDRA-11887
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11887
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Julien Anguenot
>Priority: Blocker
>
> After migrating from 2.2.5 to 3.0.4, some tables seem to carry duplicate 
> primary keys.
> Below an example. Note, repair / scrub of such table do not seem to fix nor 
> indicate any issues.
> *Table definition*:
> {code}
> CREATE TABLE core.edge_ipsec_vpn_service (
> edge_uuid text PRIMARY KEY,
> enabled boolean,
> endpoints set,
> tunnels set
> ) WITH 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';
> {code}
> *UDTs:*
> {code}
> CREATE TYPE core.edge_ipsec_vpn_endpoint (
> network text,
> public_ip text
> );
> CREATE TYPE core.edge_ipsec_vpn_tunnel (
> name text,
> description text,
> peer_ip_address text,
> peer_id text,
> local_ip_address text,
> local_id text,
> local_subnets frozen>,
> peer_subnets frozen>,
> shared_secret text,
> shared_secret_encrypted boolean,
> encryption_protocol text,
> mtu int,
> enabled boolean,
> operational boolean,
> error_details text,
> vpn_peer frozen
> );
> CREATE TYPE core.edge_ipsec_vpn_subnet (
> name text,
> gateway text,
> netmask text
> );
> CREATE TYPE core.edge_ipsec_vpn_peer (
> type text,
> id text,
> name text,
> vcd_url text,
> vcd_org text,
> vcd_username text
> );
> {code}
> sstabledump extract (IP addressees hidden as well as  secrets)
> {code}
> [...]
>  {
> "partition" : {
>   "key" : [ "84d567cc-0165-4e64-ab97-3a9d06370ba9" ],
>   "position" : 131146
> },
> "rows" : [
>   {
> "type" : "row",
> "position" : 131236,
> "liveness_info" : { "tstamp" : "2016-05-06T17:07:15.416003Z" },
> "cells" : [
>   { "name" : "enabled", "value" : "true" },
>   { "name" : "tunnels", "path" : [ 
> “XXX::1.2.3.4:1.2.3.4:1.2.3.4:1.2.3.4:XXX:XXX:false:AES256:1500:true:false::third
>  party\\:1.2.3.4\\:\\:\\:\\:” ], "value" : "" }
> ]
>   },
>   {
> "type" : "row",
> "position" : 131597,
> "cells" : [
>   { "name" : "endpoints", "path" : [ “XXX” ], "value" : "", "tstamp" 
> : "2016-03-29T08:05:38.297015Z" },
>   { "name" : "tunnels", "path" : [ 
> “XXX::1.2.3.4:1.2.3.4:1.2.3.4:1.2.3.4:XXX:XXX:false:AES256:1500:true:true::third
>  party\\:1.2.3.4\\:\\:\\:\\:” ], "value" : "", "tstamp" : 
> "2016-03-29T08:05:38.297015Z" },
>   { "name" : "tunnels", "path" : [ 
> “XXX::1.2.3.4:1.2.3.4:1.2.3.4:1.2.3.4:XXX:XXX:false:AES256:1500:true:false::third
>  party\\:1.2.3.4\\:\\:\\:\\:" ], "value" : "", "tstamp" : 
> "2016-03-14T18:05:07.262001Z" },
>   { "name" : "tunnels", "path" : [ 
> “XXX::1.2.3.4:1.2.3.4:1.2.3.4:1.2.3.4XXX:XXX:false:AES256:1500:true:true::third
>  party\\:1.2.3.4\\:\\:\\:\\:" ], "value" : "", "tstamp" : 
> "2016-03-29T08:05:38.297015Z" }
> ]
>   },
>   {
> "type" : "row",
> "position" : 133644,
> "cells" : [
>   { "name" : "tunnels", "path" : [ 
> “XXX::1.2.3.4:1.2.3.4:1.2.3.4:1.2.3.4:XXX:XXX:false:AES256:1500:true:true::third
>  party\\:1.2.3.4\\:\\:\\:\\:" ], "value" : "", "tstamp" : 
> "2016-03-29T07:05:27.213013Z" },
>   { "name" : "tunnels", "path" : [ 
> “XXX::1.2.3.4.7:1.2.3.4:1.2.3.4:1.2.3.4:XXX:XXX:false:AES256:1500:true:true::third
>  party\\:1.2.3.4\\:\\:\\:\\:" ], "value" : "", "tstamp" : 
> "2016-03-29T07:05:27.213013Z" }
> ]
>   }
> ]
>   },
> [...]
> [...]
> 

[jira] [Commented] (CASSANDRA-11803) Creating a materialized view on a table with "token" column breaks the cluster

2016-10-13 Thread Carl Yeksigian (JIRA)

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

Carl Yeksigian commented on CASSANDRA-11803:


I just pushed a couple of updates to address your nits, and rebased and pushed 
up two new branches for 3.x and trunk:

||3.x|[branch|https://github.com/carlyeks/cassandra/tree/ticket/11803/3.x]|[utest|http://cassci.datastax.com/view/Dev/view/carlyeks/job/carlyeks-ticket-11803-3.x-testall/]|[dtest|http://cassci.datastax.com/view/Dev/view/carlyeks/job/carlyeks-ticket-11803-3.x-dtest/]|
||trunk|[branch|https://github.com/carlyeks/cassandra/tree/ticket/11803/trunk]|[utest|http://cassci.datastax.com/view/Dev/view/carlyeks/job/carlyeks-ticket-11803-trunk-testall/]|[dtest|http://cassci.datastax.com/view/Dev/view/carlyeks/job/carlyeks-ticket-11803-trunk-dtest/]|

> Creating a materialized view on a table with "token" column breaks the cluster
> --
>
> Key: CASSANDRA-11803
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11803
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
> Environment: Kernel:
> Linux 4.4.8-20.46.amzn1.x86_64
> Java:
> Java OpenJDK Runtime Environment (build 1.8.0_91-b14)
> OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)
> Cassandra: 
> datastax-ddc-3.3.0-1.noarch
> datastax-ddc-tools-3.3.0-1.noarch
>Reporter: Victor Trac
>Assignee: Carl Yeksigian
> Fix For: 3.0.x
>
>
> On a new Cassandra cluster, if we create a table with a field called "token" 
> (with quotes) and then create a materialized view that uses "token", the 
> cluster breaks. A ServerError is returned, and no further nodetool operations 
> on the sstables work. Restarting the Cassandra server will also fail. It 
> seems like the entire cluster is hosed.
> We tried this on Cassandra 3.3 and 3.5. 
> Here's how to produce (on an new, empty cassandra 3.5 docker container):
> {code}
> [cqlsh 5.0.1 | Cassandra 3.5 | CQL spec 3.4.0 | Native protocol v4]
> Use HELP for help.
> cqlsh> CREATE KEYSPACE account WITH REPLICATION = { 'class' : 
> 'SimpleStrategy', 'replication_factor' : 1 };
> cqlsh> CREATE TABLE account.session  (
>...   "token" blob,
>...   account_id uuid,
>...   PRIMARY KEY("token")
>... )WITH compaction={'class': 'LeveledCompactionStrategy'} AND
>...   compression={'sstable_compression': 'LZ4Compressor'};
> cqlsh> CREATE MATERIALIZED VIEW account.account_session AS
>...SELECT account_id,"token" FROM account.session
>...WHERE "token" IS NOT NULL and account_id IS NOT NULL
>...PRIMARY KEY (account_id, "token");
> ServerError:  message="java.lang.RuntimeException: java.util.concurrent.ExecutionException: 
> org.apache.cassandra.exceptions.SyntaxException: line 1:25 no viable 
> alternative at input 'FROM' (SELECT account_id, token [FROM]...)">
> cqlsh> drop table account.session;
> ServerError:  message="java.lang.RuntimeException: java.util.concurrent.ExecutionException: 
> org.apache.cassandra.exceptions.SyntaxException: line 1:25 no viable 
> alternative at input 'FROM' (SELECT account_id, token [FROM]...)">
> {code}
> When any sstable*, nodetool, or when the Cassandra process is restarted, this 
> is emitted on startup and Cassandra exits (copied from a server w/ data):
> {code}
> INFO  [main] 2016-05-12 23:25:30,074 ColumnFamilyStore.java:395 - 
> Initializing system_schema.indexes
> DEBUG [SSTableBatchOpen:1] 2016-05-12 23:25:30,075 SSTableReader.java:480 - 
> Opening 
> /mnt/cassandra/data/system_schema/indexes-0feb57ac311f382fba6d9024d305702f/ma-4-big
>  (91 bytes)
> ERROR [main] 2016-05-12 23:25:30,143 CassandraDaemon.java:697 - Exception 
> encountered during startup
> org.apache.cassandra.exceptions.SyntaxException: line 1:59 no viable 
> alternative at input 'FROM' (..., expire_at, last_used, token [FROM]...)
> at 
> org.apache.cassandra.cql3.ErrorCollector.throwFirstSyntaxError(ErrorCollector.java:101)
>  ~[apache-cassandra-3.5.0.jar:3.5.0]
> at 
> org.apache.cassandra.cql3.CQLFragmentParser.parseAnyUnhandled(CQLFragmentParser.java:80)
>  ~[apache-cassandra-3.5.0.jar:3.5.0]
> at 
> org.apache.cassandra.cql3.QueryProcessor.parseStatement(QueryProcessor.java:512)
>  ~[apache-cassandra-3.5.0.jar:3.5.0]
> at 
> org.apache.cassandra.schema.SchemaKeyspace.fetchView(SchemaKeyspace.java:1128)
>  ~[apache-cassandra-3.5.0.jar:3.5.0]
> at 
> org.apache.cassandra.schema.SchemaKeyspace.fetchViews(SchemaKeyspace.java:1092)
>  ~[apache-cassandra-3.5.0.jar:3.5.0]
> at 
> org.apache.cassandra.schema.SchemaKeyspace.fetchKeyspace(SchemaKeyspace.java:903)
>  ~[apache-cassandra-3.5.0.jar:3.5.0]
> at 
> 

[jira] [Commented] (CASSANDRA-11887) Duplicate rows after a 2.2.5 to 3.0.4 migration

2016-10-13 Thread Tim Kieschnick (JIRA)

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

Tim Kieschnick commented on CASSANDRA-11887:


This issue is still occurring.  

We migrated in place directly from 2.2.5 to 3.0.9 and did an upgradesstables on 
each of the 6 storage nodes.  We have the same duplicate row problem.  This has 
occurred in multiple tables during our migration and each of those tables used 
a map collection type.  The original issue was specifically related to UDTs but 
we specifically see it with map types.  

The simplest scenario is below.

{noformat}
cqlsh:*> consistency all;
Consistency level set to ALL.
cqlsh:*> desc table *.customers;
CREATE TABLE *.customers (
customer_id uuid PRIMARY KEY,

order_by decimal,
udf_values map
) WITH ... 
AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
AND compaction = {'class': 
'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'}
AND compression = {'enabled': 'false'}
AND gc_grace_seconds = 2592000
...;
cqlsh:*> select customer_id, order_by, last_modified, udf_values from 
customers where customer_id=4f7c602e-9022-431f-a949-f4382988c862;   
 

 customer_id  | order_by | last_modified| 
udf_values
--+--+--+---
 4f7c602e-9022-431f-a949-f4382988c862 | null | 2016-10-13 12:51:36+ | 
{'STR_LATEST_RECORD_DATE': '2016-10-08T07:00:00.000Z', 'STR_LOAD_DATE': 
'2016-10-12T20:21:30.186Z', 'TCLK_LOAD_DATE': '2016-10-13T12:51:34.944Z'}
 4f7c602e-9022-431f-a949-f4382988c862 | null | null | 
{'STR_LATEST_RECORD_DATE': '2016-09-24T07:00:00.000Z', 'STR_LOAD_DATE': 
'2016-09-28T20:25:16.900Z', 'TCLK_LOAD_DATE': '2016-10-03T12:51:56.407Z'}

(2 rows)
cqlsh:abvprp> update customers set order_by=1, last_modified=toTimestamp(now()) 
where customer_id=4f7c602e-9022-431f-a949-f4382988c862; 
   
cqlsh:abvprp> select customer_id, order_by, last_modified, udf_values from 
customers where customer_id=4f7c602e-9022-431f-a949-f4382988c862;

 customer_id  | order_by | last_modified| 
udf_values
--+--+--+---
 4f7c602e-9022-431f-a949-f4382988c862 |1 | 2016-10-13 17:20:32+ | 
{'STR_LATEST_RECORD_DATE': '2016-10-08T07:00:00.000Z', 'STR_LOAD_DATE': 
'2016-10-12T20:21:30.186Z', 'TCLK_LOAD_DATE': '2016-10-13T12:51:34.944Z'}
 4f7c602e-9022-431f-a949-f4382988c862 | null | null | 
{'STR_LATEST_RECORD_DATE': '2016-09-24T07:00:00.000Z', 'STR_LOAD_DATE': 
'2016-09-28T20:25:16.900Z', 'TCLK_LOAD_DATE': '2016-10-03T12:51:56.407Z'}

(2 rows)
{noformat}

I can provide SSTable dumps and full schema in efforts to reproduce. We also 
have a table with UDTs and did not detect any duplicate rows.

Can you please reopen this issue and investigate the issues with maps creating 
duplicate rows with the same primary key?  

Thank you.

> Duplicate rows after a 2.2.5 to 3.0.4 migration
> ---
>
> Key: CASSANDRA-11887
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11887
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Julien Anguenot
>Priority: Blocker
>
> After migrating from 2.2.5 to 3.0.4, some tables seem to carry duplicate 
> primary keys.
> Below an example. Note, repair / scrub of such table do not seem to fix nor 
> indicate any issues.
> *Table definition*:
> {code}
> CREATE TABLE core.edge_ipsec_vpn_service (
> edge_uuid text PRIMARY KEY,
> enabled boolean,
> endpoints set,
> tunnels set
> ) WITH 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';
> {code}
> 

[jira] [Commented] (CASSANDRA-12773) cassandra-stress error for one way SSL

2016-10-13 Thread Jane Deng (JIRA)

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

Jane Deng commented on CASSANDRA-12773:
---

Thanks Stefan. The problem is people could not use default password "cassandra" 
in production. We received the report of the error.

Actually I think there could be some improvement from SSLFactory.java:
{code}
public static SSLContext createSSLContext(EncryptionOptions options, boolean 
buildTruststore) throws IOException
{code}

The truststore holds the public key and will be passed by the client anyway. 
However, the keystore holds the private key which may or may not be passed by 
the client (depending on require_client_auth = true/false). In current 
implementation, we load the keystore for every client request, but decide to 
load the truststore or not based on the parameter "buildTruststore". It may be 
better to change the context of "buildTruststore" to "buildKeystore". But this 
change will affect all of the current clients and it could be another jira. 



 

> cassandra-stress error for one way SSL 
> ---
>
> Key: CASSANDRA-12773
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12773
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
>Reporter: Jane Deng
> Attachments: 12773-2.2.patch
>
>
> CASSANDRA-9325 added keystore/truststore configuration into cassandra-stress. 
> However, for one way ssl (require_client_auth=false), there is no need to 
> pass keystore info into ssloptions. Cassadra-stress errored out:
> {noformat}
> java.lang.RuntimeException: java.io.IOException: Error creating the 
> initializing the SSL Context 
> at 
> org.apache.cassandra.stress.settings.StressSettings.getJavaDriverClient(StressSettings.java:200)
>  
> at 
> org.apache.cassandra.stress.settings.SettingsSchema.createKeySpacesNative(SettingsSchema.java:79)
>  
> at 
> org.apache.cassandra.stress.settings.SettingsSchema.createKeySpaces(SettingsSchema.java:69)
>  
> at 
> org.apache.cassandra.stress.settings.StressSettings.maybeCreateKeyspaces(StressSettings.java:207)
>  
> at org.apache.cassandra.stress.StressAction.run(StressAction.java:55) 
> at org.apache.cassandra.stress.Stress.main(Stress.java:117) 
> Caused by: java.io.IOException: Error creating the initializing the SSL 
> Context 
> at 
> org.apache.cassandra.security.SSLFactory.createSSLContext(SSLFactory.java:151)
>  
> at 
> org.apache.cassandra.stress.util.JavaDriverClient.connect(JavaDriverClient.java:128)
>  
> at 
> org.apache.cassandra.stress.settings.StressSettings.getJavaDriverClient(StressSettings.java:191)
>  
> ... 5 more 
> Caused by: java.io.IOException: Keystore was tampered with, or password was 
> incorrect 
> at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:772) 
> at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:55) 
> at java.security.KeyStore.load(KeyStore.java:1445) 
> at 
> org.apache.cassandra.security.SSLFactory.createSSLContext(SSLFactory.java:129)
>  
> ... 7 more 
> Caused by: java.security.UnrecoverableKeyException: Password verification 
> failed 
> at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:770) 
> ... 10 more
> {noformat}
> It's a bug from CASSANDRA-9325. When the keystore is absent, the keystore is 
> assigned to the path of the truststore, but the password isn't taken care.



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


[jira] [Commented] (CASSANDRA-5988) Make hint TTL customizable

2016-10-13 Thread sankalp kohli (JIRA)

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

sankalp kohli commented on CASSANDRA-5988:
--

Thanks [~iamaleksey]. 

> Make hint TTL customizable
> --
>
> Key: CASSANDRA-5988
> URL: https://issues.apache.org/jira/browse/CASSANDRA-5988
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Oleg Kibirev
>Assignee: Vishy Kasar
>  Labels: patch
> Fix For: 1.2.12, 2.0.3
>
> Attachments: 5988.txt
>
>
> Currently time to live for stored hints is hardcoded to be gc_grace_seconds. 
> This causes problems for applications using backdated deletes as a form of 
> optimistic locking. Hints for updates made to the same data on which delete 
> was attempted can persist for days, making it impossible to determine if 
> delete succeeded by doing read(ALL) after a reasonable delay. We need a way 
> to explicitly configure hint TTL, either through schema parameter or through 
> a yaml file.



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


[jira] [Updated] (CASSANDRA-12720) Permissions on aggregate functions are not removed on drop

2016-10-13 Thread Sam Tunnicliffe (JIRA)

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

Sam Tunnicliffe updated CASSANDRA-12720:

   Resolution: Fixed
Fix Version/s: (was: 3.0.x)
   (was: 2.2.x)
   (was: 3.x)
   3.10
   3.0.10
   2.2.9
   Status: Resolved  (was: Ready to Commit)

Thanks, committed to 2.2 in {{4eed687d3b3c33b1b52a7c000ba10ba1c7f7222e}} and 
merged to 3.0/3.X/trunk

> Permissions on aggregate functions are not removed on drop
> --
>
> Key: CASSANDRA-12720
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12720
> Project: Cassandra
>  Issue Type: Bug
>  Components: Distributed Metadata
>Reporter: Sam Tunnicliffe
>Assignee: Sam Tunnicliffe
> Fix For: 2.2.9, 3.0.10, 3.10
>
>
> When a user defined aggregate is dropped, either directly or when it's 
> enclosing keyspace is dropped, permissions granted on it are not cleaned up.



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


[03/10] cassandra git commit: Clean up permissions when a UDA is dropped

2016-10-13 Thread samt
Clean up permissions when a UDA is dropped

Patch by Sam Tunnicliffe; reviewed by Joel Knighton for CASSANDRA-12720


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/4eed687d
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4eed687d
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4eed687d

Branch: refs/heads/cassandra-3.X
Commit: 4eed687d3b3c33b1b52a7c000ba10ba1c7f7222e
Parents: 7232d72
Author: Sam Tunnicliffe 
Authored: Wed Sep 28 16:17:25 2016 +0100
Committer: Sam Tunnicliffe 
Committed: Thu Oct 13 17:46:14 2016 +0100

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/auth/AuthMigrationListener.java | 6 ++
 2 files changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/4eed687d/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 682f12b..41e3f94 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.9
+ * Clean up permissions when a UDA is dropped (CASSANDRA-12720)
  * Limit colUpdateTimeDelta histogram updates to reasonable deltas 
(CASSANDRA-7)
  * Fix leak errors and execution rejected exceptions when draining 
(CASSANDRA-12457)
  * Fix merkle tree depth calculation (CASSANDRA-12580)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4eed687d/src/java/org/apache/cassandra/auth/AuthMigrationListener.java
--
diff --git a/src/java/org/apache/cassandra/auth/AuthMigrationListener.java 
b/src/java/org/apache/cassandra/auth/AuthMigrationListener.java
index fe34329..64fe7c6 100644
--- a/src/java/org/apache/cassandra/auth/AuthMigrationListener.java
+++ b/src/java/org/apache/cassandra/auth/AuthMigrationListener.java
@@ -44,4 +44,10 @@ public class AuthMigrationListener extends MigrationListener
 DatabaseDescriptor.getAuthorizer()
   .revokeAllOn(FunctionResource.function(ksName, 
functionName, argTypes));
 }
+
+public void onDropAggregate(String ksName, String aggregateName, 
List argTypes)
+{
+DatabaseDescriptor.getAuthorizer()
+  .revokeAllOn(FunctionResource.function(ksName, 
aggregateName, argTypes));
+}
 }



[08/10] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.X

2016-10-13 Thread samt
Merge branch 'cassandra-3.0' into cassandra-3.X


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/771a1a2f
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/771a1a2f
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/771a1a2f

Branch: refs/heads/cassandra-3.X
Commit: 771a1a2fa20ca1be614eaf41ec27ceae83ab5f9c
Parents: 7234c79 a889852
Author: Sam Tunnicliffe 
Authored: Thu Oct 13 17:49:14 2016 +0100
Committer: Sam Tunnicliffe 
Committed: Thu Oct 13 17:49:14 2016 +0100

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/auth/AuthMigrationListener.java | 6 ++
 2 files changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/771a1a2f/CHANGES.txt
--
diff --cc CHANGES.txt
index 682656d,f291674..bc5dcd1
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -110,62 -47,12 +110,63 @@@ Merged from 3.0
   * Disk failure policy should not be invoked on out of space (CASSANDRA-12385)
   * Calculate last compacted key on startup (CASSANDRA-6216)
   * Add schema to snapshot manifest, add USING TIMESTAMP clause to ALTER TABLE 
statements (CASSANDRA-7190)
 + * If CF has no clustering columns, any row cache is full partition cache 
(CASSANDRA-12499)
 +Merged from 2.2:
++ * Clean up permissions when a UDA is dropped (CASSANDRA-12720)
 + * Limit colUpdateTimeDelta histogram updates to reasonable deltas 
(CASSANDRA-7)
 + * Fix leak errors and execution rejected exceptions when draining 
(CASSANDRA-12457)
 + * Fix merkle tree depth calculation (CASSANDRA-12580)
 + * Make Collections deserialization more robust (CASSANDRA-12618)
 + * Better handle invalid system roles table (CASSANDRA-12700)
 + * Fix exceptions when enabling gossip on nodes that haven't joined the ring 
(CASSANDRA-12253)
 + * Fix authentication problem when invoking cqlsh copy from a SOURCE command 
(CASSANDRA-12642)
 + * Decrement pending range calculator jobs counter in finally block
 + * cqlshlib tests: increase default execute timeout (CASSANDRA-12481)
 + * Forward writes to replacement node when replace_address != 
broadcast_address (CASSANDRA-8523)
 + * Fail repair on non-existing table (CASSANDRA-12279)
 + * Enable repair -pr and -local together (fix regression of CASSANDRA-7450) 
(CASSANDRA-12522)
 +
 +
 +3.8, 3.9
 + * Fix value skipping with counter columns (CASSANDRA-11726)
 + * Fix nodetool tablestats miss SSTable count (CASSANDRA-12205)
 + * Fixed flacky SSTablesIteratedTest (CASSANDRA-12282)
 + * Fixed flacky SSTableRewriterTest: check file counts before calling 
validateCFS (CASSANDRA-12348)
 + * cqlsh: Fix handling of $$-escaped strings (CASSANDRA-12189)
 + * Fix SSL JMX requiring truststore containing server cert (CASSANDRA-12109)
 + * RTE from new CDC column breaks in flight queries (CASSANDRA-12236)
 + * Fix hdr logging for single operation workloads (CASSANDRA-12145)
 + * Fix SASI PREFIX search in CONTAINS mode with partial terms 
(CASSANDRA-12073)
 + * Increase size of flushExecutor thread pool (CASSANDRA-12071)
 + * Partial revert of CASSANDRA-11971, cannot recycle buffer in 
SP.sendMessagesToNonlocalDC (CASSANDRA-11950)
 + * Upgrade netty to 4.0.39 (CASSANDRA-12032, CASSANDRA-12034)
 + * Improve details in compaction log message (CASSANDRA-12080)
 + * Allow unset values in CQLSSTableWriter (CASSANDRA-11911)
 + * Chunk cache to request compressor-compatible buffers if pool space is 
exhausted (CASSANDRA-11993)
 + * Remove DatabaseDescriptor dependencies from SequentialWriter 
(CASSANDRA-11579)
 + * Move skip_stop_words filter before stemming (CASSANDRA-12078)
 + * Support seek() in EncryptedFileSegmentInputStream (CASSANDRA-11957)
 + * SSTable tools mishandling LocalPartitioner (CASSANDRA-12002)
 + * When SEPWorker assigned work, set thread name to match pool 
(CASSANDRA-11966)
 + * Add cross-DC latency metrics (CASSANDRA-11596)
 + * Allow terms in selection clause (CASSANDRA-10783)
 + * Add bind variables to trace (CASSANDRA-11719)
 + * Switch counter shards' clock to timestamps (CASSANDRA-9811)
 + * Introduce HdrHistogram and response/service/wait separation to stress tool 
(CASSANDRA-11853)
 + * entry-weighers in QueryProcessor should respect partitionKeyBindIndexes 
field (CASSANDRA-11718)
 + * Support older ant versions (CASSANDRA-11807)
 + * Estimate compressed on disk size when deciding if sstable size limit 
reached (CASSANDRA-11623)
 + * cassandra-stress profiles should support case sensitive schemas 
(CASSANDRA-11546)
 + * Remove DatabaseDescriptor dependency from FileUtils (CASSANDRA-11578)
 + * Faster streaming (CASSANDRA-9766)
 + * Add prepared query parameter to trace for "Execute CQL3 prepared query" 
session (CASSANDRA-11425)

[06/10] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0

2016-10-13 Thread samt
Merge branch 'cassandra-2.2' into cassandra-3.0


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a8898527
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a8898527
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a8898527

Branch: refs/heads/cassandra-3.0
Commit: a889852706866e4c2fd04d4d2397ff088973f5e8
Parents: 6c64074 4eed687
Author: Sam Tunnicliffe 
Authored: Thu Oct 13 17:48:33 2016 +0100
Committer: Sam Tunnicliffe 
Committed: Thu Oct 13 17:48:33 2016 +0100

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/auth/AuthMigrationListener.java | 6 ++
 2 files changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a8898527/CHANGES.txt
--
diff --cc CHANGES.txt
index a962994,41e3f94..f291674
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,22 -1,5 +1,23 @@@
 -2.2.9
 +3.0.10
 + * nodetool stopdaemon errors out (CASSANDRA-12646)
 + * Split materialized view mutations on build to prevent OOM (CASSANDRA-12268)
 + * mx4j does not work in 3.0.8 (CASSANDRA-12274)
 + * Abort cqlsh copy-from in case of no answer after prolonged period of time 
(CASSANDRA-12740)
 + * Avoid sstable corrupt exception due to dropped static column 
(CASSANDRA-12582)
 + * Make stress use client mode to avoid checking commit log size on startup 
(CASSANDRA-12478)
 + * Fix exceptions with new vnode allocation (CASSANDRA-12715)
 + * Unify drain and shutdown processes (CASSANDRA-12509)
 + * Fix NPE in ComponentOfSlice.isEQ() (CASSANDRA-12706)
 + * Fix failure in LogTransactionTest (CASSANDRA-12632)
 + * Fix potentially incomplete non-frozen UDT values when querying with the
 +   full primary key specified (CASSANDRA-12605)
 + * Skip writing MV mutations to commitlog on mutation.applyUnsafe() 
(CASSANDRA-11670)
 + * Establish consistent distinction between non-existing partition and NULL 
value for LWTs on static columns (CASSANDRA-12060)
 + * Extend ColumnIdentifier.internedInstances key to include the type that 
generated the byte buffer (CASSANDRA-12516)
 + * Backport CASSANDRA-10756 (race condition in NativeTransportService 
shutdown) (CASSANDRA-12472)
 + * If CF has no clustering columns, any row cache is full partition cache 
(CASSANDRA-12499)
 +Merged from 2.2:
+  * Clean up permissions when a UDA is dropped (CASSANDRA-12720)
   * Limit colUpdateTimeDelta histogram updates to reasonable deltas 
(CASSANDRA-7)
   * Fix leak errors and execution rejected exceptions when draining 
(CASSANDRA-12457)
   * Fix merkle tree depth calculation (CASSANDRA-12580)



[02/10] cassandra git commit: Clean up permissions when a UDA is dropped

2016-10-13 Thread samt
Clean up permissions when a UDA is dropped

Patch by Sam Tunnicliffe; reviewed by Joel Knighton for CASSANDRA-12720


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/4eed687d
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4eed687d
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4eed687d

Branch: refs/heads/cassandra-3.0
Commit: 4eed687d3b3c33b1b52a7c000ba10ba1c7f7222e
Parents: 7232d72
Author: Sam Tunnicliffe 
Authored: Wed Sep 28 16:17:25 2016 +0100
Committer: Sam Tunnicliffe 
Committed: Thu Oct 13 17:46:14 2016 +0100

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/auth/AuthMigrationListener.java | 6 ++
 2 files changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/4eed687d/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 682f12b..41e3f94 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.9
+ * Clean up permissions when a UDA is dropped (CASSANDRA-12720)
  * Limit colUpdateTimeDelta histogram updates to reasonable deltas 
(CASSANDRA-7)
  * Fix leak errors and execution rejected exceptions when draining 
(CASSANDRA-12457)
  * Fix merkle tree depth calculation (CASSANDRA-12580)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4eed687d/src/java/org/apache/cassandra/auth/AuthMigrationListener.java
--
diff --git a/src/java/org/apache/cassandra/auth/AuthMigrationListener.java 
b/src/java/org/apache/cassandra/auth/AuthMigrationListener.java
index fe34329..64fe7c6 100644
--- a/src/java/org/apache/cassandra/auth/AuthMigrationListener.java
+++ b/src/java/org/apache/cassandra/auth/AuthMigrationListener.java
@@ -44,4 +44,10 @@ public class AuthMigrationListener extends MigrationListener
 DatabaseDescriptor.getAuthorizer()
   .revokeAllOn(FunctionResource.function(ksName, 
functionName, argTypes));
 }
+
+public void onDropAggregate(String ksName, String aggregateName, 
List argTypes)
+{
+DatabaseDescriptor.getAuthorizer()
+  .revokeAllOn(FunctionResource.function(ksName, 
aggregateName, argTypes));
+}
 }



[10/10] cassandra git commit: Merge branch 'cassandra-3.X' into trunk

2016-10-13 Thread samt
Merge branch 'cassandra-3.X' into trunk


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/56bc77c4
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/56bc77c4
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/56bc77c4

Branch: refs/heads/trunk
Commit: 56bc77c4e9f3ed395d393d4923b15c8e9d663d84
Parents: 58d2b5f 771a1a2
Author: Sam Tunnicliffe 
Authored: Thu Oct 13 17:49:29 2016 +0100
Committer: Sam Tunnicliffe 
Committed: Thu Oct 13 17:49:29 2016 +0100

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/auth/AuthMigrationListener.java | 6 ++
 2 files changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/56bc77c4/CHANGES.txt
--



[07/10] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0

2016-10-13 Thread samt
Merge branch 'cassandra-2.2' into cassandra-3.0


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a8898527
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a8898527
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a8898527

Branch: refs/heads/trunk
Commit: a889852706866e4c2fd04d4d2397ff088973f5e8
Parents: 6c64074 4eed687
Author: Sam Tunnicliffe 
Authored: Thu Oct 13 17:48:33 2016 +0100
Committer: Sam Tunnicliffe 
Committed: Thu Oct 13 17:48:33 2016 +0100

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/auth/AuthMigrationListener.java | 6 ++
 2 files changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a8898527/CHANGES.txt
--
diff --cc CHANGES.txt
index a962994,41e3f94..f291674
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,22 -1,5 +1,23 @@@
 -2.2.9
 +3.0.10
 + * nodetool stopdaemon errors out (CASSANDRA-12646)
 + * Split materialized view mutations on build to prevent OOM (CASSANDRA-12268)
 + * mx4j does not work in 3.0.8 (CASSANDRA-12274)
 + * Abort cqlsh copy-from in case of no answer after prolonged period of time 
(CASSANDRA-12740)
 + * Avoid sstable corrupt exception due to dropped static column 
(CASSANDRA-12582)
 + * Make stress use client mode to avoid checking commit log size on startup 
(CASSANDRA-12478)
 + * Fix exceptions with new vnode allocation (CASSANDRA-12715)
 + * Unify drain and shutdown processes (CASSANDRA-12509)
 + * Fix NPE in ComponentOfSlice.isEQ() (CASSANDRA-12706)
 + * Fix failure in LogTransactionTest (CASSANDRA-12632)
 + * Fix potentially incomplete non-frozen UDT values when querying with the
 +   full primary key specified (CASSANDRA-12605)
 + * Skip writing MV mutations to commitlog on mutation.applyUnsafe() 
(CASSANDRA-11670)
 + * Establish consistent distinction between non-existing partition and NULL 
value for LWTs on static columns (CASSANDRA-12060)
 + * Extend ColumnIdentifier.internedInstances key to include the type that 
generated the byte buffer (CASSANDRA-12516)
 + * Backport CASSANDRA-10756 (race condition in NativeTransportService 
shutdown) (CASSANDRA-12472)
 + * If CF has no clustering columns, any row cache is full partition cache 
(CASSANDRA-12499)
 +Merged from 2.2:
+  * Clean up permissions when a UDA is dropped (CASSANDRA-12720)
   * Limit colUpdateTimeDelta histogram updates to reasonable deltas 
(CASSANDRA-7)
   * Fix leak errors and execution rejected exceptions when draining 
(CASSANDRA-12457)
   * Fix merkle tree depth calculation (CASSANDRA-12580)



[05/10] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0

2016-10-13 Thread samt
Merge branch 'cassandra-2.2' into cassandra-3.0


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a8898527
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a8898527
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a8898527

Branch: refs/heads/cassandra-3.X
Commit: a889852706866e4c2fd04d4d2397ff088973f5e8
Parents: 6c64074 4eed687
Author: Sam Tunnicliffe 
Authored: Thu Oct 13 17:48:33 2016 +0100
Committer: Sam Tunnicliffe 
Committed: Thu Oct 13 17:48:33 2016 +0100

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/auth/AuthMigrationListener.java | 6 ++
 2 files changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a8898527/CHANGES.txt
--
diff --cc CHANGES.txt
index a962994,41e3f94..f291674
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,22 -1,5 +1,23 @@@
 -2.2.9
 +3.0.10
 + * nodetool stopdaemon errors out (CASSANDRA-12646)
 + * Split materialized view mutations on build to prevent OOM (CASSANDRA-12268)
 + * mx4j does not work in 3.0.8 (CASSANDRA-12274)
 + * Abort cqlsh copy-from in case of no answer after prolonged period of time 
(CASSANDRA-12740)
 + * Avoid sstable corrupt exception due to dropped static column 
(CASSANDRA-12582)
 + * Make stress use client mode to avoid checking commit log size on startup 
(CASSANDRA-12478)
 + * Fix exceptions with new vnode allocation (CASSANDRA-12715)
 + * Unify drain and shutdown processes (CASSANDRA-12509)
 + * Fix NPE in ComponentOfSlice.isEQ() (CASSANDRA-12706)
 + * Fix failure in LogTransactionTest (CASSANDRA-12632)
 + * Fix potentially incomplete non-frozen UDT values when querying with the
 +   full primary key specified (CASSANDRA-12605)
 + * Skip writing MV mutations to commitlog on mutation.applyUnsafe() 
(CASSANDRA-11670)
 + * Establish consistent distinction between non-existing partition and NULL 
value for LWTs on static columns (CASSANDRA-12060)
 + * Extend ColumnIdentifier.internedInstances key to include the type that 
generated the byte buffer (CASSANDRA-12516)
 + * Backport CASSANDRA-10756 (race condition in NativeTransportService 
shutdown) (CASSANDRA-12472)
 + * If CF has no clustering columns, any row cache is full partition cache 
(CASSANDRA-12499)
 +Merged from 2.2:
+  * Clean up permissions when a UDA is dropped (CASSANDRA-12720)
   * Limit colUpdateTimeDelta histogram updates to reasonable deltas 
(CASSANDRA-7)
   * Fix leak errors and execution rejected exceptions when draining 
(CASSANDRA-12457)
   * Fix merkle tree depth calculation (CASSANDRA-12580)



[01/10] cassandra git commit: Clean up permissions when a UDA is dropped

2016-10-13 Thread samt
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.2 7232d72c0 -> 4eed687d3
  refs/heads/cassandra-3.0 6c6407411 -> a88985270
  refs/heads/cassandra-3.X 7234c79bb -> 771a1a2fa
  refs/heads/trunk 58d2b5f49 -> 56bc77c4e


Clean up permissions when a UDA is dropped

Patch by Sam Tunnicliffe; reviewed by Joel Knighton for CASSANDRA-12720


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/4eed687d
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4eed687d
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4eed687d

Branch: refs/heads/cassandra-2.2
Commit: 4eed687d3b3c33b1b52a7c000ba10ba1c7f7222e
Parents: 7232d72
Author: Sam Tunnicliffe 
Authored: Wed Sep 28 16:17:25 2016 +0100
Committer: Sam Tunnicliffe 
Committed: Thu Oct 13 17:46:14 2016 +0100

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/auth/AuthMigrationListener.java | 6 ++
 2 files changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/4eed687d/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 682f12b..41e3f94 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.9
+ * Clean up permissions when a UDA is dropped (CASSANDRA-12720)
  * Limit colUpdateTimeDelta histogram updates to reasonable deltas 
(CASSANDRA-7)
  * Fix leak errors and execution rejected exceptions when draining 
(CASSANDRA-12457)
  * Fix merkle tree depth calculation (CASSANDRA-12580)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4eed687d/src/java/org/apache/cassandra/auth/AuthMigrationListener.java
--
diff --git a/src/java/org/apache/cassandra/auth/AuthMigrationListener.java 
b/src/java/org/apache/cassandra/auth/AuthMigrationListener.java
index fe34329..64fe7c6 100644
--- a/src/java/org/apache/cassandra/auth/AuthMigrationListener.java
+++ b/src/java/org/apache/cassandra/auth/AuthMigrationListener.java
@@ -44,4 +44,10 @@ public class AuthMigrationListener extends MigrationListener
 DatabaseDescriptor.getAuthorizer()
   .revokeAllOn(FunctionResource.function(ksName, 
functionName, argTypes));
 }
+
+public void onDropAggregate(String ksName, String aggregateName, 
List argTypes)
+{
+DatabaseDescriptor.getAuthorizer()
+  .revokeAllOn(FunctionResource.function(ksName, 
aggregateName, argTypes));
+}
 }



[09/10] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.X

2016-10-13 Thread samt
Merge branch 'cassandra-3.0' into cassandra-3.X


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/771a1a2f
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/771a1a2f
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/771a1a2f

Branch: refs/heads/trunk
Commit: 771a1a2fa20ca1be614eaf41ec27ceae83ab5f9c
Parents: 7234c79 a889852
Author: Sam Tunnicliffe 
Authored: Thu Oct 13 17:49:14 2016 +0100
Committer: Sam Tunnicliffe 
Committed: Thu Oct 13 17:49:14 2016 +0100

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/auth/AuthMigrationListener.java | 6 ++
 2 files changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/771a1a2f/CHANGES.txt
--
diff --cc CHANGES.txt
index 682656d,f291674..bc5dcd1
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -110,62 -47,12 +110,63 @@@ Merged from 3.0
   * Disk failure policy should not be invoked on out of space (CASSANDRA-12385)
   * Calculate last compacted key on startup (CASSANDRA-6216)
   * Add schema to snapshot manifest, add USING TIMESTAMP clause to ALTER TABLE 
statements (CASSANDRA-7190)
 + * If CF has no clustering columns, any row cache is full partition cache 
(CASSANDRA-12499)
 +Merged from 2.2:
++ * Clean up permissions when a UDA is dropped (CASSANDRA-12720)
 + * Limit colUpdateTimeDelta histogram updates to reasonable deltas 
(CASSANDRA-7)
 + * Fix leak errors and execution rejected exceptions when draining 
(CASSANDRA-12457)
 + * Fix merkle tree depth calculation (CASSANDRA-12580)
 + * Make Collections deserialization more robust (CASSANDRA-12618)
 + * Better handle invalid system roles table (CASSANDRA-12700)
 + * Fix exceptions when enabling gossip on nodes that haven't joined the ring 
(CASSANDRA-12253)
 + * Fix authentication problem when invoking cqlsh copy from a SOURCE command 
(CASSANDRA-12642)
 + * Decrement pending range calculator jobs counter in finally block
 + * cqlshlib tests: increase default execute timeout (CASSANDRA-12481)
 + * Forward writes to replacement node when replace_address != 
broadcast_address (CASSANDRA-8523)
 + * Fail repair on non-existing table (CASSANDRA-12279)
 + * Enable repair -pr and -local together (fix regression of CASSANDRA-7450) 
(CASSANDRA-12522)
 +
 +
 +3.8, 3.9
 + * Fix value skipping with counter columns (CASSANDRA-11726)
 + * Fix nodetool tablestats miss SSTable count (CASSANDRA-12205)
 + * Fixed flacky SSTablesIteratedTest (CASSANDRA-12282)
 + * Fixed flacky SSTableRewriterTest: check file counts before calling 
validateCFS (CASSANDRA-12348)
 + * cqlsh: Fix handling of $$-escaped strings (CASSANDRA-12189)
 + * Fix SSL JMX requiring truststore containing server cert (CASSANDRA-12109)
 + * RTE from new CDC column breaks in flight queries (CASSANDRA-12236)
 + * Fix hdr logging for single operation workloads (CASSANDRA-12145)
 + * Fix SASI PREFIX search in CONTAINS mode with partial terms 
(CASSANDRA-12073)
 + * Increase size of flushExecutor thread pool (CASSANDRA-12071)
 + * Partial revert of CASSANDRA-11971, cannot recycle buffer in 
SP.sendMessagesToNonlocalDC (CASSANDRA-11950)
 + * Upgrade netty to 4.0.39 (CASSANDRA-12032, CASSANDRA-12034)
 + * Improve details in compaction log message (CASSANDRA-12080)
 + * Allow unset values in CQLSSTableWriter (CASSANDRA-11911)
 + * Chunk cache to request compressor-compatible buffers if pool space is 
exhausted (CASSANDRA-11993)
 + * Remove DatabaseDescriptor dependencies from SequentialWriter 
(CASSANDRA-11579)
 + * Move skip_stop_words filter before stemming (CASSANDRA-12078)
 + * Support seek() in EncryptedFileSegmentInputStream (CASSANDRA-11957)
 + * SSTable tools mishandling LocalPartitioner (CASSANDRA-12002)
 + * When SEPWorker assigned work, set thread name to match pool 
(CASSANDRA-11966)
 + * Add cross-DC latency metrics (CASSANDRA-11596)
 + * Allow terms in selection clause (CASSANDRA-10783)
 + * Add bind variables to trace (CASSANDRA-11719)
 + * Switch counter shards' clock to timestamps (CASSANDRA-9811)
 + * Introduce HdrHistogram and response/service/wait separation to stress tool 
(CASSANDRA-11853)
 + * entry-weighers in QueryProcessor should respect partitionKeyBindIndexes 
field (CASSANDRA-11718)
 + * Support older ant versions (CASSANDRA-11807)
 + * Estimate compressed on disk size when deciding if sstable size limit 
reached (CASSANDRA-11623)
 + * cassandra-stress profiles should support case sensitive schemas 
(CASSANDRA-11546)
 + * Remove DatabaseDescriptor dependency from FileUtils (CASSANDRA-11578)
 + * Faster streaming (CASSANDRA-9766)
 + * Add prepared query parameter to trace for "Execute CQL3 prepared query" 
session (CASSANDRA-11425)
 + * 

[04/10] cassandra git commit: Clean up permissions when a UDA is dropped

2016-10-13 Thread samt
Clean up permissions when a UDA is dropped

Patch by Sam Tunnicliffe; reviewed by Joel Knighton for CASSANDRA-12720


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/4eed687d
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4eed687d
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4eed687d

Branch: refs/heads/trunk
Commit: 4eed687d3b3c33b1b52a7c000ba10ba1c7f7222e
Parents: 7232d72
Author: Sam Tunnicliffe 
Authored: Wed Sep 28 16:17:25 2016 +0100
Committer: Sam Tunnicliffe 
Committed: Thu Oct 13 17:46:14 2016 +0100

--
 CHANGES.txt   | 1 +
 src/java/org/apache/cassandra/auth/AuthMigrationListener.java | 6 ++
 2 files changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/4eed687d/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 682f12b..41e3f94 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.9
+ * Clean up permissions when a UDA is dropped (CASSANDRA-12720)
  * Limit colUpdateTimeDelta histogram updates to reasonable deltas 
(CASSANDRA-7)
  * Fix leak errors and execution rejected exceptions when draining 
(CASSANDRA-12457)
  * Fix merkle tree depth calculation (CASSANDRA-12580)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4eed687d/src/java/org/apache/cassandra/auth/AuthMigrationListener.java
--
diff --git a/src/java/org/apache/cassandra/auth/AuthMigrationListener.java 
b/src/java/org/apache/cassandra/auth/AuthMigrationListener.java
index fe34329..64fe7c6 100644
--- a/src/java/org/apache/cassandra/auth/AuthMigrationListener.java
+++ b/src/java/org/apache/cassandra/auth/AuthMigrationListener.java
@@ -44,4 +44,10 @@ public class AuthMigrationListener extends MigrationListener
 DatabaseDescriptor.getAuthorizer()
   .revokeAllOn(FunctionResource.function(ksName, 
functionName, argTypes));
 }
+
+public void onDropAggregate(String ksName, String aggregateName, 
List argTypes)
+{
+DatabaseDescriptor.getAuthorizer()
+  .revokeAllOn(FunctionResource.function(ksName, 
aggregateName, argTypes));
+}
 }



[jira] [Commented] (CASSANDRA-5988) Make hint TTL customizable

2016-10-13 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-5988:
--

Nope, we are all good. We store creationTime and gcgs (at the time of hint's 
write), and check against current time (and current gcgs) before replaying. 
Essentially following the old behaviour, except even stricter (we use the min 
of gcgs at the time of writing the hint and the gcgs at the time of replay).

What changed is that you cannot *override* the *max* hintttl in 3.0 anymore to 
make it lower - or larger - than the calculated value.

> Make hint TTL customizable
> --
>
> Key: CASSANDRA-5988
> URL: https://issues.apache.org/jira/browse/CASSANDRA-5988
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Oleg Kibirev
>Assignee: Vishy Kasar
>  Labels: patch
> Fix For: 1.2.12, 2.0.3
>
> Attachments: 5988.txt
>
>
> Currently time to live for stored hints is hardcoded to be gc_grace_seconds. 
> This causes problems for applications using backdated deletes as a form of 
> optimistic locking. Hints for updates made to the same data on which delete 
> was attempted can persist for days, making it impossible to determine if 
> delete succeeded by doing read(ALL) after a reasonable delay. We need a way 
> to explicitly configure hint TTL, either through schema parameter or through 
> a yaml file.



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


[jira] [Resolved] (CASSANDRA-12785) LIKE query with partition key restriction gives unexpected results

2016-10-13 Thread Sam Tunnicliffe (JIRA)

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

Sam Tunnicliffe resolved CASSANDRA-12785.
-
Resolution: Duplicate

Looks like this is probably a duplicate of CASSANDRA-12746, 

> LIKE query with partition key restriction gives unexpected results
> --
>
> Key: CASSANDRA-12785
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12785
> Project: Cassandra
>  Issue Type: Bug
>  Components: sasi
>Reporter: Kelsey McKenna
>Priority: Minor
>
> When trying to query a table using the LIKE keyword and a partial restriction 
> of the partition key, unexpected results are given.
> Either the query is returning the wrong data, or the query shouldn't be 
> allowed since the partition key is being partially restricted. Please see the 
> demonstration below:
> {code}
> DROP TABLE IF EXISTS example;
>  
> CREATE TABLE example (
> indextype text,
> indexref text,
> phrase text,
> PRIMARY KEY ((indextype, indexref), phrase)
> );
>  
> CREATE CUSTOM INDEX example_contains ON example(phrase) USING 
> 'org.apache.cassandra.index.sasi.SASIIndex'
> WITH OPTIONS = { 'mode': 'CONTAINS' };
>  
> INSERT INTO example(indextype, indexref, phrase) VALUES('A', 'a1', 'potato');
> INSERT INTO example(indextype, indexref, phrase) VALUES('A', 'a2', 'rubato');
> INSERT INTO example(indextype, indexref, phrase) VALUES('B', 'a3', 'tomato');
>  
> SELECT * FROM example
>  WHERE indextype='A'
>   AND phrase LIKE '%ato%'
>   allow filtering;
>  {code}
> The expected output is
> {code}
> | indextype | indexref | phrase |
> | A | a2   | rubato |
> | A | a1   | potato |
> {code} 
> The actual output is
> {code}
> | indextype | indexref | phrase |
> | B | a3   | tomato |
> | A | a2   | rubato |
> | A | a1   | potato |
> {code}



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


[jira] [Created] (CASSANDRA-12785) LIKE query with partition key restriction gives unexpected results

2016-10-13 Thread Kelsey McKenna (JIRA)
Kelsey McKenna created CASSANDRA-12785:
--

 Summary: LIKE query with partition key restriction gives 
unexpected results
 Key: CASSANDRA-12785
 URL: https://issues.apache.org/jira/browse/CASSANDRA-12785
 Project: Cassandra
  Issue Type: Bug
  Components: sasi
Reporter: Kelsey McKenna
Priority: Minor


When trying to query a table using the LIKE keyword and a partial restriction 
of the partition key, unexpected results are given.

Either the query is returning the wrong data, or the query shouldn't be allowed 
since the partition key is being partially restricted. Please see the 
demonstration below:

{code}
DROP TABLE IF EXISTS example;
 
CREATE TABLE example (
indextype text,
indexref text,
phrase text,
PRIMARY KEY ((indextype, indexref), phrase)
);
 
CREATE CUSTOM INDEX example_contains ON example(phrase) USING 
'org.apache.cassandra.index.sasi.SASIIndex'
WITH OPTIONS = { 'mode': 'CONTAINS' };
 
INSERT INTO example(indextype, indexref, phrase) VALUES('A', 'a1', 'potato');
INSERT INTO example(indextype, indexref, phrase) VALUES('A', 'a2', 'rubato');
INSERT INTO example(indextype, indexref, phrase) VALUES('B', 'a3', 'tomato');
 
SELECT * FROM example
 WHERE indextype='A'
  AND phrase LIKE '%ato%'
  allow filtering;
 {code}

The expected output is
{code}
| indextype | indexref | phrase |
| A | a2   | rubato |
| A | a1   | potato |
{code} 

The actual output is
{code}
| indextype | indexref | phrase |
| B | a3   | tomato |
| A | a2   | rubato |
| A | a1   | potato |
{code}



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


[jira] [Commented] (CASSANDRA-12720) Permissions on aggregate functions are not removed on drop

2016-10-13 Thread Joel Knighton (JIRA)

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

Joel Knighton commented on CASSANDRA-12720:
---

LGTM. The dtest pull request also looks like it adds the necessary coverage. 

I had to rerun some CI due to the environmental problems. All failures were 
either already known or due to using an older branch with newer cassandra-dtest.

> Permissions on aggregate functions are not removed on drop
> --
>
> Key: CASSANDRA-12720
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12720
> Project: Cassandra
>  Issue Type: Bug
>  Components: Distributed Metadata
>Reporter: Sam Tunnicliffe
>Assignee: Sam Tunnicliffe
> Fix For: 2.2.x, 3.0.x, 3.x
>
>
> When a user defined aggregate is dropped, either directly or when it's 
> enclosing keyspace is dropped, permissions granted on it are not cleaned up.



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


[jira] [Updated] (CASSANDRA-12720) Permissions on aggregate functions are not removed on drop

2016-10-13 Thread Joel Knighton (JIRA)

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

Joel Knighton updated CASSANDRA-12720:
--
Status: Ready to Commit  (was: Patch Available)

> Permissions on aggregate functions are not removed on drop
> --
>
> Key: CASSANDRA-12720
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12720
> Project: Cassandra
>  Issue Type: Bug
>  Components: Distributed Metadata
>Reporter: Sam Tunnicliffe
>Assignee: Sam Tunnicliffe
> Fix For: 2.2.x, 3.0.x, 3.x
>
>
> When a user defined aggregate is dropped, either directly or when it's 
> enclosing keyspace is dropped, permissions granted on it are not cleaned up.



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


[jira] [Commented] (CASSANDRA-8167) sstablesplit tool can be made much faster with few JVM settings

2016-10-13 Thread Joshua McKenzie (JIRA)

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

Joshua McKenzie commented on CASSANDRA-8167:


[~yukim]: {{tools/bin/cassandra.in.bat}} contains settings we source in our 
batch files for tools, so we should add the settings in there.

> sstablesplit tool can be made much faster with few JVM settings
> ---
>
> Key: CASSANDRA-8167
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8167
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Tools
>Reporter: Nikolai Grigoriev
>Assignee: Yuki Morishita
>Priority: Trivial
>
> I had to use sstablesplit tool intensively to split some really huge 
> sstables. The tool is painfully slow as it does compaction in one single 
> thread.
> I have just found that one one of my machines the tool has crashed when I was 
> almost done with 152Gb sstable (!!!). 
> {code}
>  INFO 16:59:22,342 Writing Memtable-compactions_in_progress@1948660572(0/0 
> serialized/live bytes, 1 ops)
>  INFO 16:59:22,352 Completed flushing 
> /cassandra-data/disk1/system/compactions_in_progress/system-compactions_in_progress-jb-79242-Data.db
>  (42 bytes) for commitlog position ReplayPosition(segmentId=1413904450653, 
> position=69178)
> Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit 
> exceeded
> at java.nio.HeapByteBuffer.duplicate(HeapByteBuffer.java:107)
> at 
> org.apache.cassandra.utils.ByteBufferUtil.readBytes(ByteBufferUtil.java:586)
> at 
> org.apache.cassandra.utils.ByteBufferUtil.readBytesWithShortLength(ByteBufferUtil.java:596)
> at 
> org.apache.cassandra.db.marshal.AbstractCompositeType.compare(AbstractCompositeType.java:61)
> at 
> org.apache.cassandra.db.marshal.AbstractCompositeType.compare(AbstractCompositeType.java:36)
> at 
> org.apache.cassandra.db.RangeTombstoneList$InOrderTester.isDeleted(RangeTombstoneList.java:751)
> at 
> org.apache.cassandra.db.DeletionInfo$InOrderTester.isDeleted(DeletionInfo.java:422)
> at 
> org.apache.cassandra.db.DeletionInfo$InOrderTester.isDeleted(DeletionInfo.java:403)
> at 
> org.apache.cassandra.db.ColumnFamily.hasIrrelevantData(ColumnFamily.java:489)
> at 
> org.apache.cassandra.db.compaction.PrecompactedRow.removeDeleted(PrecompactedRow.java:66)
> at 
> org.apache.cassandra.db.compaction.PrecompactedRow.(PrecompactedRow.java:85)
> at 
> org.apache.cassandra.db.compaction.CompactionController.getCompactedRow(CompactionController.java:196)
> at 
> org.apache.cassandra.db.compaction.CompactionIterable$Reducer.getReduced(CompactionIterable.java:74)
> at 
> org.apache.cassandra.db.compaction.CompactionIterable$Reducer.getReduced(CompactionIterable.java:55)
> at 
> org.apache.cassandra.utils.MergeIterator$OneToOne.computeNext(MergeIterator.java:204)
> at 
> com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
> at 
> com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
> at 
> org.apache.cassandra.db.compaction.CompactionTask.runWith(CompactionTask.java:154)
> at 
> org.apache.cassandra.io.util.DiskAwareRunnable.runMayThrow(DiskAwareRunnable.java:48)
> at 
> org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
> at 
> org.apache.cassandra.db.compaction.CompactionTask.executeInternal(CompactionTask.java:60)
> at 
> org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(AbstractCompactionTask.java:59)
> at 
> org.apache.cassandra.db.compaction.SSTableSplitter.split(SSTableSplitter.java:38)
> at 
> org.apache.cassandra.tools.StandaloneSplitter.main(StandaloneSplitter.java:150)
> {code}
> This has  triggered my desire to see what memory settings are used for JVM 
> running the tool...and I have found that it runs with default Java settings 
> (no settings at all).
> I have tried to apply the settings from C* itself and this resulted in over 
> 40% speed increase. It went from ~5Mb/s to 7Mb/s - from the compressed output 
> perspective. I believe this is mostly due to concurrent GC. I see my CPU 
> usage has increased to ~200%. But this is fine, this is an offline tool, the 
> node is down anyway. I know that concurrent GC (at least something like 
> -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled) 
> normally improves the performance of even primitive single-threaded 
> heap-intensive Java programs.
> I think it should be acceptable to apply the server JVM settings to this tool.



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


[jira] [Updated] (CASSANDRA-12646) nodetool stopdaemon errors out on stopdaemon

2016-10-13 Thread Robert Stupp (JIRA)

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

Robert Stupp updated CASSANDRA-12646:
-
   Resolution: Fixed
Fix Version/s: (was: 3.0.x)
   3.10
   3.0.10
   Status: Resolved  (was: Ready to Commit)

Thanks!
Committed as 
[6c6407411f4955967297331798e9d0c57644b311|https://github.com/apache/cassandra/commit/6c6407411f4955967297331798e9d0c57644b311]
 to [cassandra-3.0|https://github.com/apache/cassandra/tree/cassandra-3.0] and 
merged to cassandra-3.X and trunk.

> nodetool stopdaemon errors out on stopdaemon
> 
>
> Key: CASSANDRA-12646
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12646
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Tools
>Reporter: Robert Stupp
>Assignee: Robert Stupp
>Priority: Minor
> Fix For: 3.0.10, 3.10
>
>
> {{nodetool stopdaemon}} works, but it prints a {{java.net.ConnectException: 
> Connection refused}} error message in {{NodeProbe.close()}} - which is 
> expected.
> Attached patch prevents that error message (i.e. it expects {{close()}} to 
> fail for {{stopdaemon}}).
> Additionally, on trunk a call to {{DD.clientInit()}} has been added, because 
> {{JVMStabilityInspector.inspectThrowable}} implicitly requires this.



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


[4/6] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.X

2016-10-13 Thread snazy
Merge branch 'cassandra-3.0' into cassandra-3.X


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7234c79b
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7234c79b
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7234c79b

Branch: refs/heads/trunk
Commit: 7234c79bb2f982f7e36e4c76994442521a2a3f15
Parents: 2931a19 6c64074
Author: Robert Stupp 
Authored: Thu Oct 13 15:20:20 2016 +0200
Committer: Robert Stupp 
Committed: Thu Oct 13 15:20:20 2016 +0200

--
 CHANGES.txt  |  1 +
 src/java/org/apache/cassandra/tools/NodeProbe.java   | 11 ++-
 .../org/apache/cassandra/tools/nodetool/StopDaemon.java  |  3 +--
 3 files changed, 12 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7234c79b/CHANGES.txt
--
diff --cc CHANGES.txt
index c0b1b20,a962994..682656d
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,85 -1,5 +1,86 @@@
 -3.0.10
 +3.10
 + * cqlsh fails to format collections when using aliases (CASSANDRA-11534)
 + * Check for hash conflicts in prepared statements (CASSANDRA-12733)
 + * Exit query parsing upon first error (CASSANDRA-12598)
 + * Fix cassandra-stress to use single seed in UUID generation 
(CASSANDRA-12729)
 + * CQLSSTableWriter does not allow Update statement (CASSANDRA-12450)
 + * Config class uses boxed types but DD exposes primitive types 
(CASSANDRA-12199)
 + * Add pre- and post-shutdown hooks to Storage Service (CASSANDRA-12461)
 + * Add hint delivery metrics (CASSANDRA-12693)
 + * Remove IndexInfo cache from FileIndexInfoRetriever (CASSANDRA-12731)
 + * ColumnIndex does not reuse buffer (CASSANDRA-12502)
 + * cdc column addition still breaks schema migration tasks (CASSANDRA-12697)
 + * Upgrade metrics-reporter dependencies (CASSANDRA-12089)
 + * Tune compaction thread count via nodetool (CASSANDRA-12248)
 + * Add +=/-= shortcut syntax for update queries (CASSANDRA-12232)
 + * Include repair session IDs in repair start message (CASSANDRA-12532)
 + * Add a blocking task to Index, run before joining the ring (CASSANDRA-12039)
 + * Fix NPE when using CQLSSTableWriter (CASSANDRA-12667)
 + * Support optional backpressure strategies at the coordinator 
(CASSANDRA-9318)
 + * Make randompartitioner work with new vnode allocation (CASSANDRA-12647)
 + * Fix cassandra-stress graphing (CASSANDRA-12237)
 + * Allow filtering on partition key columns for queries without secondary 
indexes (CASSANDRA-11031)
 + * Fix Cassandra Stress reporting thread model and precision (CASSANDRA-12585)
 + * Add JMH benchmarks.jar (CASSANDRA-12586)
 + * Add row offset support to SASI (CASSANDRA-11990)
 + * Cleanup uses of AlterTableStatementColumn (CASSANDRA-12567)
 + * Add keep-alive to streaming (CASSANDRA-11841)
 + * Tracing payload is passed through newSession(..) (CASSANDRA-11706)
 + * avoid deleting non existing sstable files and improve related log messages 
(CASSANDRA-12261)
 + * json/yaml output format for nodetool compactionhistory (CASSANDRA-12486)
 + * Retry all internode messages once after a connection is
 +   closed and reopened (CASSANDRA-12192)
 + * Add support to rebuild from targeted replica (CASSANDRA-9875)
 + * Add sequence distribution type to cassandra stress (CASSANDRA-12490)
 + * "SELECT * FROM foo LIMIT ;" does not error out (CASSANDRA-12154)
 + * Define executeLocally() at the ReadQuery Level (CASSANDRA-12474)
 + * Extend read/write failure messages with a map of replica addresses
 +   to error codes in the v5 native protocol (CASSANDRA-12311)
 + * Fix rebuild of SASI indexes with existing index files (CASSANDRA-12374)
 + * Let DatabaseDescriptor not implicitly startup services (CASSANDRA-9054, 
12550)
 + * Fix clustering indexes in presence of static columns in SASI 
(CASSANDRA-12378)
 + * Fix queries on columns with reversed type on SASI indexes (CASSANDRA-12223)
 + * Added slow query log (CASSANDRA-12403)
 + * Count full coordinated request against timeout (CASSANDRA-12256)
 + * Allow TTL with null value on insert and update (CASSANDRA-12216)
 + * Make decommission operation resumable (CASSANDRA-12008)
 + * Add support to one-way targeted repair (CASSANDRA-9876)
 + * Remove clientutil jar (CASSANDRA-11635)
 + * Fix compaction throughput throttle (CASSANDRA-12366, CASSANDRA-12717)
 + * Delay releasing Memtable memory on flush until PostFlush has finished 
running (CASSANDRA-12358)
 + * Cassandra stress should dump all setting on startup (CASSANDRA-11914)
 + * Make it possible to compact a given token range (CASSANDRA-10643)
 + * Allow updating DynamicEndpointSnitch properties via JMX (CASSANDRA-12179)
 + * Collect metrics on queries by consistency level 

[2/6] cassandra git commit: nodetool stopdaemon errors out

2016-10-13 Thread snazy
nodetool stopdaemon errors out

patch by Robert Stupp; reviewed by Alex Petrov for CASSANDRA-12646


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6c640741
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6c640741
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6c640741

Branch: refs/heads/cassandra-3.X
Commit: 6c6407411f4955967297331798e9d0c57644b311
Parents: 7a274dd
Author: Robert Stupp 
Authored: Thu Oct 13 15:18:56 2016 +0200
Committer: Robert Stupp 
Committed: Thu Oct 13 15:18:56 2016 +0200

--
 CHANGES.txt|  1 +
 src/java/org/apache/cassandra/tools/NodeProbe.java | 13 +++--
 .../apache/cassandra/tools/nodetool/StopDaemon.java|  3 +--
 3 files changed, 13 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6c640741/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index dc7bcab..a962994 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.10
+ * nodetool stopdaemon errors out (CASSANDRA-12646)
  * Split materialized view mutations on build to prevent OOM (CASSANDRA-12268)
  * mx4j does not work in 3.0.8 (CASSANDRA-12274)
  * Abort cqlsh copy-from in case of no answer after prolonged period of time 
(CASSANDRA-12740)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6c640741/src/java/org/apache/cassandra/tools/NodeProbe.java
--
diff --git a/src/java/org/apache/cassandra/tools/NodeProbe.java 
b/src/java/org/apache/cassandra/tools/NodeProbe.java
index 6a95e99..394ce6e 100644
--- a/src/java/org/apache/cassandra/tools/NodeProbe.java
+++ b/src/java/org/apache/cassandra/tools/NodeProbe.java
@@ -25,6 +25,7 @@ import java.lang.management.MemoryUsage;
 import java.lang.management.RuntimeMXBean;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
+import java.rmi.ConnectException;
 import java.rmi.server.RMIClientSocketFactory;
 import java.rmi.server.RMISocketFactory;
 import java.util.AbstractMap;
@@ -224,7 +225,7 @@ public class NodeProbe implements AutoCloseable
 mbeanServerConn, ManagementFactory.RUNTIME_MXBEAN_NAME, 
RuntimeMXBean.class);
 }
 
-private RMIClientSocketFactory getRMIClientSocketFactory() throws 
IOException
+private RMIClientSocketFactory getRMIClientSocketFactory()
 {
 if (Boolean.parseBoolean(System.getProperty("ssl.enable")))
 return new SslRMIClientSocketFactory();
@@ -234,7 +235,15 @@ public class NodeProbe implements AutoCloseable
 
 public void close() throws IOException
 {
-jmxc.close();
+try
+{
+jmxc.close();
+}
+catch (ConnectException e)
+{
+// result of 'stopdaemon' command - i.e. if close() call fails, 
the daemon is shutdown
+System.out.println("Cassandra has shutdown.");
+}
 }
 
 public int forceKeyspaceCleanup(int jobs, String keyspaceName, String... 
tables) throws IOException, ExecutionException, InterruptedException

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6c640741/src/java/org/apache/cassandra/tools/nodetool/StopDaemon.java
--
diff --git a/src/java/org/apache/cassandra/tools/nodetool/StopDaemon.java 
b/src/java/org/apache/cassandra/tools/nodetool/StopDaemon.java
index a0af89f..79a499a 100644
--- a/src/java/org/apache/cassandra/tools/nodetool/StopDaemon.java
+++ b/src/java/org/apache/cassandra/tools/nodetool/StopDaemon.java
@@ -37,6 +37,5 @@ public class StopDaemon extends NodeToolCmd
 JVMStabilityInspector.inspectThrowable(e);
 // ignored
 }
-System.out.println("Cassandra has shutdown.");
 }
-}
\ No newline at end of file
+}



[3/6] cassandra git commit: nodetool stopdaemon errors out

2016-10-13 Thread snazy
nodetool stopdaemon errors out

patch by Robert Stupp; reviewed by Alex Petrov for CASSANDRA-12646


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6c640741
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6c640741
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6c640741

Branch: refs/heads/trunk
Commit: 6c6407411f4955967297331798e9d0c57644b311
Parents: 7a274dd
Author: Robert Stupp 
Authored: Thu Oct 13 15:18:56 2016 +0200
Committer: Robert Stupp 
Committed: Thu Oct 13 15:18:56 2016 +0200

--
 CHANGES.txt|  1 +
 src/java/org/apache/cassandra/tools/NodeProbe.java | 13 +++--
 .../apache/cassandra/tools/nodetool/StopDaemon.java|  3 +--
 3 files changed, 13 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6c640741/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index dc7bcab..a962994 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.10
+ * nodetool stopdaemon errors out (CASSANDRA-12646)
  * Split materialized view mutations on build to prevent OOM (CASSANDRA-12268)
  * mx4j does not work in 3.0.8 (CASSANDRA-12274)
  * Abort cqlsh copy-from in case of no answer after prolonged period of time 
(CASSANDRA-12740)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6c640741/src/java/org/apache/cassandra/tools/NodeProbe.java
--
diff --git a/src/java/org/apache/cassandra/tools/NodeProbe.java 
b/src/java/org/apache/cassandra/tools/NodeProbe.java
index 6a95e99..394ce6e 100644
--- a/src/java/org/apache/cassandra/tools/NodeProbe.java
+++ b/src/java/org/apache/cassandra/tools/NodeProbe.java
@@ -25,6 +25,7 @@ import java.lang.management.MemoryUsage;
 import java.lang.management.RuntimeMXBean;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
+import java.rmi.ConnectException;
 import java.rmi.server.RMIClientSocketFactory;
 import java.rmi.server.RMISocketFactory;
 import java.util.AbstractMap;
@@ -224,7 +225,7 @@ public class NodeProbe implements AutoCloseable
 mbeanServerConn, ManagementFactory.RUNTIME_MXBEAN_NAME, 
RuntimeMXBean.class);
 }
 
-private RMIClientSocketFactory getRMIClientSocketFactory() throws 
IOException
+private RMIClientSocketFactory getRMIClientSocketFactory()
 {
 if (Boolean.parseBoolean(System.getProperty("ssl.enable")))
 return new SslRMIClientSocketFactory();
@@ -234,7 +235,15 @@ public class NodeProbe implements AutoCloseable
 
 public void close() throws IOException
 {
-jmxc.close();
+try
+{
+jmxc.close();
+}
+catch (ConnectException e)
+{
+// result of 'stopdaemon' command - i.e. if close() call fails, 
the daemon is shutdown
+System.out.println("Cassandra has shutdown.");
+}
 }
 
 public int forceKeyspaceCleanup(int jobs, String keyspaceName, String... 
tables) throws IOException, ExecutionException, InterruptedException

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6c640741/src/java/org/apache/cassandra/tools/nodetool/StopDaemon.java
--
diff --git a/src/java/org/apache/cassandra/tools/nodetool/StopDaemon.java 
b/src/java/org/apache/cassandra/tools/nodetool/StopDaemon.java
index a0af89f..79a499a 100644
--- a/src/java/org/apache/cassandra/tools/nodetool/StopDaemon.java
+++ b/src/java/org/apache/cassandra/tools/nodetool/StopDaemon.java
@@ -37,6 +37,5 @@ public class StopDaemon extends NodeToolCmd
 JVMStabilityInspector.inspectThrowable(e);
 // ignored
 }
-System.out.println("Cassandra has shutdown.");
 }
-}
\ No newline at end of file
+}



[1/6] cassandra git commit: nodetool stopdaemon errors out

2016-10-13 Thread snazy
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.0 7a274dd36 -> 6c6407411
  refs/heads/cassandra-3.X 2931a1938 -> 7234c79bb
  refs/heads/trunk a48ebbcf0 -> 58d2b5f49


nodetool stopdaemon errors out

patch by Robert Stupp; reviewed by Alex Petrov for CASSANDRA-12646


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6c640741
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6c640741
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6c640741

Branch: refs/heads/cassandra-3.0
Commit: 6c6407411f4955967297331798e9d0c57644b311
Parents: 7a274dd
Author: Robert Stupp 
Authored: Thu Oct 13 15:18:56 2016 +0200
Committer: Robert Stupp 
Committed: Thu Oct 13 15:18:56 2016 +0200

--
 CHANGES.txt|  1 +
 src/java/org/apache/cassandra/tools/NodeProbe.java | 13 +++--
 .../apache/cassandra/tools/nodetool/StopDaemon.java|  3 +--
 3 files changed, 13 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6c640741/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index dc7bcab..a962994 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.10
+ * nodetool stopdaemon errors out (CASSANDRA-12646)
  * Split materialized view mutations on build to prevent OOM (CASSANDRA-12268)
  * mx4j does not work in 3.0.8 (CASSANDRA-12274)
  * Abort cqlsh copy-from in case of no answer after prolonged period of time 
(CASSANDRA-12740)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6c640741/src/java/org/apache/cassandra/tools/NodeProbe.java
--
diff --git a/src/java/org/apache/cassandra/tools/NodeProbe.java 
b/src/java/org/apache/cassandra/tools/NodeProbe.java
index 6a95e99..394ce6e 100644
--- a/src/java/org/apache/cassandra/tools/NodeProbe.java
+++ b/src/java/org/apache/cassandra/tools/NodeProbe.java
@@ -25,6 +25,7 @@ import java.lang.management.MemoryUsage;
 import java.lang.management.RuntimeMXBean;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
+import java.rmi.ConnectException;
 import java.rmi.server.RMIClientSocketFactory;
 import java.rmi.server.RMISocketFactory;
 import java.util.AbstractMap;
@@ -224,7 +225,7 @@ public class NodeProbe implements AutoCloseable
 mbeanServerConn, ManagementFactory.RUNTIME_MXBEAN_NAME, 
RuntimeMXBean.class);
 }
 
-private RMIClientSocketFactory getRMIClientSocketFactory() throws 
IOException
+private RMIClientSocketFactory getRMIClientSocketFactory()
 {
 if (Boolean.parseBoolean(System.getProperty("ssl.enable")))
 return new SslRMIClientSocketFactory();
@@ -234,7 +235,15 @@ public class NodeProbe implements AutoCloseable
 
 public void close() throws IOException
 {
-jmxc.close();
+try
+{
+jmxc.close();
+}
+catch (ConnectException e)
+{
+// result of 'stopdaemon' command - i.e. if close() call fails, 
the daemon is shutdown
+System.out.println("Cassandra has shutdown.");
+}
 }
 
 public int forceKeyspaceCleanup(int jobs, String keyspaceName, String... 
tables) throws IOException, ExecutionException, InterruptedException

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6c640741/src/java/org/apache/cassandra/tools/nodetool/StopDaemon.java
--
diff --git a/src/java/org/apache/cassandra/tools/nodetool/StopDaemon.java 
b/src/java/org/apache/cassandra/tools/nodetool/StopDaemon.java
index a0af89f..79a499a 100644
--- a/src/java/org/apache/cassandra/tools/nodetool/StopDaemon.java
+++ b/src/java/org/apache/cassandra/tools/nodetool/StopDaemon.java
@@ -37,6 +37,5 @@ public class StopDaemon extends NodeToolCmd
 JVMStabilityInspector.inspectThrowable(e);
 // ignored
 }
-System.out.println("Cassandra has shutdown.");
 }
-}
\ No newline at end of file
+}



[6/6] cassandra git commit: Merge branch 'cassandra-3.X' into trunk

2016-10-13 Thread snazy
Merge branch 'cassandra-3.X' into trunk


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/58d2b5f4
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/58d2b5f4
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/58d2b5f4

Branch: refs/heads/trunk
Commit: 58d2b5f49f81ab573d07eaceac7150ca95d44db4
Parents: a48ebbc 7234c79
Author: Robert Stupp 
Authored: Thu Oct 13 15:20:37 2016 +0200
Committer: Robert Stupp 
Committed: Thu Oct 13 15:20:37 2016 +0200

--
 CHANGES.txt  |  1 +
 src/java/org/apache/cassandra/tools/NodeProbe.java   | 11 ++-
 .../org/apache/cassandra/tools/nodetool/StopDaemon.java  |  3 +--
 3 files changed, 12 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/58d2b5f4/CHANGES.txt
--



[5/6] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.X

2016-10-13 Thread snazy
Merge branch 'cassandra-3.0' into cassandra-3.X


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7234c79b
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7234c79b
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7234c79b

Branch: refs/heads/cassandra-3.X
Commit: 7234c79bb2f982f7e36e4c76994442521a2a3f15
Parents: 2931a19 6c64074
Author: Robert Stupp 
Authored: Thu Oct 13 15:20:20 2016 +0200
Committer: Robert Stupp 
Committed: Thu Oct 13 15:20:20 2016 +0200

--
 CHANGES.txt  |  1 +
 src/java/org/apache/cassandra/tools/NodeProbe.java   | 11 ++-
 .../org/apache/cassandra/tools/nodetool/StopDaemon.java  |  3 +--
 3 files changed, 12 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7234c79b/CHANGES.txt
--
diff --cc CHANGES.txt
index c0b1b20,a962994..682656d
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,85 -1,5 +1,86 @@@
 -3.0.10
 +3.10
 + * cqlsh fails to format collections when using aliases (CASSANDRA-11534)
 + * Check for hash conflicts in prepared statements (CASSANDRA-12733)
 + * Exit query parsing upon first error (CASSANDRA-12598)
 + * Fix cassandra-stress to use single seed in UUID generation 
(CASSANDRA-12729)
 + * CQLSSTableWriter does not allow Update statement (CASSANDRA-12450)
 + * Config class uses boxed types but DD exposes primitive types 
(CASSANDRA-12199)
 + * Add pre- and post-shutdown hooks to Storage Service (CASSANDRA-12461)
 + * Add hint delivery metrics (CASSANDRA-12693)
 + * Remove IndexInfo cache from FileIndexInfoRetriever (CASSANDRA-12731)
 + * ColumnIndex does not reuse buffer (CASSANDRA-12502)
 + * cdc column addition still breaks schema migration tasks (CASSANDRA-12697)
 + * Upgrade metrics-reporter dependencies (CASSANDRA-12089)
 + * Tune compaction thread count via nodetool (CASSANDRA-12248)
 + * Add +=/-= shortcut syntax for update queries (CASSANDRA-12232)
 + * Include repair session IDs in repair start message (CASSANDRA-12532)
 + * Add a blocking task to Index, run before joining the ring (CASSANDRA-12039)
 + * Fix NPE when using CQLSSTableWriter (CASSANDRA-12667)
 + * Support optional backpressure strategies at the coordinator 
(CASSANDRA-9318)
 + * Make randompartitioner work with new vnode allocation (CASSANDRA-12647)
 + * Fix cassandra-stress graphing (CASSANDRA-12237)
 + * Allow filtering on partition key columns for queries without secondary 
indexes (CASSANDRA-11031)
 + * Fix Cassandra Stress reporting thread model and precision (CASSANDRA-12585)
 + * Add JMH benchmarks.jar (CASSANDRA-12586)
 + * Add row offset support to SASI (CASSANDRA-11990)
 + * Cleanup uses of AlterTableStatementColumn (CASSANDRA-12567)
 + * Add keep-alive to streaming (CASSANDRA-11841)
 + * Tracing payload is passed through newSession(..) (CASSANDRA-11706)
 + * avoid deleting non existing sstable files and improve related log messages 
(CASSANDRA-12261)
 + * json/yaml output format for nodetool compactionhistory (CASSANDRA-12486)
 + * Retry all internode messages once after a connection is
 +   closed and reopened (CASSANDRA-12192)
 + * Add support to rebuild from targeted replica (CASSANDRA-9875)
 + * Add sequence distribution type to cassandra stress (CASSANDRA-12490)
 + * "SELECT * FROM foo LIMIT ;" does not error out (CASSANDRA-12154)
 + * Define executeLocally() at the ReadQuery Level (CASSANDRA-12474)
 + * Extend read/write failure messages with a map of replica addresses
 +   to error codes in the v5 native protocol (CASSANDRA-12311)
 + * Fix rebuild of SASI indexes with existing index files (CASSANDRA-12374)
 + * Let DatabaseDescriptor not implicitly startup services (CASSANDRA-9054, 
12550)
 + * Fix clustering indexes in presence of static columns in SASI 
(CASSANDRA-12378)
 + * Fix queries on columns with reversed type on SASI indexes (CASSANDRA-12223)
 + * Added slow query log (CASSANDRA-12403)
 + * Count full coordinated request against timeout (CASSANDRA-12256)
 + * Allow TTL with null value on insert and update (CASSANDRA-12216)
 + * Make decommission operation resumable (CASSANDRA-12008)
 + * Add support to one-way targeted repair (CASSANDRA-9876)
 + * Remove clientutil jar (CASSANDRA-11635)
 + * Fix compaction throughput throttle (CASSANDRA-12366, CASSANDRA-12717)
 + * Delay releasing Memtable memory on flush until PostFlush has finished 
running (CASSANDRA-12358)
 + * Cassandra stress should dump all setting on startup (CASSANDRA-11914)
 + * Make it possible to compact a given token range (CASSANDRA-10643)
 + * Allow updating DynamicEndpointSnitch properties via JMX (CASSANDRA-12179)
 + * Collect metrics on queries by consistency 

[jira] [Updated] (CASSANDRA-11117) ColUpdateTimeDeltaHistogram histogram overflow

2016-10-13 Thread Marcus Eriksson (JIRA)

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

Marcus Eriksson updated CASSANDRA-7:

   Resolution: Fixed
Fix Version/s: (was: 4.x)
   (was: 3.0.x)
   (was: 2.2.x)
   (was: 3.x)
   4.0
   3.10
   3.0.10
   2.2.9
   Status: Resolved  (was: Patch Available)

and committed, thanks

> ColUpdateTimeDeltaHistogram histogram overflow
> --
>
> Key: CASSANDRA-7
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Chris Lohfink
>Assignee: Joel Knighton
>Priority: Minor
> Fix For: 2.2.9, 3.0.10, 3.10, 4.0
>
>
> {code}
> getting attribute Mean of 
> org.apache.cassandra.metrics:type=ColumnFamily,name=ColUpdateTimeDeltaHistogram
>  threw an exceptionjavax.management.RuntimeMBeanException: 
> java.lang.IllegalStateException: Unable to compute ceiling for max when 
> histogram overflowed
> {code}
> Although the fact that this histogram has 164 buckets already, I wonder if 
> there is something weird with the computation thats causing this to be so 
> large? It appears to be coming from updates to system.local
> {code}
> org.apache.cassandra.metrics:type=Table,keyspace=system,scope=local,name=ColUpdateTimeDeltaHistogram
> {code}



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


[09/10] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.X

2016-10-13 Thread marcuse
Merge branch 'cassandra-3.0' into cassandra-3.X


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/2931a193
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/2931a193
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/2931a193

Branch: refs/heads/trunk
Commit: 2931a1938db4de877f2e1e3c2916e0f308dafa3e
Parents: a041908 7a274dd
Author: Marcus Eriksson 
Authored: Thu Oct 13 15:08:58 2016 +0200
Committer: Marcus Eriksson 
Committed: Thu Oct 13 15:08:58 2016 +0200

--
 CHANGES.txt |  1 +
 .../apache/cassandra/db/ColumnFamilyStore.java  |  7 -
 .../cassandra/db/ColumnFamilyMetricTest.java| 29 
 3 files changed, 36 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2931a193/CHANGES.txt
--
diff --cc CHANGES.txt
index f0df0e6,dc7bcab..c0b1b20
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -109,61 -45,12 +109,62 @@@ Merged from 3.0
   * Disk failure policy should not be invoked on out of space (CASSANDRA-12385)
   * Calculate last compacted key on startup (CASSANDRA-6216)
   * Add schema to snapshot manifest, add USING TIMESTAMP clause to ALTER TABLE 
statements (CASSANDRA-7190)
 + * If CF has no clustering columns, any row cache is full partition cache 
(CASSANDRA-12499)
 +Merged from 2.2:
++ * Limit colUpdateTimeDelta histogram updates to reasonable deltas 
(CASSANDRA-7)
 + * Fix leak errors and execution rejected exceptions when draining 
(CASSANDRA-12457)
 + * Fix merkle tree depth calculation (CASSANDRA-12580)
 + * Make Collections deserialization more robust (CASSANDRA-12618)
 + * Better handle invalid system roles table (CASSANDRA-12700)
 + * Fix exceptions when enabling gossip on nodes that haven't joined the ring 
(CASSANDRA-12253)
 + * Fix authentication problem when invoking cqlsh copy from a SOURCE command 
(CASSANDRA-12642)
 + * Decrement pending range calculator jobs counter in finally block
 + * cqlshlib tests: increase default execute timeout (CASSANDRA-12481)
 + * Forward writes to replacement node when replace_address != 
broadcast_address (CASSANDRA-8523)
 + * Fail repair on non-existing table (CASSANDRA-12279)
 + * Enable repair -pr and -local together (fix regression of CASSANDRA-7450) 
(CASSANDRA-12522)
 +
 +
 +3.8, 3.9
 + * Fix value skipping with counter columns (CASSANDRA-11726)
 + * Fix nodetool tablestats miss SSTable count (CASSANDRA-12205)
 + * Fixed flacky SSTablesIteratedTest (CASSANDRA-12282)
 + * Fixed flacky SSTableRewriterTest: check file counts before calling 
validateCFS (CASSANDRA-12348)
 + * cqlsh: Fix handling of $$-escaped strings (CASSANDRA-12189)
 + * Fix SSL JMX requiring truststore containing server cert (CASSANDRA-12109)
 + * RTE from new CDC column breaks in flight queries (CASSANDRA-12236)
 + * Fix hdr logging for single operation workloads (CASSANDRA-12145)
 + * Fix SASI PREFIX search in CONTAINS mode with partial terms 
(CASSANDRA-12073)
 + * Increase size of flushExecutor thread pool (CASSANDRA-12071)
 + * Partial revert of CASSANDRA-11971, cannot recycle buffer in 
SP.sendMessagesToNonlocalDC (CASSANDRA-11950)
 + * Upgrade netty to 4.0.39 (CASSANDRA-12032, CASSANDRA-12034)
 + * Improve details in compaction log message (CASSANDRA-12080)
 + * Allow unset values in CQLSSTableWriter (CASSANDRA-11911)
 + * Chunk cache to request compressor-compatible buffers if pool space is 
exhausted (CASSANDRA-11993)
 + * Remove DatabaseDescriptor dependencies from SequentialWriter 
(CASSANDRA-11579)
 + * Move skip_stop_words filter before stemming (CASSANDRA-12078)
 + * Support seek() in EncryptedFileSegmentInputStream (CASSANDRA-11957)
 + * SSTable tools mishandling LocalPartitioner (CASSANDRA-12002)
 + * When SEPWorker assigned work, set thread name to match pool 
(CASSANDRA-11966)
 + * Add cross-DC latency metrics (CASSANDRA-11596)
 + * Allow terms in selection clause (CASSANDRA-10783)
 + * Add bind variables to trace (CASSANDRA-11719)
 + * Switch counter shards' clock to timestamps (CASSANDRA-9811)
 + * Introduce HdrHistogram and response/service/wait separation to stress tool 
(CASSANDRA-11853)
 + * entry-weighers in QueryProcessor should respect partitionKeyBindIndexes 
field (CASSANDRA-11718)
 + * Support older ant versions (CASSANDRA-11807)
 + * Estimate compressed on disk size when deciding if sstable size limit 
reached (CASSANDRA-11623)
 + * cassandra-stress profiles should support case sensitive schemas 
(CASSANDRA-11546)
 + * Remove DatabaseDescriptor dependency from FileUtils (CASSANDRA-11578)
 + * Faster streaming (CASSANDRA-9766)
 + * Add prepared query parameter to trace for "Execute CQL3 prepared query" 
session (CASSANDRA-11425)
 + 

[01/10] cassandra git commit: Limit colUpdateTimeDelta histogram updates to reasonable deltas

2016-10-13 Thread marcuse
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.2 ff5c497d1 -> 7232d72c0
  refs/heads/cassandra-3.0 76f175028 -> 7a274dd36
  refs/heads/cassandra-3.X a0419085d -> 2931a1938
  refs/heads/trunk a83aeba94 -> a48ebbcf0


Limit colUpdateTimeDelta histogram updates to reasonable deltas

patch by Joel Knighton; reviewed by Marcus Eriksson for CASSANDRA-7


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7232d72c
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7232d72c
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7232d72c

Branch: refs/heads/cassandra-2.2
Commit: 7232d72c0f375f8034b506d05278bf8ec975a36a
Parents: ff5c497
Author: Joel Knighton 
Authored: Thu Sep 29 21:56:27 2016 -0500
Committer: Marcus Eriksson 
Committed: Thu Oct 13 15:01:29 2016 +0200

--
 CHANGES.txt |  1 +
 .../apache/cassandra/db/ColumnFamilyStore.java  |  7 +-
 .../cassandra/db/ColumnFamilyMetricTest.java| 26 
 3 files changed, 33 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7232d72c/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index ae9ef7a..682f12b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.9
+ * Limit colUpdateTimeDelta histogram updates to reasonable deltas 
(CASSANDRA-7)
  * Fix leak errors and execution rejected exceptions when draining 
(CASSANDRA-12457)
  * Fix merkle tree depth calculation (CASSANDRA-12580)
  * Make Collections deserialization more robust (CASSANDRA-12618)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7232d72c/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
--
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java 
b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 644d1f5..c6b69dc 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -1347,8 +1347,13 @@ public class ColumnFamilyStore implements 
ColumnFamilyStoreMBean
 maybeUpdateRowCache(key);
 metric.samplers.get(Sampler.WRITES).addSample(key.getKey(), 
key.hashCode(), 1);
 metric.writeLatency.addNano(System.nanoTime() - start);
+// CASSANDRA-7 - certain resolution paths on memtable put can 
result in very
+// large time deltas, either through a variety of sentinel timestamps 
(used for empty values, ensuring
+// a minimal write, etc). This limits the time delta to the max value 
the histogram
+// can bucket correctly. This also filters the Long.MAX_VALUE case 
where there was no previous value
+// to update.
 if(timeDelta < Long.MAX_VALUE)
-metric.colUpdateTimeDeltaHistogram.update(timeDelta);
+
metric.colUpdateTimeDeltaHistogram.update(Math.min(18165375903306L, timeDelta));
 }
 
 /**

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7232d72c/test/unit/org/apache/cassandra/db/ColumnFamilyMetricTest.java
--
diff --git a/test/unit/org/apache/cassandra/db/ColumnFamilyMetricTest.java 
b/test/unit/org/apache/cassandra/db/ColumnFamilyMetricTest.java
index 1337564..2d89e09 100644
--- a/test/unit/org/apache/cassandra/db/ColumnFamilyMetricTest.java
+++ b/test/unit/org/apache/cassandra/db/ColumnFamilyMetricTest.java
@@ -103,4 +103,30 @@ public class ColumnFamilyMetricTest
 
 store.enableAutoCompaction();
 }
+
+@Test
+public void testColUpdateTimeDeltaFiltering()
+{
+Keyspace keyspace = Keyspace.open("Keyspace1");
+ColumnFamilyStore store = keyspace.getColumnFamilyStore("Standard2");
+
+// This confirms another test/set up did not overflow the histogram
+
store.metric.colUpdateTimeDeltaHistogram.cf.getSnapshot().get999thPercentile();
+
+ByteBuffer key = ByteBufferUtil.bytes(4242);
+Mutation m = new Mutation("Keyspace1", key);
+m.add("Standard2", cellname("0"), ByteBufferUtil.bytes("0"), 0);
+m.apply();
+
+// The histogram should not have overflowed on the first write
+
store.metric.colUpdateTimeDeltaHistogram.cf.getSnapshot().get999thPercentile();
+
+m = new Mutation("Keyspace1", key);
+// smallest time delta that would overflow the histogram if unfiltered
+m.add("Standard2", cellname("0"), ByteBufferUtil.bytes("1"), 
18165375903307L);
+m.apply();
+
+// CASSANDRA-7 - update with large timestamp delta should not 
overflow the histogram
+

[02/10] cassandra git commit: Limit colUpdateTimeDelta histogram updates to reasonable deltas

2016-10-13 Thread marcuse
Limit colUpdateTimeDelta histogram updates to reasonable deltas

patch by Joel Knighton; reviewed by Marcus Eriksson for CASSANDRA-7


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7232d72c
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7232d72c
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7232d72c

Branch: refs/heads/cassandra-3.0
Commit: 7232d72c0f375f8034b506d05278bf8ec975a36a
Parents: ff5c497
Author: Joel Knighton 
Authored: Thu Sep 29 21:56:27 2016 -0500
Committer: Marcus Eriksson 
Committed: Thu Oct 13 15:01:29 2016 +0200

--
 CHANGES.txt |  1 +
 .../apache/cassandra/db/ColumnFamilyStore.java  |  7 +-
 .../cassandra/db/ColumnFamilyMetricTest.java| 26 
 3 files changed, 33 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7232d72c/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index ae9ef7a..682f12b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.9
+ * Limit colUpdateTimeDelta histogram updates to reasonable deltas 
(CASSANDRA-7)
  * Fix leak errors and execution rejected exceptions when draining 
(CASSANDRA-12457)
  * Fix merkle tree depth calculation (CASSANDRA-12580)
  * Make Collections deserialization more robust (CASSANDRA-12618)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7232d72c/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
--
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java 
b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 644d1f5..c6b69dc 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -1347,8 +1347,13 @@ public class ColumnFamilyStore implements 
ColumnFamilyStoreMBean
 maybeUpdateRowCache(key);
 metric.samplers.get(Sampler.WRITES).addSample(key.getKey(), 
key.hashCode(), 1);
 metric.writeLatency.addNano(System.nanoTime() - start);
+// CASSANDRA-7 - certain resolution paths on memtable put can 
result in very
+// large time deltas, either through a variety of sentinel timestamps 
(used for empty values, ensuring
+// a minimal write, etc). This limits the time delta to the max value 
the histogram
+// can bucket correctly. This also filters the Long.MAX_VALUE case 
where there was no previous value
+// to update.
 if(timeDelta < Long.MAX_VALUE)
-metric.colUpdateTimeDeltaHistogram.update(timeDelta);
+
metric.colUpdateTimeDeltaHistogram.update(Math.min(18165375903306L, timeDelta));
 }
 
 /**

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7232d72c/test/unit/org/apache/cassandra/db/ColumnFamilyMetricTest.java
--
diff --git a/test/unit/org/apache/cassandra/db/ColumnFamilyMetricTest.java 
b/test/unit/org/apache/cassandra/db/ColumnFamilyMetricTest.java
index 1337564..2d89e09 100644
--- a/test/unit/org/apache/cassandra/db/ColumnFamilyMetricTest.java
+++ b/test/unit/org/apache/cassandra/db/ColumnFamilyMetricTest.java
@@ -103,4 +103,30 @@ public class ColumnFamilyMetricTest
 
 store.enableAutoCompaction();
 }
+
+@Test
+public void testColUpdateTimeDeltaFiltering()
+{
+Keyspace keyspace = Keyspace.open("Keyspace1");
+ColumnFamilyStore store = keyspace.getColumnFamilyStore("Standard2");
+
+// This confirms another test/set up did not overflow the histogram
+
store.metric.colUpdateTimeDeltaHistogram.cf.getSnapshot().get999thPercentile();
+
+ByteBuffer key = ByteBufferUtil.bytes(4242);
+Mutation m = new Mutation("Keyspace1", key);
+m.add("Standard2", cellname("0"), ByteBufferUtil.bytes("0"), 0);
+m.apply();
+
+// The histogram should not have overflowed on the first write
+
store.metric.colUpdateTimeDeltaHistogram.cf.getSnapshot().get999thPercentile();
+
+m = new Mutation("Keyspace1", key);
+// smallest time delta that would overflow the histogram if unfiltered
+m.add("Standard2", cellname("0"), ByteBufferUtil.bytes("1"), 
18165375903307L);
+m.apply();
+
+// CASSANDRA-7 - update with large timestamp delta should not 
overflow the histogram
+
store.metric.colUpdateTimeDeltaHistogram.cf.getSnapshot().get999thPercentile();
+}
 }



[06/10] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0

2016-10-13 Thread marcuse
Merge branch 'cassandra-2.2' into cassandra-3.0


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7a274dd3
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7a274dd3
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7a274dd3

Branch: refs/heads/cassandra-3.0
Commit: 7a274dd36cd6e6bd5c1c5e8d7645945ba74bfa84
Parents: 76f1750 7232d72
Author: Marcus Eriksson 
Authored: Thu Oct 13 15:02:19 2016 +0200
Committer: Marcus Eriksson 
Committed: Thu Oct 13 15:03:00 2016 +0200

--
 CHANGES.txt |  1 +
 .../apache/cassandra/db/ColumnFamilyStore.java  |  7 -
 .../cassandra/db/ColumnFamilyMetricTest.java| 29 
 3 files changed, 36 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7a274dd3/CHANGES.txt
--
diff --cc CHANGES.txt
index 13800da,682f12b..dc7bcab
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,21 -1,5 +1,22 @@@
 -2.2.9
 +3.0.10
 + * Split materialized view mutations on build to prevent OOM (CASSANDRA-12268)
 + * mx4j does not work in 3.0.8 (CASSANDRA-12274)
 + * Abort cqlsh copy-from in case of no answer after prolonged period of time 
(CASSANDRA-12740)
 + * Avoid sstable corrupt exception due to dropped static column 
(CASSANDRA-12582)
 + * Make stress use client mode to avoid checking commit log size on startup 
(CASSANDRA-12478)
 + * Fix exceptions with new vnode allocation (CASSANDRA-12715)
 + * Unify drain and shutdown processes (CASSANDRA-12509)
 + * Fix NPE in ComponentOfSlice.isEQ() (CASSANDRA-12706)
 + * Fix failure in LogTransactionTest (CASSANDRA-12632)
 + * Fix potentially incomplete non-frozen UDT values when querying with the
 +   full primary key specified (CASSANDRA-12605)
 + * Skip writing MV mutations to commitlog on mutation.applyUnsafe() 
(CASSANDRA-11670)
 + * Establish consistent distinction between non-existing partition and NULL 
value for LWTs on static columns (CASSANDRA-12060)
 + * Extend ColumnIdentifier.internedInstances key to include the type that 
generated the byte buffer (CASSANDRA-12516)
 + * Backport CASSANDRA-10756 (race condition in NativeTransportService 
shutdown) (CASSANDRA-12472)
 + * If CF has no clustering columns, any row cache is full partition cache 
(CASSANDRA-12499)
 +Merged from 2.2:
+  * Limit colUpdateTimeDelta histogram updates to reasonable deltas 
(CASSANDRA-7)
   * Fix leak errors and execution rejected exceptions when draining 
(CASSANDRA-12457)
   * Fix merkle tree depth calculation (CASSANDRA-12580)
   * Make Collections deserialization more robust (CASSANDRA-12618)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7a274dd3/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
--
diff --cc src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index fb3665b,c6b69dc..adfd1af
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@@ -1184,23 -1343,104 +1184,28 @@@ public class ColumnFamilyStore implemen
  {
  long start = System.nanoTime();
  Memtable mt = data.getMemtableFor(opGroup, replayPosition);
 -final long timeDelta = mt.put(key, columnFamily, indexer, opGroup);
 -maybeUpdateRowCache(key);
 -metric.samplers.get(Sampler.WRITES).addSample(key.getKey(), 
key.hashCode(), 1);
 -metric.writeLatency.addNano(System.nanoTime() - start);
 -// CASSANDRA-7 - certain resolution paths on memtable put can 
result in very
 -// large time deltas, either through a variety of sentinel timestamps 
(used for empty values, ensuring
 -// a minimal write, etc). This limits the time delta to the max value 
the histogram
 -// can bucket correctly. This also filters the Long.MAX_VALUE case 
where there was no previous value
 -// to update.
 -if(timeDelta < Long.MAX_VALUE)
 -
metric.colUpdateTimeDeltaHistogram.update(Math.min(18165375903306L, timeDelta));
 -}
 -
 -/**
 - * Purges gc-able top-level and range tombstones, returning `cf` if there 
are any columns or tombstones left,
 - * null otherwise.
 - * @param gcBefore a timestamp (in seconds); tombstones with a 
localDeletionTime before this will be purged
 - */
 -public static ColumnFamily removeDeletedCF(ColumnFamily cf, int gcBefore)
 -{
 -// purge old top-level and range tombstones
 -cf.purgeTombstones(gcBefore);
 -
 -// if there are no columns or tombstones left, return null
 -return !cf.hasColumns() && !cf.isMarkedForDelete() ? null : cf;
 -}
 -
 -/**
 -

[05/10] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0

2016-10-13 Thread marcuse
Merge branch 'cassandra-2.2' into cassandra-3.0


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7a274dd3
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7a274dd3
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7a274dd3

Branch: refs/heads/cassandra-3.X
Commit: 7a274dd36cd6e6bd5c1c5e8d7645945ba74bfa84
Parents: 76f1750 7232d72
Author: Marcus Eriksson 
Authored: Thu Oct 13 15:02:19 2016 +0200
Committer: Marcus Eriksson 
Committed: Thu Oct 13 15:03:00 2016 +0200

--
 CHANGES.txt |  1 +
 .../apache/cassandra/db/ColumnFamilyStore.java  |  7 -
 .../cassandra/db/ColumnFamilyMetricTest.java| 29 
 3 files changed, 36 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7a274dd3/CHANGES.txt
--
diff --cc CHANGES.txt
index 13800da,682f12b..dc7bcab
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,21 -1,5 +1,22 @@@
 -2.2.9
 +3.0.10
 + * Split materialized view mutations on build to prevent OOM (CASSANDRA-12268)
 + * mx4j does not work in 3.0.8 (CASSANDRA-12274)
 + * Abort cqlsh copy-from in case of no answer after prolonged period of time 
(CASSANDRA-12740)
 + * Avoid sstable corrupt exception due to dropped static column 
(CASSANDRA-12582)
 + * Make stress use client mode to avoid checking commit log size on startup 
(CASSANDRA-12478)
 + * Fix exceptions with new vnode allocation (CASSANDRA-12715)
 + * Unify drain and shutdown processes (CASSANDRA-12509)
 + * Fix NPE in ComponentOfSlice.isEQ() (CASSANDRA-12706)
 + * Fix failure in LogTransactionTest (CASSANDRA-12632)
 + * Fix potentially incomplete non-frozen UDT values when querying with the
 +   full primary key specified (CASSANDRA-12605)
 + * Skip writing MV mutations to commitlog on mutation.applyUnsafe() 
(CASSANDRA-11670)
 + * Establish consistent distinction between non-existing partition and NULL 
value for LWTs on static columns (CASSANDRA-12060)
 + * Extend ColumnIdentifier.internedInstances key to include the type that 
generated the byte buffer (CASSANDRA-12516)
 + * Backport CASSANDRA-10756 (race condition in NativeTransportService 
shutdown) (CASSANDRA-12472)
 + * If CF has no clustering columns, any row cache is full partition cache 
(CASSANDRA-12499)
 +Merged from 2.2:
+  * Limit colUpdateTimeDelta histogram updates to reasonable deltas 
(CASSANDRA-7)
   * Fix leak errors and execution rejected exceptions when draining 
(CASSANDRA-12457)
   * Fix merkle tree depth calculation (CASSANDRA-12580)
   * Make Collections deserialization more robust (CASSANDRA-12618)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7a274dd3/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
--
diff --cc src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index fb3665b,c6b69dc..adfd1af
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@@ -1184,23 -1343,104 +1184,28 @@@ public class ColumnFamilyStore implemen
  {
  long start = System.nanoTime();
  Memtable mt = data.getMemtableFor(opGroup, replayPosition);
 -final long timeDelta = mt.put(key, columnFamily, indexer, opGroup);
 -maybeUpdateRowCache(key);
 -metric.samplers.get(Sampler.WRITES).addSample(key.getKey(), 
key.hashCode(), 1);
 -metric.writeLatency.addNano(System.nanoTime() - start);
 -// CASSANDRA-7 - certain resolution paths on memtable put can 
result in very
 -// large time deltas, either through a variety of sentinel timestamps 
(used for empty values, ensuring
 -// a minimal write, etc). This limits the time delta to the max value 
the histogram
 -// can bucket correctly. This also filters the Long.MAX_VALUE case 
where there was no previous value
 -// to update.
 -if(timeDelta < Long.MAX_VALUE)
 -
metric.colUpdateTimeDeltaHistogram.update(Math.min(18165375903306L, timeDelta));
 -}
 -
 -/**
 - * Purges gc-able top-level and range tombstones, returning `cf` if there 
are any columns or tombstones left,
 - * null otherwise.
 - * @param gcBefore a timestamp (in seconds); tombstones with a 
localDeletionTime before this will be purged
 - */
 -public static ColumnFamily removeDeletedCF(ColumnFamily cf, int gcBefore)
 -{
 -// purge old top-level and range tombstones
 -cf.purgeTombstones(gcBefore);
 -
 -// if there are no columns or tombstones left, return null
 -return !cf.hasColumns() && !cf.isMarkedForDelete() ? null : cf;
 -}
 -
 -/**
 -

[07/10] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0

2016-10-13 Thread marcuse
Merge branch 'cassandra-2.2' into cassandra-3.0


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7a274dd3
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7a274dd3
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7a274dd3

Branch: refs/heads/trunk
Commit: 7a274dd36cd6e6bd5c1c5e8d7645945ba74bfa84
Parents: 76f1750 7232d72
Author: Marcus Eriksson 
Authored: Thu Oct 13 15:02:19 2016 +0200
Committer: Marcus Eriksson 
Committed: Thu Oct 13 15:03:00 2016 +0200

--
 CHANGES.txt |  1 +
 .../apache/cassandra/db/ColumnFamilyStore.java  |  7 -
 .../cassandra/db/ColumnFamilyMetricTest.java| 29 
 3 files changed, 36 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7a274dd3/CHANGES.txt
--
diff --cc CHANGES.txt
index 13800da,682f12b..dc7bcab
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,21 -1,5 +1,22 @@@
 -2.2.9
 +3.0.10
 + * Split materialized view mutations on build to prevent OOM (CASSANDRA-12268)
 + * mx4j does not work in 3.0.8 (CASSANDRA-12274)
 + * Abort cqlsh copy-from in case of no answer after prolonged period of time 
(CASSANDRA-12740)
 + * Avoid sstable corrupt exception due to dropped static column 
(CASSANDRA-12582)
 + * Make stress use client mode to avoid checking commit log size on startup 
(CASSANDRA-12478)
 + * Fix exceptions with new vnode allocation (CASSANDRA-12715)
 + * Unify drain and shutdown processes (CASSANDRA-12509)
 + * Fix NPE in ComponentOfSlice.isEQ() (CASSANDRA-12706)
 + * Fix failure in LogTransactionTest (CASSANDRA-12632)
 + * Fix potentially incomplete non-frozen UDT values when querying with the
 +   full primary key specified (CASSANDRA-12605)
 + * Skip writing MV mutations to commitlog on mutation.applyUnsafe() 
(CASSANDRA-11670)
 + * Establish consistent distinction between non-existing partition and NULL 
value for LWTs on static columns (CASSANDRA-12060)
 + * Extend ColumnIdentifier.internedInstances key to include the type that 
generated the byte buffer (CASSANDRA-12516)
 + * Backport CASSANDRA-10756 (race condition in NativeTransportService 
shutdown) (CASSANDRA-12472)
 + * If CF has no clustering columns, any row cache is full partition cache 
(CASSANDRA-12499)
 +Merged from 2.2:
+  * Limit colUpdateTimeDelta histogram updates to reasonable deltas 
(CASSANDRA-7)
   * Fix leak errors and execution rejected exceptions when draining 
(CASSANDRA-12457)
   * Fix merkle tree depth calculation (CASSANDRA-12580)
   * Make Collections deserialization more robust (CASSANDRA-12618)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7a274dd3/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
--
diff --cc src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index fb3665b,c6b69dc..adfd1af
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@@ -1184,23 -1343,104 +1184,28 @@@ public class ColumnFamilyStore implemen
  {
  long start = System.nanoTime();
  Memtable mt = data.getMemtableFor(opGroup, replayPosition);
 -final long timeDelta = mt.put(key, columnFamily, indexer, opGroup);
 -maybeUpdateRowCache(key);
 -metric.samplers.get(Sampler.WRITES).addSample(key.getKey(), 
key.hashCode(), 1);
 -metric.writeLatency.addNano(System.nanoTime() - start);
 -// CASSANDRA-7 - certain resolution paths on memtable put can 
result in very
 -// large time deltas, either through a variety of sentinel timestamps 
(used for empty values, ensuring
 -// a minimal write, etc). This limits the time delta to the max value 
the histogram
 -// can bucket correctly. This also filters the Long.MAX_VALUE case 
where there was no previous value
 -// to update.
 -if(timeDelta < Long.MAX_VALUE)
 -
metric.colUpdateTimeDeltaHistogram.update(Math.min(18165375903306L, timeDelta));
 -}
 -
 -/**
 - * Purges gc-able top-level and range tombstones, returning `cf` if there 
are any columns or tombstones left,
 - * null otherwise.
 - * @param gcBefore a timestamp (in seconds); tombstones with a 
localDeletionTime before this will be purged
 - */
 -public static ColumnFamily removeDeletedCF(ColumnFamily cf, int gcBefore)
 -{
 -// purge old top-level and range tombstones
 -cf.purgeTombstones(gcBefore);
 -
 -// if there are no columns or tombstones left, return null
 -return !cf.hasColumns() && !cf.isMarkedForDelete() ? null : cf;
 -}
 -
 -/**
 - * 

[08/10] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.X

2016-10-13 Thread marcuse
Merge branch 'cassandra-3.0' into cassandra-3.X


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/2931a193
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/2931a193
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/2931a193

Branch: refs/heads/cassandra-3.X
Commit: 2931a1938db4de877f2e1e3c2916e0f308dafa3e
Parents: a041908 7a274dd
Author: Marcus Eriksson 
Authored: Thu Oct 13 15:08:58 2016 +0200
Committer: Marcus Eriksson 
Committed: Thu Oct 13 15:08:58 2016 +0200

--
 CHANGES.txt |  1 +
 .../apache/cassandra/db/ColumnFamilyStore.java  |  7 -
 .../cassandra/db/ColumnFamilyMetricTest.java| 29 
 3 files changed, 36 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2931a193/CHANGES.txt
--
diff --cc CHANGES.txt
index f0df0e6,dc7bcab..c0b1b20
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -109,61 -45,12 +109,62 @@@ Merged from 3.0
   * Disk failure policy should not be invoked on out of space (CASSANDRA-12385)
   * Calculate last compacted key on startup (CASSANDRA-6216)
   * Add schema to snapshot manifest, add USING TIMESTAMP clause to ALTER TABLE 
statements (CASSANDRA-7190)
 + * If CF has no clustering columns, any row cache is full partition cache 
(CASSANDRA-12499)
 +Merged from 2.2:
++ * Limit colUpdateTimeDelta histogram updates to reasonable deltas 
(CASSANDRA-7)
 + * Fix leak errors and execution rejected exceptions when draining 
(CASSANDRA-12457)
 + * Fix merkle tree depth calculation (CASSANDRA-12580)
 + * Make Collections deserialization more robust (CASSANDRA-12618)
 + * Better handle invalid system roles table (CASSANDRA-12700)
 + * Fix exceptions when enabling gossip on nodes that haven't joined the ring 
(CASSANDRA-12253)
 + * Fix authentication problem when invoking cqlsh copy from a SOURCE command 
(CASSANDRA-12642)
 + * Decrement pending range calculator jobs counter in finally block
 + * cqlshlib tests: increase default execute timeout (CASSANDRA-12481)
 + * Forward writes to replacement node when replace_address != 
broadcast_address (CASSANDRA-8523)
 + * Fail repair on non-existing table (CASSANDRA-12279)
 + * Enable repair -pr and -local together (fix regression of CASSANDRA-7450) 
(CASSANDRA-12522)
 +
 +
 +3.8, 3.9
 + * Fix value skipping with counter columns (CASSANDRA-11726)
 + * Fix nodetool tablestats miss SSTable count (CASSANDRA-12205)
 + * Fixed flacky SSTablesIteratedTest (CASSANDRA-12282)
 + * Fixed flacky SSTableRewriterTest: check file counts before calling 
validateCFS (CASSANDRA-12348)
 + * cqlsh: Fix handling of $$-escaped strings (CASSANDRA-12189)
 + * Fix SSL JMX requiring truststore containing server cert (CASSANDRA-12109)
 + * RTE from new CDC column breaks in flight queries (CASSANDRA-12236)
 + * Fix hdr logging for single operation workloads (CASSANDRA-12145)
 + * Fix SASI PREFIX search in CONTAINS mode with partial terms 
(CASSANDRA-12073)
 + * Increase size of flushExecutor thread pool (CASSANDRA-12071)
 + * Partial revert of CASSANDRA-11971, cannot recycle buffer in 
SP.sendMessagesToNonlocalDC (CASSANDRA-11950)
 + * Upgrade netty to 4.0.39 (CASSANDRA-12032, CASSANDRA-12034)
 + * Improve details in compaction log message (CASSANDRA-12080)
 + * Allow unset values in CQLSSTableWriter (CASSANDRA-11911)
 + * Chunk cache to request compressor-compatible buffers if pool space is 
exhausted (CASSANDRA-11993)
 + * Remove DatabaseDescriptor dependencies from SequentialWriter 
(CASSANDRA-11579)
 + * Move skip_stop_words filter before stemming (CASSANDRA-12078)
 + * Support seek() in EncryptedFileSegmentInputStream (CASSANDRA-11957)
 + * SSTable tools mishandling LocalPartitioner (CASSANDRA-12002)
 + * When SEPWorker assigned work, set thread name to match pool 
(CASSANDRA-11966)
 + * Add cross-DC latency metrics (CASSANDRA-11596)
 + * Allow terms in selection clause (CASSANDRA-10783)
 + * Add bind variables to trace (CASSANDRA-11719)
 + * Switch counter shards' clock to timestamps (CASSANDRA-9811)
 + * Introduce HdrHistogram and response/service/wait separation to stress tool 
(CASSANDRA-11853)
 + * entry-weighers in QueryProcessor should respect partitionKeyBindIndexes 
field (CASSANDRA-11718)
 + * Support older ant versions (CASSANDRA-11807)
 + * Estimate compressed on disk size when deciding if sstable size limit 
reached (CASSANDRA-11623)
 + * cassandra-stress profiles should support case sensitive schemas 
(CASSANDRA-11546)
 + * Remove DatabaseDescriptor dependency from FileUtils (CASSANDRA-11578)
 + * Faster streaming (CASSANDRA-9766)
 + * Add prepared query parameter to trace for "Execute CQL3 prepared query" 
session 

[10/10] cassandra git commit: Merge branch 'cassandra-3.X' into trunk

2016-10-13 Thread marcuse
Merge branch 'cassandra-3.X' into trunk


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a48ebbcf
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a48ebbcf
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a48ebbcf

Branch: refs/heads/trunk
Commit: a48ebbcf06162fb90448e1eefd8a58dbf4d807e2
Parents: a83aeba 2931a19
Author: Marcus Eriksson 
Authored: Thu Oct 13 15:09:14 2016 +0200
Committer: Marcus Eriksson 
Committed: Thu Oct 13 15:09:14 2016 +0200

--
 CHANGES.txt |  1 +
 .../apache/cassandra/db/ColumnFamilyStore.java  |  7 -
 .../cassandra/db/ColumnFamilyMetricTest.java| 29 
 3 files changed, 36 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a48ebbcf/CHANGES.txt
--



[04/10] cassandra git commit: Limit colUpdateTimeDelta histogram updates to reasonable deltas

2016-10-13 Thread marcuse
Limit colUpdateTimeDelta histogram updates to reasonable deltas

patch by Joel Knighton; reviewed by Marcus Eriksson for CASSANDRA-7


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7232d72c
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7232d72c
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7232d72c

Branch: refs/heads/trunk
Commit: 7232d72c0f375f8034b506d05278bf8ec975a36a
Parents: ff5c497
Author: Joel Knighton 
Authored: Thu Sep 29 21:56:27 2016 -0500
Committer: Marcus Eriksson 
Committed: Thu Oct 13 15:01:29 2016 +0200

--
 CHANGES.txt |  1 +
 .../apache/cassandra/db/ColumnFamilyStore.java  |  7 +-
 .../cassandra/db/ColumnFamilyMetricTest.java| 26 
 3 files changed, 33 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7232d72c/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index ae9ef7a..682f12b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.9
+ * Limit colUpdateTimeDelta histogram updates to reasonable deltas 
(CASSANDRA-7)
  * Fix leak errors and execution rejected exceptions when draining 
(CASSANDRA-12457)
  * Fix merkle tree depth calculation (CASSANDRA-12580)
  * Make Collections deserialization more robust (CASSANDRA-12618)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7232d72c/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
--
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java 
b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 644d1f5..c6b69dc 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -1347,8 +1347,13 @@ public class ColumnFamilyStore implements 
ColumnFamilyStoreMBean
 maybeUpdateRowCache(key);
 metric.samplers.get(Sampler.WRITES).addSample(key.getKey(), 
key.hashCode(), 1);
 metric.writeLatency.addNano(System.nanoTime() - start);
+// CASSANDRA-7 - certain resolution paths on memtable put can 
result in very
+// large time deltas, either through a variety of sentinel timestamps 
(used for empty values, ensuring
+// a minimal write, etc). This limits the time delta to the max value 
the histogram
+// can bucket correctly. This also filters the Long.MAX_VALUE case 
where there was no previous value
+// to update.
 if(timeDelta < Long.MAX_VALUE)
-metric.colUpdateTimeDeltaHistogram.update(timeDelta);
+
metric.colUpdateTimeDeltaHistogram.update(Math.min(18165375903306L, timeDelta));
 }
 
 /**

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7232d72c/test/unit/org/apache/cassandra/db/ColumnFamilyMetricTest.java
--
diff --git a/test/unit/org/apache/cassandra/db/ColumnFamilyMetricTest.java 
b/test/unit/org/apache/cassandra/db/ColumnFamilyMetricTest.java
index 1337564..2d89e09 100644
--- a/test/unit/org/apache/cassandra/db/ColumnFamilyMetricTest.java
+++ b/test/unit/org/apache/cassandra/db/ColumnFamilyMetricTest.java
@@ -103,4 +103,30 @@ public class ColumnFamilyMetricTest
 
 store.enableAutoCompaction();
 }
+
+@Test
+public void testColUpdateTimeDeltaFiltering()
+{
+Keyspace keyspace = Keyspace.open("Keyspace1");
+ColumnFamilyStore store = keyspace.getColumnFamilyStore("Standard2");
+
+// This confirms another test/set up did not overflow the histogram
+
store.metric.colUpdateTimeDeltaHistogram.cf.getSnapshot().get999thPercentile();
+
+ByteBuffer key = ByteBufferUtil.bytes(4242);
+Mutation m = new Mutation("Keyspace1", key);
+m.add("Standard2", cellname("0"), ByteBufferUtil.bytes("0"), 0);
+m.apply();
+
+// The histogram should not have overflowed on the first write
+
store.metric.colUpdateTimeDeltaHistogram.cf.getSnapshot().get999thPercentile();
+
+m = new Mutation("Keyspace1", key);
+// smallest time delta that would overflow the histogram if unfiltered
+m.add("Standard2", cellname("0"), ByteBufferUtil.bytes("1"), 
18165375903307L);
+m.apply();
+
+// CASSANDRA-7 - update with large timestamp delta should not 
overflow the histogram
+
store.metric.colUpdateTimeDeltaHistogram.cf.getSnapshot().get999thPercentile();
+}
 }



[03/10] cassandra git commit: Limit colUpdateTimeDelta histogram updates to reasonable deltas

2016-10-13 Thread marcuse
Limit colUpdateTimeDelta histogram updates to reasonable deltas

patch by Joel Knighton; reviewed by Marcus Eriksson for CASSANDRA-7


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7232d72c
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7232d72c
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7232d72c

Branch: refs/heads/cassandra-3.X
Commit: 7232d72c0f375f8034b506d05278bf8ec975a36a
Parents: ff5c497
Author: Joel Knighton 
Authored: Thu Sep 29 21:56:27 2016 -0500
Committer: Marcus Eriksson 
Committed: Thu Oct 13 15:01:29 2016 +0200

--
 CHANGES.txt |  1 +
 .../apache/cassandra/db/ColumnFamilyStore.java  |  7 +-
 .../cassandra/db/ColumnFamilyMetricTest.java| 26 
 3 files changed, 33 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7232d72c/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index ae9ef7a..682f12b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.9
+ * Limit colUpdateTimeDelta histogram updates to reasonable deltas 
(CASSANDRA-7)
  * Fix leak errors and execution rejected exceptions when draining 
(CASSANDRA-12457)
  * Fix merkle tree depth calculation (CASSANDRA-12580)
  * Make Collections deserialization more robust (CASSANDRA-12618)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7232d72c/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
--
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java 
b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 644d1f5..c6b69dc 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -1347,8 +1347,13 @@ public class ColumnFamilyStore implements 
ColumnFamilyStoreMBean
 maybeUpdateRowCache(key);
 metric.samplers.get(Sampler.WRITES).addSample(key.getKey(), 
key.hashCode(), 1);
 metric.writeLatency.addNano(System.nanoTime() - start);
+// CASSANDRA-7 - certain resolution paths on memtable put can 
result in very
+// large time deltas, either through a variety of sentinel timestamps 
(used for empty values, ensuring
+// a minimal write, etc). This limits the time delta to the max value 
the histogram
+// can bucket correctly. This also filters the Long.MAX_VALUE case 
where there was no previous value
+// to update.
 if(timeDelta < Long.MAX_VALUE)
-metric.colUpdateTimeDeltaHistogram.update(timeDelta);
+
metric.colUpdateTimeDeltaHistogram.update(Math.min(18165375903306L, timeDelta));
 }
 
 /**

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7232d72c/test/unit/org/apache/cassandra/db/ColumnFamilyMetricTest.java
--
diff --git a/test/unit/org/apache/cassandra/db/ColumnFamilyMetricTest.java 
b/test/unit/org/apache/cassandra/db/ColumnFamilyMetricTest.java
index 1337564..2d89e09 100644
--- a/test/unit/org/apache/cassandra/db/ColumnFamilyMetricTest.java
+++ b/test/unit/org/apache/cassandra/db/ColumnFamilyMetricTest.java
@@ -103,4 +103,30 @@ public class ColumnFamilyMetricTest
 
 store.enableAutoCompaction();
 }
+
+@Test
+public void testColUpdateTimeDeltaFiltering()
+{
+Keyspace keyspace = Keyspace.open("Keyspace1");
+ColumnFamilyStore store = keyspace.getColumnFamilyStore("Standard2");
+
+// This confirms another test/set up did not overflow the histogram
+
store.metric.colUpdateTimeDeltaHistogram.cf.getSnapshot().get999thPercentile();
+
+ByteBuffer key = ByteBufferUtil.bytes(4242);
+Mutation m = new Mutation("Keyspace1", key);
+m.add("Standard2", cellname("0"), ByteBufferUtil.bytes("0"), 0);
+m.apply();
+
+// The histogram should not have overflowed on the first write
+
store.metric.colUpdateTimeDeltaHistogram.cf.getSnapshot().get999thPercentile();
+
+m = new Mutation("Keyspace1", key);
+// smallest time delta that would overflow the histogram if unfiltered
+m.add("Standard2", cellname("0"), ByteBufferUtil.bytes("1"), 
18165375903307L);
+m.apply();
+
+// CASSANDRA-7 - update with large timestamp delta should not 
overflow the histogram
+
store.metric.colUpdateTimeDeltaHistogram.cf.getSnapshot().get999thPercentile();
+}
 }



[jira] [Commented] (CASSANDRA-11299) AssertionError when quering by secondary index

2016-10-13 Thread nitika achra (JIRA)

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

nitika achra commented on CASSANDRA-11299:
--

We are facing the same issue. but we have not migrated from older to newer 
version  and using Cassandra 3.7 . 
We faced SSTableCorruption so followed 
https://engineering.gosquared.com/dealing-corrupt-sstable-cassandra . After 
this the corrupted SSTable were gone but . now we are not able to query on some 
of secondary index values . while some work .
getting the same exception . Please let us know what to do . 

WARN  [SharedPool-Worker-1] 2016-10-13 12:13:00,958 
AbstractLocalAwareExecutorService.java:169 - Uncaught exception on thread 
Thread[SharedPool-Worker-1,5,main]: {}
java.lang.AssertionError: null
at 
org.apache.cassandra.index.internal.composites.CompositesSearcher$1Transform.findEntry(CompositesSearcher.java:281)
 ~[apache-cassandra-3.7.0.jar:3.7.0]
at 
org.apache.cassandra.index.internal.composites.CompositesSearcher$1Transform.applyToRow(CompositesSearcher.java:260)
 ~[apache-cassandra-3.7.0.jar:3.7.0]
at 
org.apache.cassandra.db.transform.BaseRows.hasNext(BaseRows.java:120) 
~[apache-cassandra-3.7.0.jar:3.7.0]
at 
org.apache.cassandra.db.rows.UnfilteredRowIteratorSerializer.serialize(UnfilteredRowIteratorSerializer.java:133)
 ~[apache-cassandra-3.7.0.jar:3.7.0]
at 
org.apache.cassandra.db.rows.UnfilteredRowIteratorSerializer.serialize(UnfilteredRowIteratorSerializer.java:89)
 ~[apache-cassandra-3.7.0.jar:3.7.0]
at 
org.apache.cassandra.db.rows.UnfilteredRowIteratorSerializer.serialize(UnfilteredRowIteratorSerializer.java:79)
 ~[apache-cassandra-3.7.0.jar:3.7.0]
at 
org.apache.cassandra.db.partitions.UnfilteredPartitionIterators$Serializer.serialize(UnfilteredPartitionIterators.java:294)
 ~[apache-cassandra-3.7.0.jar:3.7.0]
at 
org.apache.cassandra.db.ReadResponse$LocalDataResponse.build(ReadResponse.java:134)
 ~[apache-cassandra-3.7.0.jar:3.7.0]
at 
org.apache.cassandra.db.ReadResponse$LocalDataResponse.(ReadResponse.java:127)
 ~[apache-cassandra-3.7.0.jar:3.7.0]
at 
org.apache.cassandra.db.ReadResponse$LocalDataResponse.(ReadResponse.java:123)
 ~[apache-cassandra-3.7.0.jar:3.7.0]
at 
org.apache.cassandra.db.ReadResponse.createDataResponse(ReadResponse.java:65) 
~[apache-cassandra-3.7.0.jar:3.7.0]
at 
org.apache.cassandra.db.ReadCommand.createResponse(ReadCommand.java:292) 
~[apache-cassandra-3.7.0.jar:3.7.0]
at 
org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:1799)
 ~[apache-cassandra-3.7.0.jar:3.7.0]
at 
org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2466)
 ~[apache-cassandra-3.7.0.jar:3.7.0]
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
~[na:1.8.0_101]
at 
org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:164)
 ~[apache-cassandra-3.7.0.jar:3.7.0]
at 
org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$LocalSessionFutureTask.run(AbstractLocalAwareExecutorService.java:136)
 [apache-cassandra-3.7.0.jar:3.7.0]
at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:105) 
[apache-cassandra-3.7.0.jar:3.7.0]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_101]
WARN  [SharedPool-Worker-2] 2016-10-13 12:13:10,851 
AbstractLocalAwareExecutorService.java:169 - Uncaught exception on thread 
Thread[SharedPool-Worker-2,5,main]: {}


> AssertionError when quering by secondary index
> --
>
> Key: CASSANDRA-11299
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11299
> Project: Cassandra
>  Issue Type: Bug
> Environment: Cassandra 3.3
>Reporter: Michał Matłoka
>
> Hi,
> Recently we have upgraded from Cassandra 2.2.4 to 3.3. I have issues with one 
> table. When I try to query using any secondary index I get e.g. in cqlsh
> {code}
> Traceback (most recent call last):
>   File "/usr/bin/cqlsh.py", line 1249, in perform_simple_statement
> result = future.result()
>   File 
> "/usr/share/cassandra/lib/cassandra-driver-internal-only-3.0.0-6af642d.zip/cassandra-driver-3.0.0-6af642d/cassandra/cluster.py",
>  line 3122, in result
> raise self._final_exception
> ReadFailure: code=1300 [Replica(s) failed to execute read] message="Operation 
> failed - received 0 responses and 1 failures" info={'failures': 1, 
> 'received_responses': 0, 'required_responses': 1, 'consistency': 'ONE'}
> {code}
> Node logs shows then:
> {code}
> [[AWARN  [SharedPool-Worker-2] 2016-03-03 00:47:01,679 
> AbstractLocalAwareExecutorService.java:169 - Uncaught exception on thread 
> 

[jira] [Comment Edited] (CASSANDRA-12540) Password Management: Hardcoded Password

2016-10-13 Thread Stefan Podkowinski (JIRA)

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

Stefan Podkowinski edited comment on CASSANDRA-12540 at 10/13/16 12:59 PM:
---

This would have prevented CASSANDRA-12773. There's really no reason not to get 
rid of them.

||trunk||
|[branch|https://github.com/spodkowinski/cassandra/tree/CASSANDRA-12540-trunk]|
|[dtest|http://cassci.datastax.com/view/Dev/view/spodkowinski/job/spodkowinski-CASSANDRA-12540-trunk-dtest/]|
|[testall|http://cassci.datastax.com/view/Dev/view/spodkowinski/job/spodkowinski-CASSANDRA-12540-trunk-testall/]|



was (Author: spo...@gmail.com):
This would have prevented CASSANDRA-12773. There's really no reason not to get 
rid of them.

> Password Management: Hardcoded Password
> ---
>
> Key: CASSANDRA-12540
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12540
> Project: Cassandra
>  Issue Type: Sub-task
>Reporter: Eduardo Aguinaga
> Attachments: 12540-trunk.patch
>
>
> Overview:
> In May through June of 2016 a static analysis was performed on version 3.0.5 
> of the Cassandra source code. The analysis included an automated analysis 
> using HP Fortify v4.21 SCA and a manual analysis utilizing SciTools 
> Understand v4. The results of that analysis includes the issue below.
> Issue:
> In the file EncryptionOptions.java there are hard coded passwords on lines 23 
> and 25.
> {code:java}
> EncryptionOptions.java, lines 20-30:
> 20 public abstract class EncryptionOptions
> 21 {
> 22 public String keystore = "conf/.keystore";
> 23 public String keystore_password = "cassandra";
> 24 public String truststore = "conf/.truststore";
> 25 public String truststore_password = "cassandra";
> 26 public String[] cipher_suites = {
> 27 "TLS_RSA_WITH_AES_128_CBC_SHA", "TLS_RSA_WITH_AES_256_CBC_SHA",
> 28 "TLS_DHE_RSA_WITH_AES_128_CBC_SHA", 
> "TLS_DHE_RSA_WITH_AES_256_CBC_SHA",
> 29 "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", 
> "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" 
> 30 };
> {code}



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


[jira] [Updated] (CASSANDRA-12540) Password Management: Hardcoded Password

2016-10-13 Thread Stefan Podkowinski (JIRA)

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

Stefan Podkowinski updated CASSANDRA-12540:
---
Attachment: 12540-trunk.patch

> Password Management: Hardcoded Password
> ---
>
> Key: CASSANDRA-12540
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12540
> Project: Cassandra
>  Issue Type: Sub-task
>Reporter: Eduardo Aguinaga
> Attachments: 12540-trunk.patch
>
>
> Overview:
> In May through June of 2016 a static analysis was performed on version 3.0.5 
> of the Cassandra source code. The analysis included an automated analysis 
> using HP Fortify v4.21 SCA and a manual analysis utilizing SciTools 
> Understand v4. The results of that analysis includes the issue below.
> Issue:
> In the file EncryptionOptions.java there are hard coded passwords on lines 23 
> and 25.
> {code:java}
> EncryptionOptions.java, lines 20-30:
> 20 public abstract class EncryptionOptions
> 21 {
> 22 public String keystore = "conf/.keystore";
> 23 public String keystore_password = "cassandra";
> 24 public String truststore = "conf/.truststore";
> 25 public String truststore_password = "cassandra";
> 26 public String[] cipher_suites = {
> 27 "TLS_RSA_WITH_AES_128_CBC_SHA", "TLS_RSA_WITH_AES_256_CBC_SHA",
> 28 "TLS_DHE_RSA_WITH_AES_128_CBC_SHA", 
> "TLS_DHE_RSA_WITH_AES_256_CBC_SHA",
> 29 "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", 
> "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" 
> 30 };
> {code}



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


[jira] [Updated] (CASSANDRA-12540) Password Management: Hardcoded Password

2016-10-13 Thread Stefan Podkowinski (JIRA)

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

Stefan Podkowinski updated CASSANDRA-12540:
---
Status: Patch Available  (was: Open)

This would have prevented CASSANDRA-12773. There's really no reason not to get 
rid of them.

> Password Management: Hardcoded Password
> ---
>
> Key: CASSANDRA-12540
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12540
> Project: Cassandra
>  Issue Type: Sub-task
>Reporter: Eduardo Aguinaga
>
> Overview:
> In May through June of 2016 a static analysis was performed on version 3.0.5 
> of the Cassandra source code. The analysis included an automated analysis 
> using HP Fortify v4.21 SCA and a manual analysis utilizing SciTools 
> Understand v4. The results of that analysis includes the issue below.
> Issue:
> In the file EncryptionOptions.java there are hard coded passwords on lines 23 
> and 25.
> {code:java}
> EncryptionOptions.java, lines 20-30:
> 20 public abstract class EncryptionOptions
> 21 {
> 22 public String keystore = "conf/.keystore";
> 23 public String keystore_password = "cassandra";
> 24 public String truststore = "conf/.truststore";
> 25 public String truststore_password = "cassandra";
> 26 public String[] cipher_suites = {
> 27 "TLS_RSA_WITH_AES_128_CBC_SHA", "TLS_RSA_WITH_AES_256_CBC_SHA",
> 28 "TLS_DHE_RSA_WITH_AES_128_CBC_SHA", 
> "TLS_DHE_RSA_WITH_AES_256_CBC_SHA",
> 29 "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", 
> "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" 
> 30 };
> {code}



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


[jira] [Updated] (CASSANDRA-12646) nodetool stopdaemon errors out on stopdaemon

2016-10-13 Thread Alex Petrov (JIRA)

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

Alex Petrov updated CASSANDRA-12646:

Status: Ready to Commit  (was: Patch Available)

> nodetool stopdaemon errors out on stopdaemon
> 
>
> Key: CASSANDRA-12646
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12646
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Tools
>Reporter: Robert Stupp
>Assignee: Robert Stupp
>Priority: Minor
> Fix For: 3.0.x
>
>
> {{nodetool stopdaemon}} works, but it prints a {{java.net.ConnectException: 
> Connection refused}} error message in {{NodeProbe.close()}} - which is 
> expected.
> Attached patch prevents that error message (i.e. it expects {{close()}} to 
> fail for {{stopdaemon}}).
> Additionally, on trunk a call to {{DD.clientInit()}} has been added, because 
> {{JVMStabilityInspector.inspectThrowable}} implicitly requires this.



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


[jira] [Commented] (CASSANDRA-12646) nodetool stopdaemon errors out on stopdaemon

2016-10-13 Thread Alex Petrov (JIRA)

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

Alex Petrov commented on CASSANDRA-12646:
-

LGTM!

Thank you [~snazy]. +1 with changes.txt change and a commit message.

> nodetool stopdaemon errors out on stopdaemon
> 
>
> Key: CASSANDRA-12646
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12646
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Tools
>Reporter: Robert Stupp
>Assignee: Robert Stupp
>Priority: Minor
> Fix For: 3.0.x
>
>
> {{nodetool stopdaemon}} works, but it prints a {{java.net.ConnectException: 
> Connection refused}} error message in {{NodeProbe.close()}} - which is 
> expected.
> Attached patch prevents that error message (i.e. it expects {{close()}} to 
> fail for {{stopdaemon}}).
> Additionally, on trunk a call to {{DD.clientInit()}} has been added, because 
> {{JVMStabilityInspector.inspectThrowable}} implicitly requires this.



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


[jira] [Updated] (CASSANDRA-12773) cassandra-stress error for one way SSL

2016-10-13 Thread Stefan Podkowinski (JIRA)

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

Stefan Podkowinski updated CASSANDRA-12773:
---
Attachment: 12773-2.2.patch

> cassandra-stress error for one way SSL 
> ---
>
> Key: CASSANDRA-12773
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12773
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
>Reporter: Jane Deng
> Attachments: 12773-2.2.patch
>
>
> CASSANDRA-9325 added keystore/truststore configuration into cassandra-stress. 
> However, for one way ssl (require_client_auth=false), there is no need to 
> pass keystore info into ssloptions. Cassadra-stress errored out:
> {noformat}
> java.lang.RuntimeException: java.io.IOException: Error creating the 
> initializing the SSL Context 
> at 
> org.apache.cassandra.stress.settings.StressSettings.getJavaDriverClient(StressSettings.java:200)
>  
> at 
> org.apache.cassandra.stress.settings.SettingsSchema.createKeySpacesNative(SettingsSchema.java:79)
>  
> at 
> org.apache.cassandra.stress.settings.SettingsSchema.createKeySpaces(SettingsSchema.java:69)
>  
> at 
> org.apache.cassandra.stress.settings.StressSettings.maybeCreateKeyspaces(StressSettings.java:207)
>  
> at org.apache.cassandra.stress.StressAction.run(StressAction.java:55) 
> at org.apache.cassandra.stress.Stress.main(Stress.java:117) 
> Caused by: java.io.IOException: Error creating the initializing the SSL 
> Context 
> at 
> org.apache.cassandra.security.SSLFactory.createSSLContext(SSLFactory.java:151)
>  
> at 
> org.apache.cassandra.stress.util.JavaDriverClient.connect(JavaDriverClient.java:128)
>  
> at 
> org.apache.cassandra.stress.settings.StressSettings.getJavaDriverClient(StressSettings.java:191)
>  
> ... 5 more 
> Caused by: java.io.IOException: Keystore was tampered with, or password was 
> incorrect 
> at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:772) 
> at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:55) 
> at java.security.KeyStore.load(KeyStore.java:1445) 
> at 
> org.apache.cassandra.security.SSLFactory.createSSLContext(SSLFactory.java:129)
>  
> ... 7 more 
> Caused by: java.security.UnrecoverableKeyException: Password verification 
> failed 
> at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:770) 
> ... 10 more
> {noformat}
> It's a bug from CASSANDRA-9325. When the keystore is absent, the keystore is 
> assigned to the path of the truststore, but the password isn't taken care.



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


[jira] [Commented] (CASSANDRA-12773) cassandra-stress error for one way SSL

2016-10-13 Thread Stefan Podkowinski (JIRA)

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

Stefan Podkowinski commented on CASSANDRA-12773:


Nice find, thanks for reporting this. You won't run into this issue in case 
you're using the "cassandra" default password, which is what I did while 
working on 9325.

I've now created a patch from your changes and fired up the usual tests. Maybe 
[~tjake] would be interested to have a look and commit this?

||trunk||3.0||2.2||
|[branch|https://github.com/spodkowinski/cassandra/tree/CASSANDRA-12773-trunk]|[branch|https://github.com/spodkowinski/cassandra/tree/CASSANDRA-12773-3.0]|[branch|https://github.com/spodkowinski/cassandra/tree/CASSANDRA-12773-2.2]|
|[dtest|http://cassci.datastax.com/view/Dev/view/spodkowinski/job/spodkowinski-CASSANDRA-12773-trunk-dtest/]|[dtest|http://cassci.datastax.com/view/Dev/view/spodkowinski/job/spodkowinski-CASSANDRA-12773-3.0-dtest/]|[dtest|http://cassci.datastax.com/view/Dev/view/spodkowinski/job/spodkowinski-CASSANDRA-12773-2.2-dtest/]|
|[testall|http://cassci.datastax.com/view/Dev/view/spodkowinski/job/spodkowinski-CASSANDRA-12773-trunk-testall/]|[testall|http://cassci.datastax.com/view/Dev/view/spodkowinski/job/spodkowinski-CASSANDRA-12773-3.0-testall/]|[testall|http://cassci.datastax.com/view/Dev/view/spodkowinski/job/spodkowinski-CASSANDRA-12773-2.2-testall/]|



> cassandra-stress error for one way SSL 
> ---
>
> Key: CASSANDRA-12773
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12773
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
>Reporter: Jane Deng
>
> CASSANDRA-9325 added keystore/truststore configuration into cassandra-stress. 
> However, for one way ssl (require_client_auth=false), there is no need to 
> pass keystore info into ssloptions. Cassadra-stress errored out:
> {noformat}
> java.lang.RuntimeException: java.io.IOException: Error creating the 
> initializing the SSL Context 
> at 
> org.apache.cassandra.stress.settings.StressSettings.getJavaDriverClient(StressSettings.java:200)
>  
> at 
> org.apache.cassandra.stress.settings.SettingsSchema.createKeySpacesNative(SettingsSchema.java:79)
>  
> at 
> org.apache.cassandra.stress.settings.SettingsSchema.createKeySpaces(SettingsSchema.java:69)
>  
> at 
> org.apache.cassandra.stress.settings.StressSettings.maybeCreateKeyspaces(StressSettings.java:207)
>  
> at org.apache.cassandra.stress.StressAction.run(StressAction.java:55) 
> at org.apache.cassandra.stress.Stress.main(Stress.java:117) 
> Caused by: java.io.IOException: Error creating the initializing the SSL 
> Context 
> at 
> org.apache.cassandra.security.SSLFactory.createSSLContext(SSLFactory.java:151)
>  
> at 
> org.apache.cassandra.stress.util.JavaDriverClient.connect(JavaDriverClient.java:128)
>  
> at 
> org.apache.cassandra.stress.settings.StressSettings.getJavaDriverClient(StressSettings.java:191)
>  
> ... 5 more 
> Caused by: java.io.IOException: Keystore was tampered with, or password was 
> incorrect 
> at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:772) 
> at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:55) 
> at java.security.KeyStore.load(KeyStore.java:1445) 
> at 
> org.apache.cassandra.security.SSLFactory.createSSLContext(SSLFactory.java:129)
>  
> ... 7 more 
> Caused by: java.security.UnrecoverableKeyException: Password verification 
> failed 
> at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:770) 
> ... 10 more
> {noformat}
> It's a bug from CASSANDRA-9325. When the keystore is absent, the keystore is 
> assigned to the path of the truststore, but the password isn't taken care.



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


[jira] [Updated] (CASSANDRA-12773) cassandra-stress error for one way SSL

2016-10-13 Thread Stefan Podkowinski (JIRA)

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

Stefan Podkowinski updated CASSANDRA-12773:
---
Status: Patch Available  (was: Open)

> cassandra-stress error for one way SSL 
> ---
>
> Key: CASSANDRA-12773
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12773
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
>Reporter: Jane Deng
>
> CASSANDRA-9325 added keystore/truststore configuration into cassandra-stress. 
> However, for one way ssl (require_client_auth=false), there is no need to 
> pass keystore info into ssloptions. Cassadra-stress errored out:
> {noformat}
> java.lang.RuntimeException: java.io.IOException: Error creating the 
> initializing the SSL Context 
> at 
> org.apache.cassandra.stress.settings.StressSettings.getJavaDriverClient(StressSettings.java:200)
>  
> at 
> org.apache.cassandra.stress.settings.SettingsSchema.createKeySpacesNative(SettingsSchema.java:79)
>  
> at 
> org.apache.cassandra.stress.settings.SettingsSchema.createKeySpaces(SettingsSchema.java:69)
>  
> at 
> org.apache.cassandra.stress.settings.StressSettings.maybeCreateKeyspaces(StressSettings.java:207)
>  
> at org.apache.cassandra.stress.StressAction.run(StressAction.java:55) 
> at org.apache.cassandra.stress.Stress.main(Stress.java:117) 
> Caused by: java.io.IOException: Error creating the initializing the SSL 
> Context 
> at 
> org.apache.cassandra.security.SSLFactory.createSSLContext(SSLFactory.java:151)
>  
> at 
> org.apache.cassandra.stress.util.JavaDriverClient.connect(JavaDriverClient.java:128)
>  
> at 
> org.apache.cassandra.stress.settings.StressSettings.getJavaDriverClient(StressSettings.java:191)
>  
> ... 5 more 
> Caused by: java.io.IOException: Keystore was tampered with, or password was 
> incorrect 
> at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:772) 
> at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:55) 
> at java.security.KeyStore.load(KeyStore.java:1445) 
> at 
> org.apache.cassandra.security.SSLFactory.createSSLContext(SSLFactory.java:129)
>  
> ... 7 more 
> Caused by: java.security.UnrecoverableKeyException: Password verification 
> failed 
> at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:770) 
> ... 10 more
> {noformat}
> It's a bug from CASSANDRA-9325. When the keystore is absent, the keystore is 
> assigned to the path of the truststore, but the password isn't taken care.



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


[jira] [Commented] (CASSANDRA-12784) ReplicationAwareTokenAllocatorTest times out almost every time for 3.X and trunk

2016-10-13 Thread Stefania (JIRA)

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

Stefania commented on CASSANDRA-12784:
--

The failure was reproduced locally using the junit version specified in 
build.xml, which is 4.6, kind of old actually.

At least in 4.6, {{unit.framework.AssertionFailedError}} extends 
{{AssertionError}}. Let me add some debug information and see if I can 
reproduce it again tomorrow, I'll try to multiplex it on Jenkins and then we 
should know for sure what is going on.

Noted about changing the assert import. 

One more thing, if we want to leave {{testNewClusterWithMurmur3Partitioner}} at 
64 vnodes, then I suggest lowering the number of iterations in the flaky 
utility, or else a flaky run will time out.



> ReplicationAwareTokenAllocatorTest times out almost every time for 3.X and 
> trunk
> 
>
> Key: CASSANDRA-12784
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12784
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Stefania
>Assignee: Stefania
> Fix For: 3.x
>
> Attachments: ReplicationAwareTokenAllocatorTest.jfr.gz
>
>
> Example failure: 
> http://cassci.datastax.com/view/cassandra-3.X/job/cassandra-3.X_testall/lastCompletedBuild/testReport/org.apache.cassandra.dht.tokenallocator/ReplicationAwareTokenAllocatorTest/testNewClusterWithMurmur3Partitioner/



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


cassandra git commit: ninja: removed duplicate python driver

2016-10-13 Thread stefania
Repository: cassandra
Updated Branches:
  refs/heads/trunk 2ab4666cd -> a83aeba94


ninja: removed duplicate python driver


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a83aeba9
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a83aeba9
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a83aeba9

Branch: refs/heads/trunk
Commit: a83aeba94c461216cdbf8cce5c109c2ac910b4f3
Parents: 2ab4666
Author: Stefania Alborghetti 
Authored: Thu Oct 13 20:15:43 2016 +0800
Committer: Stefania Alborghetti 
Committed: Thu Oct 13 20:15:43 2016 +0800

--
 ...a-driver-internal-only-3.7.0.post0-ea0a880.zip | Bin 252023 -> 0 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a83aeba9/lib/cassandra-driver-internal-only-3.7.0.post0-ea0a880.zip
--
diff --git a/lib/cassandra-driver-internal-only-3.7.0.post0-ea0a880.zip 
b/lib/cassandra-driver-internal-only-3.7.0.post0-ea0a880.zip
deleted file mode 100644
index b2ae5c6..000
Binary files a/lib/cassandra-driver-internal-only-3.7.0.post0-ea0a880.zip and 
/dev/null differ



[jira] [Comment Edited] (CASSANDRA-12490) Add sequence distribution type to cassandra stress

2016-10-13 Thread Benedict (JIRA)

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

Benedict edited comment on CASSANDRA-12490 at 10/13/16 11:09 AM:
-

_partition_ keys are a distinct beast, and if your population distribution for 
these is tiny then yes you will get overwrites, and I'm really not sure there's 
anything we can _reliably_ do about that.  Mostly I've been talking about 
behaviour _within_ a partition (except when pointing out some breakages).

The command line "-pop" property specifies the population of unique partition 
_seeds_.  These have to be translated into the partition key population 
distribution(s) first, which then between them uniquely produce the partition's 
contents (different seeds hitting the same PK will produce the same entire 
partition).  The problem is that the size of the unique seed set could be 
gigantic (we let n be billions in size, and it is often necessary to run with 
datasets this large), so enumerating all of these unique seeds and determining 
their value in the partition key column population distributions would be 
prohibitively expensive.  So we just accept that users should sensibly ensure 
their partition key population distribution is large enough to accommodate 
enough random samples to fulfil their seed population.

Now, for small populations we *could* mode-switch.  But I'm not sure it ever 
makes sense to so materially constrain your partition key population 
distribution.  It might even make sense for stress to forbid constraining this 
distribution too much, as it has essentially no impact to the behaviour profile 
of the cluster.

If you want to visit a single partition many times, there are better ways to do 
that. i.e., specifying that the seed population as small, but that you want to 
run many operations.  This will give you an identically constrained population, 
without any risk of weirdness, as well as permitting the same yaml to be used 
for different scales of test.  ideally you want each visit, in such a scenario, 
to use the more advanced features of stress anyway (such as partial visitation 
of the whole generated (presumably huge) partition, or incremental visitation)


was (Author: benedict):
_partition_ keys are a distinct beast, and if your population distribution for 
these is tiny then yes you will get overwrites, and I'm really not sure there's 
anything we can _reliably_ do about that.  Mostly I've been talking about 
behaviour _within_ a partition (except when pointing out some breakages).

The command line "-pop" property specifies the population of unique partition 
_seeds_.  These have to be translated into the partition key population 
distribution(s) first, which then between them identify the partition's 
contents.  The problem is that the size of the unique seed set could be 
gigantic (we let n be billions in size, and it is often necessary to run with 
datasets this large), so enumerating all of these unique seeds and determining 
their value in the partition key column population distributions would be 
prohibitively expensive.  So we just accept that users should sensibly ensure 
their partition key population distribution is large enough to accommodate 
enough random samples to fulfil their seed population.

Now, for small populations we *could* mode-switch.  But I'm not sure it ever 
makes sense to so materially constrain your partition key population 
distribution.  It might even make sense for stress to forbid constraining this 
distribution too much, as it has essentially no impact to the behaviour profile 
of the cluster.

If you want to visit a single partition many times, there are better ways to do 
that. i.e., specifying that the seed population as small, but that you want to 
run many operations.  This will give you an identically constrained population, 
without any risk of weirdness, as well as permitting the same yaml to be used 
for different scales of test.  ideally you want each visit, in such a scenario, 
to use the more advanced features of stress anyway (such as partial visitation 
of the whole generated (presumably huge) partition, or incremental visitation)

> Add sequence distribution type to cassandra stress
> --
>
> Key: CASSANDRA-12490
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12490
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Tools
>Reporter: Ben Slater
>Assignee: Ben Slater
>Priority: Minor
> Fix For: 3.10
>
> Attachments: 12490-trunk.patch, 12490.yaml, cqlstress-seq-example.yaml
>
>
> When using the write command, cassandra stress sequentially generates seeds. 
> This ensures generated values don't overlap (unless the sequence wraps) 
> providing more 

[jira] [Commented] (CASSANDRA-12490) Add sequence distribution type to cassandra stress

2016-10-13 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-12490:
--

_partition_ keys are a distinct beast, and if your population distribution for 
these is tiny then yes you will get overwrites, and I'm really not sure there's 
anything we can _reliably_ do about that.  Mostly I've been talking about 
behaviour _within_ a partition (except when pointing out some breakages).

The command line "-pop" property specifies the population of unique partition 
_seeds_.  These have to be translated into the partition key population 
distribution(s) first, which then between them identify the partition's 
contents.  The problem is that the size of the unique seed set could be 
gigantic (we let n be billions in size, and it is often necessary to run with 
datasets this large), so enumerating all of these unique seeds and determining 
their value in the partition key column population distributions would be 
prohibitively expensive.  So we just accept that users should sensibly ensure 
their partition key population distribution is large enough to accommodate 
enough random samples to fulfil their seed population.

Now, for small populations we *could* mode-switch.  But I'm not sure it ever 
makes sense to so materially constrain your partition key population 
distribution.  It might even make sense for stress to forbid constraining this 
distribution too much, as it has essentially no impact to the behaviour profile 
of the cluster.

If you want to visit a single partition many times, there are better ways to do 
that. i.e., specifying that the seed population as small, but that you want to 
run many operations.  This will give you an identically constrained population, 
without any risk of weirdness, as well as permitting the same yaml to be used 
for different scales of test.  ideally you want each visit, in such a scenario, 
to use the more advanced features of stress anyway (such as partial visitation 
of the whole generated (presumably huge) partition, or incremental visitation)

> Add sequence distribution type to cassandra stress
> --
>
> Key: CASSANDRA-12490
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12490
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Tools
>Reporter: Ben Slater
>Assignee: Ben Slater
>Priority: Minor
> Fix For: 3.10
>
> Attachments: 12490-trunk.patch, 12490.yaml, cqlstress-seq-example.yaml
>
>
> When using the write command, cassandra stress sequentially generates seeds. 
> This ensures generated values don't overlap (unless the sequence wraps) 
> providing more predictable number of inserted records (and generating a base 
> set of data without wasted writes).
> When using a yaml stress spec there is no sequenced distribution available. 
> It think it would be useful to have this for doing initial load of data for 
> testing 



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


[jira] [Comment Edited] (CASSANDRA-12490) Add sequence distribution type to cassandra stress

2016-10-13 Thread Ben Slater (JIRA)

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

Ben Slater edited comment on CASSANDRA-12490 at 10/13/16 10:57 AM:
---

OK, so I did some more investigation this evening to try to better understand 
this and found a few interesting things. I suspect there is at least on bug 
here but I'll be interested to see what you think.

I set up a simple spec to test what was going on:
{code}
table: test4
table_definition: |
  CREATE TABLE test4 (
pk text,
val text,
PRIMARY KEY (pk)
  ) 
columnspec:
  - name: pk
size: fixed(32) 
population: uniform(1..50)
{code}

When I run this with `ops(insert=1) n=50` the end result is 1 row added to the 
table. When I run it with n=500 I get 3 rows. Some other observations:
a) tracing this through it seems that's because the small number of seed values 
from the population (due to the small n=) results in a very low variation in 
values being returned from `delegate.sample()` in 
`DistributionBoundApache.next()`. They were (all 37 Add sequence distribution type to cassandra stress
> --
>
> Key: CASSANDRA-12490
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12490
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Tools
>Reporter: Ben Slater
>Assignee: Ben Slater
>Priority: Minor
> Fix For: 3.10
>
> Attachments: 12490-trunk.patch, 12490.yaml, cqlstress-seq-example.yaml
>
>
> When using the write command, cassandra stress sequentially generates seeds. 
> This ensures generated values don't overlap (unless the sequence wraps) 
> providing more predictable number of inserted records (and 

[jira] [Commented] (CASSANDRA-12490) Add sequence distribution type to cassandra stress

2016-10-13 Thread Ben Slater (JIRA)

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

Ben Slater commented on CASSANDRA-12490:


OK, so I did some more investigation this evening to try to better understand 
this and found a few interesting things. I suspect there is at least on bug 
here but I'll be interested to see what you think.

I set up a simple spec to test what was going on:
```
table: test4
table_definition: |
  CREATE TABLE test4 (
pk text,
val text,
PRIMARY KEY (pk)
  ) 
columnspec:
  - name: pk
size: fixed(32) 
population: uniform(1..50)```

When I run this with `ops(insert=1) n=50` the end result is 1 row added to the 
table. When I run it with n=500 I get 3 rows. Some other observations:
a) tracing this through it seems that's because the small number of seed values 
from the population (due to the small n=) results in a very low variation in 
values being returned from `delegate.sample()` in 
`DistributionBoundApache.next()`. They were (all 37 Add sequence distribution type to cassandra stress
> --
>
> Key: CASSANDRA-12490
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12490
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Tools
>Reporter: Ben Slater
>Assignee: Ben Slater
>Priority: Minor
> Fix For: 3.10
>
> Attachments: 12490-trunk.patch, 12490.yaml, cqlstress-seq-example.yaml
>
>
> When using the write command, cassandra stress sequentially generates seeds. 
> This ensures generated values don't overlap (unless the sequence wraps) 
> providing more predictable number of inserted records (and generating a base 
> set of data without wasted writes).
> When using a yaml stress spec there is no sequenced distribution available. 
> It think it would be useful to have this for doing initial load of data for 
> testing 



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


[jira] [Commented] (CASSANDRA-12784) ReplicationAwareTokenAllocatorTest times out almost every time for 3.X and trunk

2016-10-13 Thread Branimir Lambov (JIRA)

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

Branimir Lambov commented on CASSANDRA-12784:
-

bq. AssertionFailedError is a sub-class of AssertionError

Not in all JUnit versions. You local one is probably different from the one in 
CI.

Additionally, the test itself imports {{junit.framework.Assert}} (from JUnit 3) 
while it should import {{org.junit.Assert}} (JUnit 4).

> ReplicationAwareTokenAllocatorTest times out almost every time for 3.X and 
> trunk
> 
>
> Key: CASSANDRA-12784
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12784
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Stefania
>Assignee: Stefania
> Fix For: 3.x
>
> Attachments: ReplicationAwareTokenAllocatorTest.jfr.gz
>
>
> Example failure: 
> http://cassci.datastax.com/view/cassandra-3.X/job/cassandra-3.X_testall/lastCompletedBuild/testReport/org.apache.cassandra.dht.tokenallocator/ReplicationAwareTokenAllocatorTest/testNewClusterWithMurmur3Partitioner/



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


[jira] [Comment Edited] (CASSANDRA-12784) ReplicationAwareTokenAllocatorTest times out almost every time for 3.X and trunk

2016-10-13 Thread Stefania (JIRA)

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

Stefania edited comment on CASSANDRA-12784 at 10/13/16 9:37 AM:


bq. Since the same test is being done for a large vnode count for the Murmur 
partitioner, I have absolutely nothing against reducing the scope of the random 
version to no higher than 16 vnodes.

Thanks, I'll change the test accordingly.

bq. The flaky utility failure is caused by not catching the right error type 
for some junit versions. The fix is to include || AssertionFailedError in the 
catch in runCatchingAssertionError.

That's what I thought as well initially, but actually AssertionFailedError is a 
sub-class of AssertionError so that is not the reason. I verified in Intellij 
that if we call Assert.fail() in the same method, the exception is caught. I 
must admit I don't understand this yet, unless it really ran 5 times and it 
failed every time but the suppressed exceptions were not displayed. The trouble 
is that it is hard to reproduce. We can add more debug information and leave it 
until we can reproduce it.


was (Author: stefania):
bq. Since the same test is being done for a large vnode count for the Murmur 
partitioner, I have absolutely nothing against reducing the scope of the random 
version to no higher than 16 vnodes.

Thanks, I'll change the test accordingly.

bq. The flaky utility failure is caused by not catching the right error type 
for some junit versions. The fix is to include || AssertionFailedError in the 
catch in runCatchingAssertionError.

That's what I thought as well initially, but actually AssertionFailedError is a 
sub-class of AssertionError so that is not the reason. I verified in Intellij 
that if we call Assert.fail() in the same method, the exception is catched. I 
must admit I don't understand this yet, unless it really ran 5 times and it 
failed every time but the suppressed exceptions were not displayed. The trouble 
is that it is hard to reproduce. We can add more debug information and leave it 
until we can reproduce it.

> ReplicationAwareTokenAllocatorTest times out almost every time for 3.X and 
> trunk
> 
>
> Key: CASSANDRA-12784
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12784
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Stefania
>Assignee: Stefania
> Fix For: 3.x
>
> Attachments: ReplicationAwareTokenAllocatorTest.jfr.gz
>
>
> Example failure: 
> http://cassci.datastax.com/view/cassandra-3.X/job/cassandra-3.X_testall/lastCompletedBuild/testReport/org.apache.cassandra.dht.tokenallocator/ReplicationAwareTokenAllocatorTest/testNewClusterWithMurmur3Partitioner/



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


[jira] [Comment Edited] (CASSANDRA-12784) ReplicationAwareTokenAllocatorTest times out almost every time for 3.X and trunk

2016-10-13 Thread Stefania (JIRA)

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

Stefania edited comment on CASSANDRA-12784 at 10/13/16 9:31 AM:


bq. Since the same test is being done for a large vnode count for the Murmur 
partitioner, I have absolutely nothing against reducing the scope of the random 
version to no higher than 16 vnodes.

Thanks, I'll change the test accordingly.

bq. The flaky utility failure is caused by not catching the right error type 
for some junit versions. The fix is to include || AssertionFailedError in the 
catch in runCatchingAssertionError.

That's what I thought as well initially, but actually AssertionFailedError is a 
sub-class of AssertionError so that is not the reason. I verified in Intellij 
that if we call Assert.fail() in the same method, the exception is catched. I 
must admit I don't understand this yet, unless it really ran 5 times and it 
failed every time but the suppressed exceptions were not displayed. The trouble 
is that it is hard to reproduce. We can add more debug information and leave it 
until we can reproduce it.


was (Author: stefania):
bq. Since the same test is being done for a large vnode count for the Murmur 
partitioner, I have absolutely nothing against reducing the scope of the random 
version to no higher than 16 vnodes.

Thanks, I'll change the test accordingly.

bq. The flaky utility failure is caused by not catching the right error type 
for some junit versions. The fix is to include || AssertionFailedError in the 
catch in runCatchingAssertionError.

That's what I thought as well initially, but actually AssertionFailedError is a 
sub-class of AssertionError so that is not the reason. I verified in Intellij 
that if we call Assert.fail() in the same method, the exception is catched. I 
must admit I don't understand this yet, unless it really ran 5 times and it 
failed every time but the suppressed exceptions were not displayed. The trouble 
is that it is hard to reproduce.

> ReplicationAwareTokenAllocatorTest times out almost every time for 3.X and 
> trunk
> 
>
> Key: CASSANDRA-12784
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12784
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Stefania
>Assignee: Stefania
> Fix For: 3.x
>
> Attachments: ReplicationAwareTokenAllocatorTest.jfr.gz
>
>
> Example failure: 
> http://cassci.datastax.com/view/cassandra-3.X/job/cassandra-3.X_testall/lastCompletedBuild/testReport/org.apache.cassandra.dht.tokenallocator/ReplicationAwareTokenAllocatorTest/testNewClusterWithMurmur3Partitioner/



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


[jira] [Commented] (CASSANDRA-12784) ReplicationAwareTokenAllocatorTest times out almost every time for 3.X and trunk

2016-10-13 Thread Stefania (JIRA)

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

Stefania commented on CASSANDRA-12784:
--

bq. Since the same test is being done for a large vnode count for the Murmur 
partitioner, I have absolutely nothing against reducing the scope of the random 
version to no higher than 16 vnodes.

Thanks, I'll change the test accordingly.

bq. The flaky utility failure is caused by not catching the right error type 
for some junit versions. The fix is to include || AssertionFailedError in the 
catch in runCatchingAssertionError.

That's what I thought as well initially, but actually AssertionFailedError is a 
sub-class of AssertionError so that is not the reason. I verified in Intellij 
that if we call Assert.fail() in the same method, the exception is catched. I 
must admit I don't understand this yet, unless it really ran 5 times and it 
failed every time but the suppressed exceptions were not displayed. The trouble 
is that it is hard to reproduce.

> ReplicationAwareTokenAllocatorTest times out almost every time for 3.X and 
> trunk
> 
>
> Key: CASSANDRA-12784
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12784
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Stefania
>Assignee: Stefania
> Fix For: 3.x
>
> Attachments: ReplicationAwareTokenAllocatorTest.jfr.gz
>
>
> Example failure: 
> http://cassci.datastax.com/view/cassandra-3.X/job/cassandra-3.X_testall/lastCompletedBuild/testReport/org.apache.cassandra.dht.tokenallocator/ReplicationAwareTokenAllocatorTest/testNewClusterWithMurmur3Partitioner/



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


[jira] [Commented] (CASSANDRA-12784) ReplicationAwareTokenAllocatorTest times out almost every time for 3.X and trunk

2016-10-13 Thread Branimir Lambov (JIRA)

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

Branimir Lambov commented on CASSANDRA-12784:
-

Since the same test is being done for a large vnode count for the Murmur 
partitioner, I have absolutely nothing against reducing the scope of the random 
version to no higher than 16 vnodes.

The flaky utility failure is caused by not catching the right error type for 
_some_ junit versions. The fix is to include {{|| AssertionFailedError}} in the 
[{{catch}}|https://github.com/apache/cassandra/blob/trunk/test/unit/org/apache/cassandra/Util.java#L579]
 in {{runCatchingAssertionError}}.

> ReplicationAwareTokenAllocatorTest times out almost every time for 3.X and 
> trunk
> 
>
> Key: CASSANDRA-12784
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12784
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Stefania
>Assignee: Stefania
> Fix For: 3.x
>
> Attachments: ReplicationAwareTokenAllocatorTest.jfr.gz
>
>
> Example failure: 
> http://cassci.datastax.com/view/cassandra-3.X/job/cassandra-3.X_testall/lastCompletedBuild/testReport/org.apache.cassandra.dht.tokenallocator/ReplicationAwareTokenAllocatorTest/testNewClusterWithMurmur3Partitioner/



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


[jira] [Commented] (CASSANDRA-12373) 3.0 breaks CQL compatibility with super columns families

2016-10-13 Thread Alex Petrov (JIRA)

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

Alex Petrov commented on CASSANDRA-12373:
-

While discussing [CASSANDRA-7190], we decided to opt-out from writing custom 
schema loading format (and tool) and just CQL, so now we can only load things 
that are "CQL-expressible". In schema file we do "best effort", so we say "so 
here's what it kind of looks like internally, but there's actually no way to 
re-create that in CQL". We may just leave the schema file [as 
is|https://github.com/apache/cassandra/blob/trunk/test/unit/org/apache/cassandra/db/ColumnFamilyStoreCQLHelperTest.java#L680-L691]
 for now.

> 3.0 breaks CQL compatibility with super columns families
> 
>
> Key: CASSANDRA-12373
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12373
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
>Reporter: Sylvain Lebresne
>Assignee: Alex Petrov
> Fix For: 3.0.x, 3.x
>
>
> This is a follow-up to CASSANDRA-12335 to fix the CQL side of super column 
> compatibility.
> The details and a proposed solution can be found in the comments of 
> CASSANDRA-12335 but the crux of the issue is that super column famillies show 
> up differently in CQL in 3.0.x/3.x compared to 2.x, hence breaking backward 
> compatibilty.



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


[jira] [Updated] (CASSANDRA-12784) ReplicationAwareTokenAllocatorTest times out almost every time for 3.X and trunk

2016-10-13 Thread Stefania (JIRA)

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

Stefania updated CASSANDRA-12784:
-
Status: Awaiting Feedback  (was: In Progress)

> ReplicationAwareTokenAllocatorTest times out almost every time for 3.X and 
> trunk
> 
>
> Key: CASSANDRA-12784
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12784
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Stefania
>Assignee: Stefania
> Fix For: 3.x
>
> Attachments: ReplicationAwareTokenAllocatorTest.jfr.gz
>
>
> Example failure: 
> http://cassci.datastax.com/view/cassandra-3.X/job/cassandra-3.X_testall/lastCompletedBuild/testReport/org.apache.cassandra.dht.tokenallocator/ReplicationAwareTokenAllocatorTest/testNewClusterWithMurmur3Partitioner/



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


[jira] [Commented] (CASSANDRA-12784) ReplicationAwareTokenAllocatorTest times out almost every time for 3.X and trunk

2016-10-13 Thread Stefania (JIRA)

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

Stefania commented on CASSANDRA-12784:
--

This test has been timing out since it was introduced by CASSANDRA-12647. In 
fact, the problem is not {{testNewClusterWithMurmur3Partitioner}}, which was 
previously called {{testNewCluster}} and was timing out very rarely (due to the 
flaky utility?), but the new random partitioner tests. They take approximately 
twice as long as the murmur3 tests. On my laptop, with the current test 
configuration of 64 VNODES, the full test completes in approximately 500 
seconds, see timings below. The total timeout on Jenkins is 600 seconds, 
therefore the test is almost always timing out given that the Jenkins VMs are 
slower. This analysis does not take into account the flaky utility, when this 
latter kicks in, there is no chance that the test completes within the timeout.

I've attached a JFR profile, [^ReplicationAwareTokenAllocatorTest.jfr.gz], the 
slowness of the random partitioner tests is due to the big integer math in 
{{BigIntegerToken.size()}}. Unless we plan on improving the performance of the 
algorithm or of the big integer math, may I suggest reducing the scope of the 
test? I don't think it's reasonable to run a unit test that takes longer than 
10 minutes, the full test can be moved to a burn test if required.

One way to reduce the scope would be to reduce the number of iterations by 
reducing VNODES, do you have any other suggestions [~blambov] or [~dikanggu]?

h5. Measurements on my laptop:

*64-VNODES:*

{code}

...




...




{code}

*32-VNODES:*

{code}

...




...




{code}

*16-VNODES:*

{code}

...




...




{code}

*8-VNODES:*

{code}

...




...




{code}


*4-VNODES:*

{code}

...




...




{code}


--

I've also noticed two failures with the following exception:

{code}
[junit] -  ---
[junit] Testcase: 
testNewClusterWithRandomPartitioner(org.apache.cassandra.dht.tokenallocator.ReplicationAwareTokenAllocatorTest):
  FAILED
[junit] Expected max unit size below 1.2000, was 1.2241
[junit] junit.framework.AssertionFailedError: Expected max unit size below 
1.2000, was 1.2241
[junit] at 
org.apache.cassandra.dht.tokenallocator.ReplicationAwareTokenAllocatorTest.grow(ReplicationAwareTokenAllocatorTest.java:698)
[junit] at 
org.apache.cassandra.dht.tokenallocator.ReplicationAwareTokenAllocatorTest.testNewCluster(ReplicationAwareTokenAllocatorTest.java:629)
[junit] at 
org.apache.cassandra.dht.tokenallocator.ReplicationAwareTokenAllocatorTest.flakyTestNewCluster(ReplicationAwareTokenAllocatorTest.java:611)
[junit] at 
org.apache.cassandra.dht.tokenallocator.ReplicationAwareTokenAllocatorTest.flakyTestNewClusterWithRandomPartitioner(ReplicationAwareTokenAllocatorTest.java:583)
[junit] at 
org.apache.cassandra.Util.runCatchingAssertionError(Util.java:576)
[junit] at org.apache.cassandra.Util.flakyTest(Util.java:601)
[junit] at 
org.apache.cassandra.dht.tokenallocator.ReplicationAwareTokenAllocatorTest.testNewClusterWithRandomPartitioner(ReplicationAwareTokenAllocatorTest.java:568)
{code}

Is the flaky utility effective for the random partitioner tests?

> ReplicationAwareTokenAllocatorTest times out almost every time for 3.X and 
> trunk
> 
>
> Key: CASSANDRA-12784
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12784
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Stefania
>Assignee: Stefania
> Fix For: 3.x
>
> Attachments: ReplicationAwareTokenAllocatorTest.jfr.gz
>
>
> Example failure: 
> http://cassci.datastax.com/view/cassandra-3.X/job/cassandra-3.X_testall/lastCompletedBuild/testReport/org.apache.cassandra.dht.tokenallocator/ReplicationAwareTokenAllocatorTest/testNewClusterWithMurmur3Partitioner/



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


[jira] [Updated] (CASSANDRA-12784) ReplicationAwareTokenAllocatorTest times out almost every time for 3.X and trunk

2016-10-13 Thread Stefania (JIRA)

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

Stefania updated CASSANDRA-12784:
-
Attachment: ReplicationAwareTokenAllocatorTest.jfr.gz

> ReplicationAwareTokenAllocatorTest times out almost every time for 3.X and 
> trunk
> 
>
> Key: CASSANDRA-12784
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12784
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Stefania
>Assignee: Stefania
> Fix For: 3.x
>
> Attachments: ReplicationAwareTokenAllocatorTest.jfr.gz
>
>
> Example failure: 
> http://cassci.datastax.com/view/cassandra-3.X/job/cassandra-3.X_testall/lastCompletedBuild/testReport/org.apache.cassandra.dht.tokenallocator/ReplicationAwareTokenAllocatorTest/testNewClusterWithMurmur3Partitioner/



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


[jira] [Commented] (CASSANDRA-12373) 3.0 breaks CQL compatibility with super columns families

2016-10-13 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-12373:
--

bq. What we want/need to do re:schema is change python- and java- drivers

Right, didn't meant nothing has to be done, just that it wasn't part of this 
patch (nor C* really). I'll mark "client-impacting" in fact, so clients are 
aware they have something to do here too.

bq. Don't forget the "snapshot" schema changing code.

Well, that's kind of an interesting point because there is in fact currently 
*no* way to create a super column table from CQL. That's kind of on purpose, we 
do not want people to create them nowadays, we only want to maintain backward 
compatibility, but it does mean if you need to restore a snapshot of a super 
column table, you have to currently use thrift. So I don't known, maybe in the 
short term saying that we don't save schema for snapshot at all for super 
column table is the "most honest" solution.

But it kind of suggest to me that we should get CASSANDRA-10857 in ASAP, and 
then force users to use it on super column tables before upgrading to 4.0. It's 
not ideal, but I don't dragging super columns support forever is a better 
solution either.

> 3.0 breaks CQL compatibility with super columns families
> 
>
> Key: CASSANDRA-12373
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12373
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
>Reporter: Sylvain Lebresne
>Assignee: Alex Petrov
> Fix For: 3.0.x, 3.x
>
>
> This is a follow-up to CASSANDRA-12335 to fix the CQL side of super column 
> compatibility.
> The details and a proposed solution can be found in the comments of 
> CASSANDRA-12335 but the crux of the issue is that super column famillies show 
> up differently in CQL in 3.0.x/3.x compared to 2.x, hence breaking backward 
> compatibilty.



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