[jira] [Updated] (CASSANDRA-7921) Provide visibility into prepared statement churn

2014-09-18 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-7921:
-
Labels: bootcamp  (was: )

 Provide visibility into prepared statement churn
 

 Key: CASSANDRA-7921
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7921
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Nate McCall
Assignee: Nate McCall
Priority: Minor
  Labels: bootcamp
 Fix For: 2.1.1

 Attachments: 7921-ps-churn.txt


 Some JDBC drivers provide visibility into the preparedstatement cache in such 
 a way as to track churn. It would be nice to have this added to 
 CqlStatementMetrics



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


[jira] [Updated] (CASSANDRA-7930) Warn when evicting prepared statements from cache

2014-09-18 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-7930:
-
Reviewer: Aleksey Yeschenko  (was: Tyler Hobbs)

 Warn when evicting prepared statements from cache
 -

 Key: CASSANDRA-7930
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7930
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Robbie Strickland
Assignee: Robbie Strickland
  Labels: bootcamp, jmx
 Attachments: cassandra-2.0-v2.txt, cassandra-2.0-v3.txt, 
 cassandra-2.0-v4.txt, cassandra-2.0-v5.txt, cassandra-2.0-v6.txt, 
 cassandra-2.0.txt, cassandra-2.1.txt


 The prepared statement cache is an LRU, with a max size of maxMemory / 256.  
 There is currently no warning when statements are evicted, which could be 
 problematic if the user is unaware that this is happening.
 At the very least, we should provide a JMX metric and possibly a log message 
 indicating this is happening.  At some point it may also be worthwhile to 
 make this tunable for users with large numbers of statements.



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


[jira] [Commented] (CASSANDRA-7968) permissions_validity_in_ms should be settable via JMX

2014-09-18 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-7968:
--

+1

Nits:
- a bunch of unused imports left over in ClientState, o.a.c.u.Pair import in 
the wrong place in Auth
- Auth#initPermissionsCache() should be made private, and (subjective 
preference) accept the previous cache (or null) as an argument instead of 
accessing Auth.permissionsCache

 permissions_validity_in_ms should be settable via JMX
 -

 Key: CASSANDRA-7968
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7968
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Brandon Williams
Assignee: Brandon Williams
Priority: Minor
 Fix For: 2.0.11, 2.1.1

 Attachments: 7968.txt


 Oftentimes people don't think about auth problems and just run with the 
 default of RF=2 and 2000ms until it's too late, and at that point doing a 
 rolling restart to change the permissions cache can be a bit painful vs 
 setting it via JMX everywhere and then updating the yaml for future restarts.



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


[jira] [Commented] (CASSANDRA-7968) permissions_validity_in_ms should be settable via JMX

2014-09-18 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-7968:
-

Isn't this a security flaw?

 permissions_validity_in_ms should be settable via JMX
 -

 Key: CASSANDRA-7968
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7968
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Brandon Williams
Assignee: Brandon Williams
Priority: Minor
 Fix For: 2.0.11, 2.1.1

 Attachments: 7968.txt


 Oftentimes people don't think about auth problems and just run with the 
 default of RF=2 and 2000ms until it's too late, and at that point doing a 
 rolling restart to change the permissions cache can be a bit painful vs 
 setting it via JMX everywhere and then updating the yaml for future restarts.



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


[jira] [Comment Edited] (CASSANDRA-7968) permissions_validity_in_ms should be settable via JMX

2014-09-18 Thread Benedict (JIRA)

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

Benedict edited comment on CASSANDRA-7968 at 9/18/14 6:38 AM:
--

-Isn't this a security flaw?- edit: I see we support authentication over JMX, 
but it still leaves me a little uncomfortable; if we're not accepting commands 
like this only over authenticated, SSL'd JMX connections, it leaves this open 
to exploit. Probably not a big deal, but still a slight potential security risk


was (Author: benedict):
Isn't this a security flaw?

 permissions_validity_in_ms should be settable via JMX
 -

 Key: CASSANDRA-7968
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7968
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Brandon Williams
Assignee: Brandon Williams
Priority: Minor
 Fix For: 2.0.11, 2.1.1

 Attachments: 7968.txt


 Oftentimes people don't think about auth problems and just run with the 
 default of RF=2 and 2000ms until it's too late, and at that point doing a 
 rolling restart to change the permissions cache can be a bit painful vs 
 setting it via JMX everywhere and then updating the yaml for future restarts.



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


[jira] [Commented] (CASSANDRA-7968) permissions_validity_in_ms should be settable via JMX

2014-09-18 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-7968:
--

bq. Isn't this a security flaw?

You mean someone increasing the validity period? I'd say it's no big deal. Or, 
rather, that if someone who shouldn't have JMX access to your nodes has it, you 
are in much deeper trouble.

 permissions_validity_in_ms should be settable via JMX
 -

 Key: CASSANDRA-7968
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7968
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Brandon Williams
Assignee: Brandon Williams
Priority: Minor
 Fix For: 2.0.11, 2.1.1

 Attachments: 7968.txt


 Oftentimes people don't think about auth problems and just run with the 
 default of RF=2 and 2000ms until it's too late, and at that point doing a 
 rolling restart to change the permissions cache can be a bit painful vs 
 setting it via JMX everywhere and then updating the yaml for future restarts.



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


[jira] [Commented] (CASSANDRA-7968) permissions_validity_in_ms should be settable via JMX

2014-09-18 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-7968:
-

Well, it depends what you mean by deeper trouble. I don't think anybody with 
access to JMX can get access to any raw data, so you won't be at any risk of 
breaking a data policy or data _laws_. This potentially introduces that risk

 permissions_validity_in_ms should be settable via JMX
 -

 Key: CASSANDRA-7968
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7968
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Brandon Williams
Assignee: Brandon Williams
Priority: Minor
 Fix For: 2.0.11, 2.1.1

 Attachments: 7968.txt


 Oftentimes people don't think about auth problems and just run with the 
 default of RF=2 and 2000ms until it's too late, and at that point doing a 
 rolling restart to change the permissions cache can be a bit painful vs 
 setting it via JMX everywhere and then updating the yaml for future restarts.



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


[jira] [Commented] (CASSANDRA-7968) permissions_validity_in_ms should be settable via JMX

2014-09-18 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-7968:
--

I don't really see how that's the case.

 permissions_validity_in_ms should be settable via JMX
 -

 Key: CASSANDRA-7968
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7968
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Brandon Williams
Assignee: Brandon Williams
Priority: Minor
 Fix For: 2.0.11, 2.1.1

 Attachments: 7968.txt


 Oftentimes people don't think about auth problems and just run with the 
 default of RF=2 and 2000ms until it's too late, and at that point doing a 
 rolling restart to change the permissions cache can be a bit painful vs 
 setting it via JMX everywhere and then updating the yaml for future restarts.



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


[jira] [Commented] (CASSANDRA-7968) permissions_validity_in_ms should be settable via JMX

2014-09-18 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-7968:
-

Well, before having their permissions revoked somebody could increase the 
permission_validity_ms dramatically, retaining them past their permitted 
window, breaking compliance.

 permissions_validity_in_ms should be settable via JMX
 -

 Key: CASSANDRA-7968
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7968
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Brandon Williams
Assignee: Brandon Williams
Priority: Minor
 Fix For: 2.0.11, 2.1.1

 Attachments: 7968.txt


 Oftentimes people don't think about auth problems and just run with the 
 default of RF=2 and 2000ms until it's too late, and at that point doing a 
 rolling restart to change the permissions cache can be a bit painful vs 
 setting it via JMX everywhere and then updating the yaml for future restarts.



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


[jira] [Commented] (CASSANDRA-7968) permissions_validity_in_ms should be settable via JMX

2014-09-18 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-7968:
-

Presumably the main goal of this function is to _reduce_ the window? So perhaps 
we support only that direction (or perhaps a raise to within the config defined 
value)

 permissions_validity_in_ms should be settable via JMX
 -

 Key: CASSANDRA-7968
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7968
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Brandon Williams
Assignee: Brandon Williams
Priority: Minor
 Fix For: 2.0.11, 2.1.1

 Attachments: 7968.txt


 Oftentimes people don't think about auth problems and just run with the 
 default of RF=2 and 2000ms until it's too late, and at that point doing a 
 rolling restart to change the permissions cache can be a bit painful vs 
 setting it via JMX everywhere and then updating the yaml for future restarts.



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


[jira] [Commented] (CASSANDRA-7968) permissions_validity_in_ms should be settable via JMX

2014-09-18 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-7968:
--

The goal as requested by the particular user is to raise it without having to 
shut down several hundred nodes to change a single yaml config.

 permissions_validity_in_ms should be settable via JMX
 -

 Key: CASSANDRA-7968
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7968
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Brandon Williams
Assignee: Brandon Williams
Priority: Minor
 Fix For: 2.0.11, 2.1.1

 Attachments: 7968.txt


 Oftentimes people don't think about auth problems and just run with the 
 default of RF=2 and 2000ms until it's too late, and at that point doing a 
 rolling restart to change the permissions cache can be a bit painful vs 
 setting it via JMX everywhere and then updating the yaml for future restarts.



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


[jira] [Commented] (CASSANDRA-6904) commitlog segments may not be archived after restart

2014-09-18 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-6904:
-

As discussed on CASSANDRA-7965, we could simply archive all commit logs present 
on restart. This runs the risk of repeatedly archiving commit logs if we fail 
repeatedly on restart for some reason, so may be undesirable. However we can 
avoid replaying the same CLS twice in 2.1 since we retain the original id in 
the header.

 commitlog segments may not be archived after restart
 

 Key: CASSANDRA-6904
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6904
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Jonathan Ellis
 Fix For: 2.1.1


 commitlog segments are archived when they are full, so the current active 
 segment will not be archived on restart (and its contents will not be 
 available for pitr).



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


[jira] [Commented] (CASSANDRA-7968) permissions_validity_in_ms should be settable via JMX

2014-09-18 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-7968:
-

Well, let's do it then, and just make sure anyone who cares about compliance 
realises they need to run JMX over SSL with authentication

 permissions_validity_in_ms should be settable via JMX
 -

 Key: CASSANDRA-7968
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7968
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Brandon Williams
Assignee: Brandon Williams
Priority: Minor
 Fix For: 2.0.11, 2.1.1

 Attachments: 7968.txt


 Oftentimes people don't think about auth problems and just run with the 
 default of RF=2 and 2000ms until it's too late, and at that point doing a 
 rolling restart to change the permissions cache can be a bit painful vs 
 setting it via JMX everywhere and then updating the yaml for future restarts.



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


[jira] [Created] (CASSANDRA-7969) Properly track min/max timestamps and maxLocalDeletionTimes for range and row tombstones

2014-09-18 Thread Marcus Eriksson (JIRA)
Marcus Eriksson created CASSANDRA-7969:
--

 Summary: Properly track min/max timestamps and 
maxLocalDeletionTimes for range and row tombstones
 Key: CASSANDRA-7969
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7969
 Project: Cassandra
  Issue Type: Bug
Reporter: Marcus Eriksson
Assignee: Marcus Eriksson
 Fix For: 2.0.11
 Attachments: 
0001-track-min-max-timestamps-and-maxLocalDeletionTime-co.patch

First problem is that when we have only row or range tombstones in an sstable 
we dont update the maxLocalDeletionTime for the sstable

Second problem is that if we have a range tombstone in an sstable, minTimestamp 
will always be Long.MIN_VALUE for flushed sstables due to how we set the 
default values for the variables



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


[jira] [Commented] (CASSANDRA-7953) RangeTombstones not merging during compaction

2014-09-18 Thread Marcus Eriksson (JIRA)

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

Marcus Eriksson commented on CASSANDRA-7953:


bq. If the sstable only contains tombstones during compaction it seems that the 
sstable either gets removed or isn't created
created CASSANDRA-7969 for this

will have a look at your patch now

 RangeTombstones not merging during compaction
 -

 Key: CASSANDRA-7953
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7953
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: Cassandra 2.1
Reporter: Marcus Olsson
Priority: Minor
  Labels: compaction, deletes, tombstone
 Attachments: CASSANDRA-7953.patch


 When performing a compaction on two sstables that contain the same 
 RangeTombstone with different timestamps, the tombstones are not merged in 
 the new sstable.
 This has been tested using cassandra 2.1 with the following table:
 {code}
 CREATE TABLE test(
   key text,
   column text,
   data text,
   PRIMARY KEY(key, column)
 );
 {code}
 And then doing the following:
 {code}
 INSERT INTO test (key, column, data) VALUES (1, 1, 1); // If the 
 sstable only contains tombstones during compaction it seems that the sstable 
 either gets removed or isn't created (but that could probably be a separate 
 JIRA issue).
 INSERT INTO test (key, column, data) VALUES (1, 2, 2); // The inserts 
 are not actually needed, since the deletes create tombstones either way.
 DELETE FROM test WHERE key=1 AND column=2;
 nodetool flush
 INSERT INTO test (key, column, data) VALUES (1, 2, 2);
 DELETE FROM test WHERE key=1 AND column=2;
 nodetool flush
 nodetool compact
 {code}
 When checking with the SSTableExport tool two tombstones exists in the 
 compacted sstable. This can be repeated, resulting in more and more 
 tombstones.



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


[jira] [Updated] (CASSANDRA-4914) Aggregation functions in CQL

2014-09-18 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer updated CASSANDRA-4914:
--
Attachment: CASSANDRA-4914-V4.txt

Fix the style inconsistencies of AggregateFcts and add an extra test for UDF 
nested within an AggregateFunction.

 Aggregation functions in CQL
 

 Key: CASSANDRA-4914
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4914
 Project: Cassandra
  Issue Type: New Feature
Reporter: Vijay
Assignee: Benjamin Lerer
  Labels: cql, docs
 Fix For: 3.0

 Attachments: CASSANDRA-4914-V2.txt, CASSANDRA-4914-V3.txt, 
 CASSANDRA-4914-V4.txt, CASSANDRA-4914.txt


 The requirement is to do aggregation of data in Cassandra (Wide row of column 
 values of int, double, float etc).
 With some basic agree gate functions like AVG, SUM, Mean, Min, Max, etc (for 
 the columns within a row).
 Example:
 SELECT * FROM emp WHERE empID IN (130) ORDER BY deptID DESC;  
   
  empid | deptid | first_name | last_name | salary
 ---+++---+
130 |  3 | joe| doe   |   10.1
130 |  2 | joe| doe   |100
130 |  1 | joe| doe   |  1e+03
  
 SELECT sum(salary), empid FROM emp WHERE empID IN (130);  
   
  sum(salary) | empid
 -+
1110.1|  130



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


[jira] [Updated] (CASSANDRA-7924) Optimization of Java UDFs

2014-09-18 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer updated CASSANDRA-7924:
--
Reviewer: Benjamin Lerer
  Labels: docs lhf udf  (was: lhf udf)

 Optimization of Java UDFs
 -

 Key: CASSANDRA-7924
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7924
 Project: Cassandra
  Issue Type: Bug
Reporter: Robert Stupp
Assignee: Robert Stupp
  Labels: docs, lhf, udf
 Fix For: 3.0

 Attachments: 7924.txt


 Refactor 'java' UDFs to optimize invocation. Goal is to remove reflection 
 code. Implementation uses javassist to generate an instance of {{Function}} 
 that can be directly used.



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


[jira] [Updated] (CASSANDRA-7953) RangeTombstones not merging during compaction

2014-09-18 Thread Marcus Olsson (JIRA)

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

Marcus Olsson updated CASSANDRA-7953:
-
Attachment: CASSANDRA-7953-1.patch

 RangeTombstones not merging during compaction
 -

 Key: CASSANDRA-7953
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7953
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: Cassandra 2.1
Reporter: Marcus Olsson
Priority: Minor
  Labels: compaction, deletes, tombstone
 Attachments: CASSANDRA-7953-1.patch, CASSANDRA-7953.patch


 When performing a compaction on two sstables that contain the same 
 RangeTombstone with different timestamps, the tombstones are not merged in 
 the new sstable.
 This has been tested using cassandra 2.1 with the following table:
 {code}
 CREATE TABLE test(
   key text,
   column text,
   data text,
   PRIMARY KEY(key, column)
 );
 {code}
 And then doing the following:
 {code}
 INSERT INTO test (key, column, data) VALUES (1, 1, 1); // If the 
 sstable only contains tombstones during compaction it seems that the sstable 
 either gets removed or isn't created (but that could probably be a separate 
 JIRA issue).
 INSERT INTO test (key, column, data) VALUES (1, 2, 2); // The inserts 
 are not actually needed, since the deletes create tombstones either way.
 DELETE FROM test WHERE key=1 AND column=2;
 nodetool flush
 INSERT INTO test (key, column, data) VALUES (1, 2, 2);
 DELETE FROM test WHERE key=1 AND column=2;
 nodetool flush
 nodetool compact
 {code}
 When checking with the SSTableExport tool two tombstones exists in the 
 compacted sstable. This can be repeated, resulting in more and more 
 tombstones.



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


[jira] [Commented] (CASSANDRA-7953) RangeTombstones not merging during compaction

2014-09-18 Thread Marcus Olsson (JIRA)

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

Marcus Olsson commented on CASSANDRA-7953:
--

Added case for when tombstone timestamps are equal, but not the range.

 RangeTombstones not merging during compaction
 -

 Key: CASSANDRA-7953
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7953
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: Cassandra 2.1
Reporter: Marcus Olsson
Priority: Minor
  Labels: compaction, deletes, tombstone
 Attachments: CASSANDRA-7953-1.patch, CASSANDRA-7953.patch


 When performing a compaction on two sstables that contain the same 
 RangeTombstone with different timestamps, the tombstones are not merged in 
 the new sstable.
 This has been tested using cassandra 2.1 with the following table:
 {code}
 CREATE TABLE test(
   key text,
   column text,
   data text,
   PRIMARY KEY(key, column)
 );
 {code}
 And then doing the following:
 {code}
 INSERT INTO test (key, column, data) VALUES (1, 1, 1); // If the 
 sstable only contains tombstones during compaction it seems that the sstable 
 either gets removed or isn't created (but that could probably be a separate 
 JIRA issue).
 INSERT INTO test (key, column, data) VALUES (1, 2, 2); // The inserts 
 are not actually needed, since the deletes create tombstones either way.
 DELETE FROM test WHERE key=1 AND column=2;
 nodetool flush
 INSERT INTO test (key, column, data) VALUES (1, 2, 2);
 DELETE FROM test WHERE key=1 AND column=2;
 nodetool flush
 nodetool compact
 {code}
 When checking with the SSTableExport tool two tombstones exists in the 
 compacted sstable. This can be repeated, resulting in more and more 
 tombstones.



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


[jira] [Updated] (CASSANDRA-6075) The token function should allow column identifiers in the correct order only

2014-09-18 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer updated CASSANDRA-6075:
--
Attachment: CASSANDRA-2.1-6075.txt

This is the patch for the 2.1 branch. It differs from the one of the 2.0 branch 
because the 2.1 branch is using CFMetaData instead of CFDefinition. The test 
has also been migrated to CQLTester

 The token function should allow column identifiers in the correct order only
 

 Key: CASSANDRA-6075
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6075
 Project: Cassandra
  Issue Type: Bug
 Environment: Cassandra 1.2.9
Reporter: Michaël Figuière
Assignee: Benjamin Lerer
Priority: Minor
  Labels: cql
 Fix For: 2.0.11

 Attachments: CASSANDRA-2.1-6075.txt, CASSANDRA-6075.txt


 Given the following table:
 {code}
 CREATE TABLE t1 (a int, b text, PRIMARY KEY ((a, b)));
 {code}
 The following request returns an error in cqlsh as literal arguments order is 
 incorrect:
 {code}
 SELECT * FROM t1 WHERE token(a, b)  token('s', 1);
 Bad Request: Type error: 's' cannot be passed as argument 0 of function token 
 of type int
 {code}
 But surprisingly if we provide the column identifier arguments in the wrong 
 order no error is returned:
 {code}
 SELECT * FROM t1 WHERE token(a, b)  token(1, 'a'); // correct order is valid
 SELECT * FROM t1 WHERE token(b, a)  token(1, 'a'); // incorrect order is 
 valid as well
 {code}



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


[5/6] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1

2014-09-18 Thread brandonwilliams
Merge branch 'cassandra-2.0' into cassandra-2.1

Conflicts:
CHANGES.txt


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

Branch: refs/heads/cassandra-2.1
Commit: ace937eb70c4b1bf4626c6ce48d4577585ac5c0e
Parents: 5ba1f80 549f035
Author: Brandon Williams brandonwilli...@apache.org
Authored: Thu Sep 18 06:52:25 2014 +
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Thu Sep 18 06:52:25 2014 +

--
 CHANGES.txt |  3 ++
 src/java/org/apache/cassandra/auth/Auth.java| 46 +++-
 .../org/apache/cassandra/auth/AuthMBean.java| 25 +++
 .../cassandra/config/DatabaseDescriptor.java|  6 +++
 .../apache/cassandra/service/ClientState.java   | 31 +
 5 files changed, 81 insertions(+), 30 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ace937eb/CHANGES.txt
--
diff --cc CHANGES.txt
index 5125c77,01d32e7..d25fee5
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,48 -1,5 +1,51 @@@
 +2.1.1
 + * Provide visibility into prepared statements churn (CASSANDRA-7921)
 + * Invalidate prepared statements when their keyspace or table is
 +   dropped (CASSANDRA-7566)
 + * cassandra-stress: fix support for NetworkTopologyStrategy (CASSANDRA-7945)
 + * Fix saving caches when a table is dropped (CASSANDRA-7784)
 + * Add better error checking of new stress profile (CASSANDRA-7716)
 + * Use ThreadLocalRandom and remove FBUtilities.threadLocalRandom 
(CASSANDRA-7934)
 + * Prevent operator mistakes due to simultaneous bootstrap (CASSANDRA-7069)
 + * cassandra-stress supports whitelist mode for node config (CASSANDRA-7658)
 + * GCInspector more closely tracks GC; cassandra-stress and nodetool report 
it (CASSANDRA-7916)
 + * nodetool won't output bogus ownership info without a keyspace 
(CASSANDRA-7173)
 + * Add human readable option to nodetool commands (CASSANDRA-5433)
 + * Don't try to set repairedAt on old sstables (CASSANDRA-7913)
 + * Add metrics for tracking PreparedStatement use (CASSANDRA-7719)
 + * (cqlsh) tab-completion for triggers (CASSANDRA-7824)
 + * (cqlsh) Support for query paging (CASSANDRA-7514)
 + * (cqlsh) Show progress of COPY operations (CASSANDRA-7789)
 + * Add syntax to remove multiple elements from a map (CASSANDRA-6599)
 + * Support non-equals conditions in lightweight transactions (CASSANDRA-6839)
 + * Add IF [NOT] EXISTS to create/drop triggers (CASSANDRA-7606)
 + * (cqlsh) Display the current logged-in user (CASSANDRA-7785)
 + * (cqlsh) Don't ignore CTRL-C during COPY FROM execution (CASSANDRA-7815)
 + * (cqlsh) Order UDTs according to cross-type dependencies in DESCRIBE
 +   output (CASSANDRA-7659)
 + * (cqlsh) Fix handling of CAS statement results (CASSANDRA-7671)
 + * (cqlsh) COPY TO/FROM improvements (CASSANDRA-7405)
 + * Support list index operations with conditions (CASSANDRA-7499)
 + * Add max live/tombstoned cells to nodetool cfstats output (CASSANDRA-7731)
 + * Validate IPv6 wildcard addresses properly (CASSANDRA-7680)
 + * (cqlsh) Error when tracing query (CASSANDRA-7613)
 + * Avoid IOOBE when building SyntaxError message snippet (CASSANDRA-7569)
 + * SSTableExport uses correct validator to create string representation of 
partition
 +   keys (CASSANDRA-7498)
 + * Avoid NPEs when receiving type changes for an unknown keyspace 
(CASSANDRA-7689)
 + * Add support for custom 2i validation (CASSANDRA-7575)
 + * Pig support for hadoop CqlInputFormat (CASSANDRA-6454)
 + * Add listen_interface and rpc_interface options (CASSANDRA-7417)
 + * Improve schema merge performance (CASSANDRA-7444)
 + * Adjust MT depth based on # of partition validating (CASSANDRA-5263)
 + * Optimise NativeCell comparisons (CASSANDRA-6755)
 + * Configurable client timeout for cqlsh (CASSANDRA-7516)
 + * Include snippet of CQL query near syntax error in messages (CASSANDRA-7111)
 + * Make repair -pr work with -local (CASSANDRA-7450)
 +Merged from 2.0:
++===
+ 2.0.11:
+  * Allow permissions cache to be set via JMX (CASSANDRA-7698)
   * Include schema_triggers CF in readable system resources (CASSANDRA-7967)
   * Fix RowIndexEntry to report correct serializedSize (CASSANDRA-7948)
   * Make CQLSSTableWriter sync within partitions (CASSANDRA-7360)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ace937eb/src/java/org/apache/cassandra/auth/Auth.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ace937eb/src/java/org/apache/cassandra/config/DatabaseDescriptor.java

[1/6] git commit: Allow permissions cache to be set via JMX

2014-09-18 Thread brandonwilliams
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 62db99037 - 549f035b9
  refs/heads/cassandra-2.1 5ba1f80a2 - ace937eb7
  refs/heads/trunk d57890ca6 - 381ff18b2


Allow permissions cache to be set via JMX

Patch by brandonwilliams, reviewed by aleksey for CASSANDRA-7968


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

Branch: refs/heads/cassandra-2.0
Commit: 549f035b925d6b49400667401bef96baaceb31fd
Parents: 62db990
Author: Brandon Williams brandonwilli...@apache.org
Authored: Thu Sep 18 06:51:22 2014 +
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Thu Sep 18 06:51:22 2014 +

--
 CHANGES.txt |  1 +
 src/java/org/apache/cassandra/auth/Auth.java| 46 +++-
 .../org/apache/cassandra/auth/AuthMBean.java| 25 +++
 .../cassandra/config/DatabaseDescriptor.java|  6 +++
 .../apache/cassandra/service/ClientState.java   | 31 +
 5 files changed, 79 insertions(+), 30 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/549f035b/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 1eab20e..01d32e7 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.11:
+ * Allow permissions cache to be set via JMX (CASSANDRA-7698)
  * Include schema_triggers CF in readable system resources (CASSANDRA-7967)
  * Fix RowIndexEntry to report correct serializedSize (CASSANDRA-7948)
  * Make CQLSSTableWriter sync within partitions (CASSANDRA-7360)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/549f035b/src/java/org/apache/cassandra/auth/Auth.java
--
diff --git a/src/java/org/apache/cassandra/auth/Auth.java 
b/src/java/org/apache/cassandra/auth/Auth.java
index f3fcdf0..8027db4 100644
--- a/src/java/org/apache/cassandra/auth/Auth.java
+++ b/src/java/org/apache/cassandra/auth/Auth.java
@@ -17,8 +17,12 @@
  */
 package org.apache.cassandra.auth;
 
+import java.util.Set;
 import java.util.concurrent.TimeUnit;
 
+import com.google.common.cache.CacheBuilder;
+import com.google.common.cache.CacheLoader;
+import com.google.common.cache.LoadingCache;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Lists;
 import org.apache.commons.lang3.StringUtils;
@@ -39,8 +43,9 @@ import org.apache.cassandra.locator.SimpleStrategy;
 import org.apache.cassandra.service.*;
 import org.apache.cassandra.transport.messages.ResultMessage;
 import org.apache.cassandra.utils.ByteBufferUtil;
+import org.apache.cassandra.utils.Pair;
 
-public class Auth
+public class Auth implements AuthMBean
 {
 private static final Logger logger = LoggerFactory.getLogger(Auth.class);
 
@@ -51,6 +56,10 @@ public class Auth
 public static final String AUTH_KS = system_auth;
 public static final String USERS_CF = users;
 
+// User-level permissions cache.
+public static volatile LoadingCachePairAuthenticatedUser, IResource, 
SetPermission permissionsCache = initPermissionsCache(null);
+
+
 private static final String USERS_CF_SCHEMA = String.format(CREATE TABLE 
%s.%s (
 + name text,
 + super 
boolean,
@@ -62,6 +71,41 @@ public class Auth
 
 private static SelectStatement selectUserStatement;
 
+public int getPermissionsValidity()
+{
+return DatabaseDescriptor.getPermissionsValidity();
+}
+
+public void setPermissionsValidity(int timeoutInMs)
+{
+DatabaseDescriptor.setPermissionsValidity(timeoutInMs);
+permissionsCache = initPermissionsCache(permissionsCache);
+}
+
+private static LoadingCachePairAuthenticatedUser, IResource, 
SetPermission initPermissionsCache(LoadingCachePairAuthenticatedUser, 
IResource, SetPermission oldCache)
+{
+if (DatabaseDescriptor.getAuthorizer() instanceof AllowAllAuthorizer)
+return null;
+
+int validityPeriod = DatabaseDescriptor.getPermissionsValidity();
+if (validityPeriod = 0)
+return null;
+
+LoadingCachePairAuthenticatedUser, IResource, SetPermission 
newCache =
+CacheBuilder.newBuilder().expireAfterWrite(validityPeriod, 
TimeUnit.MILLISECONDS)
+.build(new CacheLoaderPairAuthenticatedUser, IResource, 
SetPermission()
+{
+public SetPermission load(PairAuthenticatedUser, 
IResource userResource)
+{
+

[4/6] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1

2014-09-18 Thread brandonwilliams
Merge branch 'cassandra-2.0' into cassandra-2.1

Conflicts:
CHANGES.txt


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

Branch: refs/heads/trunk
Commit: ace937eb70c4b1bf4626c6ce48d4577585ac5c0e
Parents: 5ba1f80 549f035
Author: Brandon Williams brandonwilli...@apache.org
Authored: Thu Sep 18 06:52:25 2014 +
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Thu Sep 18 06:52:25 2014 +

--
 CHANGES.txt |  3 ++
 src/java/org/apache/cassandra/auth/Auth.java| 46 +++-
 .../org/apache/cassandra/auth/AuthMBean.java| 25 +++
 .../cassandra/config/DatabaseDescriptor.java|  6 +++
 .../apache/cassandra/service/ClientState.java   | 31 +
 5 files changed, 81 insertions(+), 30 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ace937eb/CHANGES.txt
--
diff --cc CHANGES.txt
index 5125c77,01d32e7..d25fee5
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,48 -1,5 +1,51 @@@
 +2.1.1
 + * Provide visibility into prepared statements churn (CASSANDRA-7921)
 + * Invalidate prepared statements when their keyspace or table is
 +   dropped (CASSANDRA-7566)
 + * cassandra-stress: fix support for NetworkTopologyStrategy (CASSANDRA-7945)
 + * Fix saving caches when a table is dropped (CASSANDRA-7784)
 + * Add better error checking of new stress profile (CASSANDRA-7716)
 + * Use ThreadLocalRandom and remove FBUtilities.threadLocalRandom 
(CASSANDRA-7934)
 + * Prevent operator mistakes due to simultaneous bootstrap (CASSANDRA-7069)
 + * cassandra-stress supports whitelist mode for node config (CASSANDRA-7658)
 + * GCInspector more closely tracks GC; cassandra-stress and nodetool report 
it (CASSANDRA-7916)
 + * nodetool won't output bogus ownership info without a keyspace 
(CASSANDRA-7173)
 + * Add human readable option to nodetool commands (CASSANDRA-5433)
 + * Don't try to set repairedAt on old sstables (CASSANDRA-7913)
 + * Add metrics for tracking PreparedStatement use (CASSANDRA-7719)
 + * (cqlsh) tab-completion for triggers (CASSANDRA-7824)
 + * (cqlsh) Support for query paging (CASSANDRA-7514)
 + * (cqlsh) Show progress of COPY operations (CASSANDRA-7789)
 + * Add syntax to remove multiple elements from a map (CASSANDRA-6599)
 + * Support non-equals conditions in lightweight transactions (CASSANDRA-6839)
 + * Add IF [NOT] EXISTS to create/drop triggers (CASSANDRA-7606)
 + * (cqlsh) Display the current logged-in user (CASSANDRA-7785)
 + * (cqlsh) Don't ignore CTRL-C during COPY FROM execution (CASSANDRA-7815)
 + * (cqlsh) Order UDTs according to cross-type dependencies in DESCRIBE
 +   output (CASSANDRA-7659)
 + * (cqlsh) Fix handling of CAS statement results (CASSANDRA-7671)
 + * (cqlsh) COPY TO/FROM improvements (CASSANDRA-7405)
 + * Support list index operations with conditions (CASSANDRA-7499)
 + * Add max live/tombstoned cells to nodetool cfstats output (CASSANDRA-7731)
 + * Validate IPv6 wildcard addresses properly (CASSANDRA-7680)
 + * (cqlsh) Error when tracing query (CASSANDRA-7613)
 + * Avoid IOOBE when building SyntaxError message snippet (CASSANDRA-7569)
 + * SSTableExport uses correct validator to create string representation of 
partition
 +   keys (CASSANDRA-7498)
 + * Avoid NPEs when receiving type changes for an unknown keyspace 
(CASSANDRA-7689)
 + * Add support for custom 2i validation (CASSANDRA-7575)
 + * Pig support for hadoop CqlInputFormat (CASSANDRA-6454)
 + * Add listen_interface and rpc_interface options (CASSANDRA-7417)
 + * Improve schema merge performance (CASSANDRA-7444)
 + * Adjust MT depth based on # of partition validating (CASSANDRA-5263)
 + * Optimise NativeCell comparisons (CASSANDRA-6755)
 + * Configurable client timeout for cqlsh (CASSANDRA-7516)
 + * Include snippet of CQL query near syntax error in messages (CASSANDRA-7111)
 + * Make repair -pr work with -local (CASSANDRA-7450)
 +Merged from 2.0:
++===
+ 2.0.11:
+  * Allow permissions cache to be set via JMX (CASSANDRA-7698)
   * Include schema_triggers CF in readable system resources (CASSANDRA-7967)
   * Fix RowIndexEntry to report correct serializedSize (CASSANDRA-7948)
   * Make CQLSSTableWriter sync within partitions (CASSANDRA-7360)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ace937eb/src/java/org/apache/cassandra/auth/Auth.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ace937eb/src/java/org/apache/cassandra/config/DatabaseDescriptor.java

[3/6] git commit: Allow permissions cache to be set via JMX

2014-09-18 Thread brandonwilliams
Allow permissions cache to be set via JMX

Patch by brandonwilliams, reviewed by aleksey for CASSANDRA-7968


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

Branch: refs/heads/trunk
Commit: 549f035b925d6b49400667401bef96baaceb31fd
Parents: 62db990
Author: Brandon Williams brandonwilli...@apache.org
Authored: Thu Sep 18 06:51:22 2014 +
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Thu Sep 18 06:51:22 2014 +

--
 CHANGES.txt |  1 +
 src/java/org/apache/cassandra/auth/Auth.java| 46 +++-
 .../org/apache/cassandra/auth/AuthMBean.java| 25 +++
 .../cassandra/config/DatabaseDescriptor.java|  6 +++
 .../apache/cassandra/service/ClientState.java   | 31 +
 5 files changed, 79 insertions(+), 30 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/549f035b/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 1eab20e..01d32e7 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.11:
+ * Allow permissions cache to be set via JMX (CASSANDRA-7698)
  * Include schema_triggers CF in readable system resources (CASSANDRA-7967)
  * Fix RowIndexEntry to report correct serializedSize (CASSANDRA-7948)
  * Make CQLSSTableWriter sync within partitions (CASSANDRA-7360)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/549f035b/src/java/org/apache/cassandra/auth/Auth.java
--
diff --git a/src/java/org/apache/cassandra/auth/Auth.java 
b/src/java/org/apache/cassandra/auth/Auth.java
index f3fcdf0..8027db4 100644
--- a/src/java/org/apache/cassandra/auth/Auth.java
+++ b/src/java/org/apache/cassandra/auth/Auth.java
@@ -17,8 +17,12 @@
  */
 package org.apache.cassandra.auth;
 
+import java.util.Set;
 import java.util.concurrent.TimeUnit;
 
+import com.google.common.cache.CacheBuilder;
+import com.google.common.cache.CacheLoader;
+import com.google.common.cache.LoadingCache;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Lists;
 import org.apache.commons.lang3.StringUtils;
@@ -39,8 +43,9 @@ import org.apache.cassandra.locator.SimpleStrategy;
 import org.apache.cassandra.service.*;
 import org.apache.cassandra.transport.messages.ResultMessage;
 import org.apache.cassandra.utils.ByteBufferUtil;
+import org.apache.cassandra.utils.Pair;
 
-public class Auth
+public class Auth implements AuthMBean
 {
 private static final Logger logger = LoggerFactory.getLogger(Auth.class);
 
@@ -51,6 +56,10 @@ public class Auth
 public static final String AUTH_KS = system_auth;
 public static final String USERS_CF = users;
 
+// User-level permissions cache.
+public static volatile LoadingCachePairAuthenticatedUser, IResource, 
SetPermission permissionsCache = initPermissionsCache(null);
+
+
 private static final String USERS_CF_SCHEMA = String.format(CREATE TABLE 
%s.%s (
 + name text,
 + super 
boolean,
@@ -62,6 +71,41 @@ public class Auth
 
 private static SelectStatement selectUserStatement;
 
+public int getPermissionsValidity()
+{
+return DatabaseDescriptor.getPermissionsValidity();
+}
+
+public void setPermissionsValidity(int timeoutInMs)
+{
+DatabaseDescriptor.setPermissionsValidity(timeoutInMs);
+permissionsCache = initPermissionsCache(permissionsCache);
+}
+
+private static LoadingCachePairAuthenticatedUser, IResource, 
SetPermission initPermissionsCache(LoadingCachePairAuthenticatedUser, 
IResource, SetPermission oldCache)
+{
+if (DatabaseDescriptor.getAuthorizer() instanceof AllowAllAuthorizer)
+return null;
+
+int validityPeriod = DatabaseDescriptor.getPermissionsValidity();
+if (validityPeriod = 0)
+return null;
+
+LoadingCachePairAuthenticatedUser, IResource, SetPermission 
newCache =
+CacheBuilder.newBuilder().expireAfterWrite(validityPeriod, 
TimeUnit.MILLISECONDS)
+.build(new CacheLoaderPairAuthenticatedUser, IResource, 
SetPermission()
+{
+public SetPermission load(PairAuthenticatedUser, 
IResource userResource)
+{
+return 
DatabaseDescriptor.getAuthorizer().authorize(userResource.left,
+userResource.right);
+}
+   

[6/6] git commit: Merge branch 'cassandra-2.1' into trunk

2014-09-18 Thread brandonwilliams
Merge branch 'cassandra-2.1' into trunk


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

Branch: refs/heads/trunk
Commit: 381ff18b2390e5134b04b2669f44718b3c865238
Parents: d57890c ace937e
Author: Brandon Williams brandonwilli...@apache.org
Authored: Thu Sep 18 06:52:34 2014 +
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Thu Sep 18 06:52:34 2014 +

--
 CHANGES.txt |  3 ++
 src/java/org/apache/cassandra/auth/Auth.java| 46 +++-
 .../org/apache/cassandra/auth/AuthMBean.java| 25 +++
 .../cassandra/config/DatabaseDescriptor.java|  6 +++
 .../apache/cassandra/service/ClientState.java   | 31 +
 5 files changed, 81 insertions(+), 30 deletions(-)
--


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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/381ff18b/src/java/org/apache/cassandra/auth/Auth.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/381ff18b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/381ff18b/src/java/org/apache/cassandra/service/ClientState.java
--
diff --cc src/java/org/apache/cassandra/service/ClientState.java
index 20682e9,09dc165..435c651
--- a/src/java/org/apache/cassandra/service/ClientState.java
+++ b/src/java/org/apache/cassandra/service/ClientState.java
@@@ -20,13 -20,10 +20,9 @@@ package org.apache.cassandra.service
  import java.net.SocketAddress;
  import java.util.*;
  import java.util.concurrent.ExecutionException;
- import java.util.concurrent.TimeUnit;
  
- import com.google.common.cache.CacheBuilder;
- import com.google.common.cache.CacheLoader;
- import com.google.common.cache.LoadingCache;
  import com.google.common.collect.Iterables;
  import com.google.common.collect.Sets;
 -import org.apache.commons.lang3.StringUtils;
  import org.slf4j.Logger;
  import org.slf4j.LoggerFactory;
  
@@@ -271,31 -298,19 +264,11 @@@ public class ClientStat
  return user;
  }
  
 -public SemanticVersion getCQLVersion()
 -{
 -return cqlVersion;
 -}
 -
  public static SemanticVersion[] getCQLSupportedVersion()
  {
 -SemanticVersion cql = 
org.apache.cassandra.cql.QueryProcessor.CQL_VERSION;
 -SemanticVersion cql3 = 
org.apache.cassandra.cql3.QueryProcessor.CQL_VERSION;
 -
 -return new SemanticVersion[]{ cql, cql3 };
 +return new SemanticVersion[]{ QueryProcessor.CQL_VERSION };
  }
  
- private static LoadingCachePairAuthenticatedUser, IResource, 
SetPermission initPermissionsCache()
- {
- if (DatabaseDescriptor.getAuthorizer() instanceof AllowAllAuthorizer)
- return null;
- 
- int validityPeriod = DatabaseDescriptor.getPermissionsValidity();
- if (validityPeriod = 0)
- return null;
- 
- return CacheBuilder.newBuilder().expireAfterWrite(validityPeriod, 
TimeUnit.MILLISECONDS)
- .build(new 
CacheLoaderPairAuthenticatedUser, IResource, SetPermission()
- {
- public SetPermission 
load(PairAuthenticatedUser, IResource userResource)
- {
- return 
DatabaseDescriptor.getAuthorizer().authorize(userResource.left,
-   
  userResource.right);
- }
- });
- }
- 
  private SetPermission authorize(IResource resource)
  {
  // AllowAllAuthorizer or manually disabled caching.



[2/6] git commit: Allow permissions cache to be set via JMX

2014-09-18 Thread brandonwilliams
Allow permissions cache to be set via JMX

Patch by brandonwilliams, reviewed by aleksey for CASSANDRA-7968


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

Branch: refs/heads/cassandra-2.1
Commit: 549f035b925d6b49400667401bef96baaceb31fd
Parents: 62db990
Author: Brandon Williams brandonwilli...@apache.org
Authored: Thu Sep 18 06:51:22 2014 +
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Thu Sep 18 06:51:22 2014 +

--
 CHANGES.txt |  1 +
 src/java/org/apache/cassandra/auth/Auth.java| 46 +++-
 .../org/apache/cassandra/auth/AuthMBean.java| 25 +++
 .../cassandra/config/DatabaseDescriptor.java|  6 +++
 .../apache/cassandra/service/ClientState.java   | 31 +
 5 files changed, 79 insertions(+), 30 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/549f035b/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 1eab20e..01d32e7 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.11:
+ * Allow permissions cache to be set via JMX (CASSANDRA-7698)
  * Include schema_triggers CF in readable system resources (CASSANDRA-7967)
  * Fix RowIndexEntry to report correct serializedSize (CASSANDRA-7948)
  * Make CQLSSTableWriter sync within partitions (CASSANDRA-7360)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/549f035b/src/java/org/apache/cassandra/auth/Auth.java
--
diff --git a/src/java/org/apache/cassandra/auth/Auth.java 
b/src/java/org/apache/cassandra/auth/Auth.java
index f3fcdf0..8027db4 100644
--- a/src/java/org/apache/cassandra/auth/Auth.java
+++ b/src/java/org/apache/cassandra/auth/Auth.java
@@ -17,8 +17,12 @@
  */
 package org.apache.cassandra.auth;
 
+import java.util.Set;
 import java.util.concurrent.TimeUnit;
 
+import com.google.common.cache.CacheBuilder;
+import com.google.common.cache.CacheLoader;
+import com.google.common.cache.LoadingCache;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Lists;
 import org.apache.commons.lang3.StringUtils;
@@ -39,8 +43,9 @@ import org.apache.cassandra.locator.SimpleStrategy;
 import org.apache.cassandra.service.*;
 import org.apache.cassandra.transport.messages.ResultMessage;
 import org.apache.cassandra.utils.ByteBufferUtil;
+import org.apache.cassandra.utils.Pair;
 
-public class Auth
+public class Auth implements AuthMBean
 {
 private static final Logger logger = LoggerFactory.getLogger(Auth.class);
 
@@ -51,6 +56,10 @@ public class Auth
 public static final String AUTH_KS = system_auth;
 public static final String USERS_CF = users;
 
+// User-level permissions cache.
+public static volatile LoadingCachePairAuthenticatedUser, IResource, 
SetPermission permissionsCache = initPermissionsCache(null);
+
+
 private static final String USERS_CF_SCHEMA = String.format(CREATE TABLE 
%s.%s (
 + name text,
 + super 
boolean,
@@ -62,6 +71,41 @@ public class Auth
 
 private static SelectStatement selectUserStatement;
 
+public int getPermissionsValidity()
+{
+return DatabaseDescriptor.getPermissionsValidity();
+}
+
+public void setPermissionsValidity(int timeoutInMs)
+{
+DatabaseDescriptor.setPermissionsValidity(timeoutInMs);
+permissionsCache = initPermissionsCache(permissionsCache);
+}
+
+private static LoadingCachePairAuthenticatedUser, IResource, 
SetPermission initPermissionsCache(LoadingCachePairAuthenticatedUser, 
IResource, SetPermission oldCache)
+{
+if (DatabaseDescriptor.getAuthorizer() instanceof AllowAllAuthorizer)
+return null;
+
+int validityPeriod = DatabaseDescriptor.getPermissionsValidity();
+if (validityPeriod = 0)
+return null;
+
+LoadingCachePairAuthenticatedUser, IResource, SetPermission 
newCache =
+CacheBuilder.newBuilder().expireAfterWrite(validityPeriod, 
TimeUnit.MILLISECONDS)
+.build(new CacheLoaderPairAuthenticatedUser, IResource, 
SetPermission()
+{
+public SetPermission load(PairAuthenticatedUser, 
IResource userResource)
+{
+return 
DatabaseDescriptor.getAuthorizer().authorize(userResource.left,
+userResource.right);
+}
+   

[jira] [Commented] (CASSANDRA-7951) Add a Keep Alive operation to the Native Protocol

2014-09-18 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-7951:
---

Fix your firewall is an acceptable answer as far as I'm concerned.

 Add a Keep Alive operation to the Native Protocol
 -

 Key: CASSANDRA-7951
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7951
 Project: Cassandra
  Issue Type: New Feature
Reporter: Michaël Figuière
Priority: Minor
  Labels: protocolv4

 Socket level keep-alive option doesn't seem to bring a strong enough 
 guarantee that the connection won't be dropped as some OS or Firewall level 
 settings might force some different behavior.
 To simplify things and bring the strong guarantee on this point that users 
 expect, it would be interesting to add a {{NOOP}} or {{KEEPALIVE}}.
 Note that we could also turn it into a {{HEARTBEAT}} operation that would 
 expect a response from the server to allow client to regularly probe for 
 Cassandra node health in situation where the queries traffic is too low to 
 bring this probing implicitly.



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


[jira] [Resolved] (CASSANDRA-7954) Skip paxos for CAS if RF=1

2014-09-18 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis resolved CASSANDRA-7954.
---
Resolution: Invalid

Still need paxos to serialize across multiple coordinators.

 Skip paxos for CAS if RF=1
 --

 Key: CASSANDRA-7954
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7954
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Benedict
Priority: Minor
  Labels: performance

 If RF=1, there's no point doing a paxos round - we get just as much safety 
 and atomicity by simply conditionally applying the update locally



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


[jira] [Commented] (CASSANDRA-7954) Skip paxos for CAS if RF=1

2014-09-18 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-7954:
-

Why? They can all be resolved by the owning node, surely?

 Skip paxos for CAS if RF=1
 --

 Key: CASSANDRA-7954
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7954
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Benedict
Priority: Minor
  Labels: performance

 If RF=1, there's no point doing a paxos round - we get just as much safety 
 and atomicity by simply conditionally applying the update locally



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


[jira] [Updated] (CASSANDRA-7960) cassandra-stress should support LWT

2014-09-18 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-7960:
--
Summary: cassandra-stress should support LWT  (was: cassandra-stress should 
support CAS)

 cassandra-stress should support LWT
 ---

 Key: CASSANDRA-7960
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7960
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Reporter: Benedict
Priority: Minor
  Labels: stress





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


[jira] [Commented] (CASSANDRA-7032) Improve vnode allocation

2014-09-18 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-7032:
---

Curious what [~soverton] thinks of this.

 Improve vnode allocation
 

 Key: CASSANDRA-7032
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7032
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Benedict
Assignee: Branimir Lambov
  Labels: performance, vnodes
 Fix For: 3.0

 Attachments: TestVNodeAllocation.java, TestVNodeAllocation.java


 It's been known for a little while that random vnode allocation causes 
 hotspots of ownership. It should be possible to improve dramatically on this 
 with deterministic allocation. I have quickly thrown together a simple greedy 
 algorithm that allocates vnodes efficiently, and will repair hotspots in a 
 randomly allocated cluster gradually as more nodes are added, and also 
 ensures that token ranges are fairly evenly spread between nodes (somewhat 
 tunably so). The allocation still permits slight discrepancies in ownership, 
 but it is bound by the inverse of the size of the cluster (as opposed to 
 random allocation, which strangely gets worse as the cluster size increases). 
 I'm sure there is a decent dynamic programming solution to this that would be 
 even better.
 If on joining the ring a new node were to CAS a shared table where a 
 canonical allocation of token ranges lives after running this (or a similar) 
 algorithm, we could then get guaranteed bounds on the ownership distribution 
 in a cluster. This will also help for CASSANDRA-6696.



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


[jira] [Commented] (CASSANDRA-7843) Remove static singleton instances

2014-09-18 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-7843:
---

bq. I really don't have anything against static singletons. They make testing a 
bit harder, but there's not really anything wrong with them for development, so 
I don't really consider them technical debt as such.

Agreed.  I'm totally on board with removing singletons to improve reusability, 
but where there isn't any reusability to be had it's just masturbation.

 Remove static singleton instances
 -

 Key: CASSANDRA-7843
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7843
 Project: Cassandra
  Issue Type: Sub-task
Reporter: Blake Eggleston
Assignee: Blake Eggleston

 Initialize and start C* from a static method that takes a configuration as an 
 argument.
 CassandraDaemon and utilities will need to be updated, and we'll need a 
 helper method so tests can instantiate the database with a one or two liner.



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


[jira] [Commented] (CASSANDRA-7843) Remove static singleton instances

2014-09-18 Thread Blake Eggleston (JIRA)

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

Blake Eggleston commented on CASSANDRA-7843:


Fair enough, those are reasonable points. I suppose I overestimated the 
problems people had with static singletons. The singletons and static state 
_do_ cause a lot of pain developing applications that extend C*, but that's not 
really a C* problem


 Remove static singleton instances
 -

 Key: CASSANDRA-7843
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7843
 Project: Cassandra
  Issue Type: Sub-task
Reporter: Blake Eggleston
Assignee: Blake Eggleston

 Initialize and start C* from a static method that takes a configuration as an 
 argument.
 CassandraDaemon and utilities will need to be updated, and we'll need a 
 helper method so tests can instantiate the database with a one or two liner.



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


[2/3] git commit: rm dead code

2014-09-18 Thread brandonwilliams
rm dead code


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

Branch: refs/heads/trunk
Commit: 74877bb6aa26d6caa96ba9dd1954b7dac1c612e2
Parents: ace937e
Author: Brandon Williams brandonwilli...@apache.org
Authored: Thu Sep 18 08:12:32 2014 +
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Thu Sep 18 08:12:32 2014 +

--
 src/java/org/apache/cassandra/service/StorageService.java | 3 ---
 1 file changed, 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/74877bb6/src/java/org/apache/cassandra/service/StorageService.java
--
diff --git a/src/java/org/apache/cassandra/service/StorageService.java 
b/src/java/org/apache/cassandra/service/StorageService.java
index b1fe20e..7b92030 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -3680,9 +3680,6 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE

 TokenMetadata metadata = tokenMetadata.cloneOnlyTokenMap();
 
-if (keyspace == null)
-keyspace = Schema.instance.getNonSystemKeyspaces().get(0);
-
 CollectionCollectionInetAddress endpointsGroupedByDc = new 
ArrayList();
 // mapping of dc's to nodes, use sorted map so that we get dcs sorted
 SortedMapString, CollectionInetAddress sortedDcsToEndpoints = new 
TreeMap();



[3/3] git commit: Merge branch 'cassandra-2.1' into trunk

2014-09-18 Thread brandonwilliams
Merge branch 'cassandra-2.1' into trunk


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

Branch: refs/heads/trunk
Commit: b18478d05771d730ffaba0b236570b523e5a16e8
Parents: 381ff18 74877bb
Author: Brandon Williams brandonwilli...@apache.org
Authored: Thu Sep 18 08:12:39 2014 +
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Thu Sep 18 08:12:39 2014 +

--

--




[1/3] git commit: rm dead code

2014-09-18 Thread brandonwilliams
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 ace937eb7 - 74877bb6a
  refs/heads/trunk 381ff18b2 - b18478d05


rm dead code


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

Branch: refs/heads/cassandra-2.1
Commit: 74877bb6aa26d6caa96ba9dd1954b7dac1c612e2
Parents: ace937e
Author: Brandon Williams brandonwilli...@apache.org
Authored: Thu Sep 18 08:12:32 2014 +
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Thu Sep 18 08:12:32 2014 +

--
 src/java/org/apache/cassandra/service/StorageService.java | 3 ---
 1 file changed, 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/74877bb6/src/java/org/apache/cassandra/service/StorageService.java
--
diff --git a/src/java/org/apache/cassandra/service/StorageService.java 
b/src/java/org/apache/cassandra/service/StorageService.java
index b1fe20e..7b92030 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -3680,9 +3680,6 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE

 TokenMetadata metadata = tokenMetadata.cloneOnlyTokenMap();
 
-if (keyspace == null)
-keyspace = Schema.instance.getNonSystemKeyspaces().get(0);
-
 CollectionCollectionInetAddress endpointsGroupedByDc = new 
ArrayList();
 // mapping of dc's to nodes, use sorted map so that we get dcs sorted
 SortedMapString, CollectionInetAddress sortedDcsToEndpoints = new 
TreeMap();



git commit: include CASSANDRA-7941 to fix packaging issue with 2.1.0 deb

2014-09-18 Thread jake
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1.0-debfix [created] e06c1e838


include CASSANDRA-7941 to fix packaging issue with 2.1.0 deb


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

Branch: refs/heads/cassandra-2.1.0-debfix
Commit: e06c1e8381525363e90ccf694275361e2958647a
Parents: c6a2c65
Author: Jake Luciani j...@apache.org
Authored: Thu Sep 18 11:45:20 2014 -0400
Committer: Jake Luciani j...@apache.org
Committed: Thu Sep 18 11:45:20 2014 -0400

--
 debian/changelog  |  6 ++
 debian/patched/001cassandra_yaml_dirs.dpatch  |  3 +++
 debian/patched/002cassandra_logdir_fix.dpatch |  1 +
 debian/patches/001cassandra_yaml_dirs.dpatch  |  0
 debian/patches/002cassandra_logdir_fix.dpatch | 19 +++
 debian/patches/00list |  1 +
 debian/rules  |  2 +-
 7 files changed, 31 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e06c1e83/debian/changelog
--
diff --git a/debian/changelog b/debian/changelog
index f2ecceb..8bca662 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+cassandra (2.1.0-2) unstable; urgency=medium
+
+  * Package fixes  
+
+ -- Jake Luciani jake@ubuntuosx  Tue, 16 Sep 2014 10:47:24 -0400
+
 cassandra (2.1.0) unstable; urgency=medium
 
   * New release

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e06c1e83/debian/patched/001cassandra_yaml_dirs.dpatch
--
diff --git a/debian/patched/001cassandra_yaml_dirs.dpatch 
b/debian/patched/001cassandra_yaml_dirs.dpatch
new file mode 100644
index 000..4d5134a
--- /dev/null
+++ b/debian/patched/001cassandra_yaml_dirs.dpatch
@@ -0,0 +1,3 @@
+patching file conf/cassandra.yaml
+Hunk #1 succeeded at 95 (offset 1 line).
+Hunk #2 succeeded at 212 (offset 9 lines).

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e06c1e83/debian/patched/002cassandra_logdir_fix.dpatch
--
diff --git a/debian/patched/002cassandra_logdir_fix.dpatch 
b/debian/patched/002cassandra_logdir_fix.dpatch
new file mode 100644
index 000..6f6f4fc
--- /dev/null
+++ b/debian/patched/002cassandra_logdir_fix.dpatch
@@ -0,0 +1 @@
+patching file bin/cassandra

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e06c1e83/debian/patches/001cassandra_yaml_dirs.dpatch
--
diff --git a/debian/patches/001cassandra_yaml_dirs.dpatch 
b/debian/patches/001cassandra_yaml_dirs.dpatch
old mode 100644
new mode 100755

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e06c1e83/debian/patches/002cassandra_logdir_fix.dpatch
--
diff --git a/debian/patches/002cassandra_logdir_fix.dpatch 
b/debian/patches/002cassandra_logdir_fix.dpatch
new file mode 100755
index 000..8836eb4
--- /dev/null
+++ b/debian/patches/002cassandra_logdir_fix.dpatch
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## cassandra_logdir_fix.dpatch by Michael Shuler mich...@pbandjelly.org
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' 
'--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' 
cassandra~/bin/cassandra cassandra/bin/cassandra
+--- cassandra~/bin/cassandra   2014-09-15 19:42:28.0 -0500
 cassandra/bin/cassandra2014-09-15 21:15:15.627505503 -0500
+@@ -134,7 +134,7 @@
+ props=$3
+ class=$4
+ cassandra_parms=-Dlogback.configurationFile=logback.xml
+-cassandra_parms=$cassandra_parms -Dcassandra.logdir=$CASSANDRA_HOME/logs
++cassandra_parms=$cassandra_parms -Dcassandra.logdir=/var/log/cassandra
+ cassandra_parms=$cassandra_parms 
-Dcassandra.storagedir=$cassandra_storagedir
+ 
+ if [ x$pidpath != x ]; then

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e06c1e83/debian/patches/00list
--
diff --git a/debian/patches/00list b/debian/patches/00list
index 508c180..59b0d8b 100644
--- a/debian/patches/00list
+++ b/debian/patches/00list
@@ -1 +1,2 @@
 001cassandra_yaml_dirs.dpatch
+002cassandra_logdir_fix.dpatch

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e06c1e83/debian/rules
--
diff --git a/debian/rules 

Git Push Summary

2014-09-18 Thread jake
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1.0-debfix [deleted] e06c1e838


Git Push Summary

2014-09-18 Thread jake
Repository: cassandra
Updated Tags:  refs/tags/cassandra-2.1.0-deb [created] e06c1e838


[jira] [Commented] (CASSANDRA-7951) Add a Keep Alive operation to the Native Protocol

2014-09-18 Thread JIRA

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

Michaël Figuière commented on CASSANDRA-7951:
-

Do not underestimate the amount of bureaucracy and lobbying that can be 
required to have a firewall setting changed in large organizations, especially 
if that has to go through the security expert office :)

 Add a Keep Alive operation to the Native Protocol
 -

 Key: CASSANDRA-7951
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7951
 Project: Cassandra
  Issue Type: New Feature
Reporter: Michaël Figuière
Priority: Minor
  Labels: protocolv4

 Socket level keep-alive option doesn't seem to bring a strong enough 
 guarantee that the connection won't be dropped as some OS or Firewall level 
 settings might force some different behavior.
 To simplify things and bring the strong guarantee on this point that users 
 expect, it would be interesting to add a {{NOOP}} or {{KEEPALIVE}}.
 Note that we could also turn it into a {{HEARTBEAT}} operation that would 
 expect a response from the server to allow client to regularly probe for 
 Cassandra node health in situation where the queries traffic is too low to 
 bring this probing implicitly.



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


[jira] [Commented] (CASSANDRA-3017) add a Message size limit

2014-09-18 Thread Matt Stump (JIRA)

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

Matt Stump commented on CASSANDRA-3017:
---

I would like to request a small limit by default, something on the order of 
100k. I would like users to acknowledge that they are potentially doing 
something harmful, and possibly rethink their actions. Different limits should 
be enforced for user and cluster level communication if at all possible because 
it allows us to more effectively target and scold bad actors.

 add a Message size limit
 

 Key: CASSANDRA-3017
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3017
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Jonathan Ellis
Assignee: T Jake Luciani
Priority: Minor
  Labels: lhf
 Attachments: 
 0001-use-the-thrift-max-message-size-for-inter-node-messa.patch, 
 trunk-3017.txt


 We protect the server from allocating huge buffers for malformed message with 
 the Thrift frame size (CASSANDRA-475).  But we don't have similar protection 
 for the inter-node Message objects.
 Adding this would be good to deal with malicious adversaries as well as a 
 malfunctioning cluster participant.



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


[jira] [Updated] (CASSANDRA-3017) add a Message size limit

2014-09-18 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-3017:
--
Fix Version/s: 3.0

 add a Message size limit
 

 Key: CASSANDRA-3017
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3017
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Jonathan Ellis
Assignee: T Jake Luciani
Priority: Minor
  Labels: lhf
 Fix For: 3.0

 Attachments: 
 0001-use-the-thrift-max-message-size-for-inter-node-messa.patch, 
 trunk-3017.txt


 We protect the server from allocating huge buffers for malformed message with 
 the Thrift frame size (CASSANDRA-475).  But we don't have similar protection 
 for the inter-node Message objects.
 Adding this would be good to deal with malicious adversaries as well as a 
 malfunctioning cluster participant.



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


[jira] [Commented] (CASSANDRA-3017) add a Message size limit

2014-09-18 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-3017:
---

+1 small limit by default.  (That is why I am tagging 3.0.)

 add a Message size limit
 

 Key: CASSANDRA-3017
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3017
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Jonathan Ellis
Assignee: T Jake Luciani
Priority: Minor
  Labels: lhf
 Fix For: 3.0

 Attachments: 
 0001-use-the-thrift-max-message-size-for-inter-node-messa.patch, 
 trunk-3017.txt


 We protect the server from allocating huge buffers for malformed message with 
 the Thrift frame size (CASSANDRA-475).  But we don't have similar protection 
 for the inter-node Message objects.
 Adding this would be good to deal with malicious adversaries as well as a 
 malfunctioning cluster participant.



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


[Cassandra Wiki] Update of DebianPackaging by JakeLuciani

2014-09-18 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on Cassandra Wiki for 
change notification.

The DebianPackaging page has been changed by JakeLuciani:
https://wiki.apache.org/cassandra/DebianPackaging?action=diffrev1=33rev2=34

  {{{
  gpg --keyserver pgp.mit.edu --recv-keys 2B5C1B00
  gpg --export --armor 2B5C1B00 | sudo apt-key add -
+ }}}
+ 
+ You will also need to add public key 0353B12C using the same commands as 
above:
+ 
+ {{{
+ gpg --keyserver pgp.mit.edu --recv-keys 0353B12C
+ gpg --export --armor 0353B12C | sudo apt-key add -
  }}}
  
  (The list of Apache contributors public keys is available at 
[[http://www.apache.org/dist/cassandra/KEYS]]). 


[jira] [Commented] (CASSANDRA-7951) Add a Keep Alive operation to the Native Protocol

2014-09-18 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-7951:
-

I'm not really convinced this is needed either. If your client want to ping the 
server, presumably it will do so at a very hight rate, at which point the 
amount of CPU required to build a response to the {{OPTIONS}} is really 
completely irrelevant. And more importantly, it's probably smarter to actually 
do a trivial system table query (or even an actual user query) as on top of 
checking the network connection, this also check that your node is roughtly 
working correctly. 

 Add a Keep Alive operation to the Native Protocol
 -

 Key: CASSANDRA-7951
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7951
 Project: Cassandra
  Issue Type: New Feature
Reporter: Michaël Figuière
Priority: Minor
  Labels: protocolv4

 Socket level keep-alive option doesn't seem to bring a strong enough 
 guarantee that the connection won't be dropped as some OS or Firewall level 
 settings might force some different behavior.
 To simplify things and bring the strong guarantee on this point that users 
 expect, it would be interesting to add a {{NOOP}} or {{KEEPALIVE}}.
 Note that we could also turn it into a {{HEARTBEAT}} operation that would 
 expect a response from the server to allow client to regularly probe for 
 Cassandra node health in situation where the queries traffic is too low to 
 bring this probing implicitly.



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


Git Push Summary

2014-09-18 Thread jake
Repository: cassandra
Updated Tags:  refs/tags/cassandra-1.2.19 [created] 48acfec16


Git Push Summary

2014-09-18 Thread jake
Repository: cassandra
Updated Tags:  refs/tags/1.2.19-tentative [deleted] 2d29ebd41


[jira] [Commented] (CASSANDRA-7951) Add a Keep Alive operation to the Native Protocol

2014-09-18 Thread Tyler Hobbs (JIRA)

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

Tyler Hobbs commented on CASSANDRA-7951:


Agreed, doing a select on system.local is a better test of the server really 
being available.

 Add a Keep Alive operation to the Native Protocol
 -

 Key: CASSANDRA-7951
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7951
 Project: Cassandra
  Issue Type: New Feature
Reporter: Michaël Figuière
Priority: Minor
  Labels: protocolv4

 Socket level keep-alive option doesn't seem to bring a strong enough 
 guarantee that the connection won't be dropped as some OS or Firewall level 
 settings might force some different behavior.
 To simplify things and bring the strong guarantee on this point that users 
 expect, it would be interesting to add a {{NOOP}} or {{KEEPALIVE}}.
 Note that we could also turn it into a {{HEARTBEAT}} operation that would 
 expect a response from the server to allow client to regularly probe for 
 Cassandra node health in situation where the queries traffic is too low to 
 bring this probing implicitly.



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


[jira] [Commented] (CASSANDRA-7952) DataStax Agent Null Pointer Exception

2014-09-18 Thread Nick Bailey (JIRA)

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

Nick Bailey commented on CASSANDRA-7952:


[~harisekhon] the best place to report bugs like that is the feedback form in 
OpsCenter itself. Can you email me some additional info to nick @ datastax? 
Specifically what operating system and version you are on and which jvm you are 
using? I can file an internal Jira from there.

 DataStax Agent Null Pointer Exception
 -

 Key: CASSANDRA-7952
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7952
 Project: Cassandra
  Issue Type: Bug
 Environment: DSE 4.5.1, DataStax OpsCenter  Agent 5.0.0
Reporter: Hari Sekhon
Priority: Minor

 I've got a Null Pointer Exception in my DataStax OpsCenter Agent log, and 
 it's not reporting in to the OpsCenter. Here is the log
 {code}
  INFO [StompConnection receiver] 2014-09-17 13:01:15,992 New JMX connection 
 (127.0.0.1:7199)
  INFO [Jetty] 2014-09-17 13:01:16,019 Jetty server started
  INFO [Initialization] 2014-09-17 13:01:16,031 Using x.x.x.x as the cassandra 
 broadcast address
  INFO [StompConnection receiver] 2014-09-17 13:01:16,032 Starting up agent 
 collection.
  INFO [Initialization] 2014-09-17 13:01:16,162 agent RPC address is  x.x.x.x
  INFO [StompConnection receiver] 2014-09-17 13:01:16,162 agent RPC address is 
  x.x.x.x
  INFO [Initialization] 2014-09-17 13:01:16,162 agent RPC broadcast address is 
  x.x.x.x
  INFO [StompConnection receiver] 2014-09-17 13:01:16,162 agent RPC broadcast 
 address is  x.x.x.x
  INFO [StompConnection receiver] 2014-09-17 13:01:16,163 Starting OS metric 
 collectors (Linux)
  INFO [Initialization] 2014-09-17 13:01:16,166 Clearing ssl.truststore
  INFO [Initialization] 2014-09-17 13:01:16,166 Clearing 
 ssl.truststore.password
  INFO [Initialization] 2014-09-17 13:01:16,167 Setting ssl.store.type to JKS
  INFO [Initialization] 2014-09-17 13:01:16,167 Clearing 
 kerberos.service.principal.name
  INFO [Initialization] 2014-09-17 13:01:16,167 Clearing kerberos.principal
  INFO [Initialization] 2014-09-17 13:01:16,167 Setting 
 kerberos.useTicketCache to true
  INFO [Initialization] 2014-09-17 13:01:16,167 Clearing kerberos.ticketCache
  INFO [Initialization] 2014-09-17 13:01:16,168 Setting kerberos.useKeyTab to 
 true
  INFO [Initialization] 2014-09-17 13:01:16,168 Clearing kerberos.keyTab
  INFO [Initialization] 2014-09-17 13:01:16,168 Setting kerberos.renewTGT to 
 true
  INFO [Initialization] 2014-09-17 13:01:16,168 Setting kerberos.debug to false
  INFO [StompConnection receiver] 2014-09-17 13:01:16,171 Starting Cassandra 
 JMX metric collectors
  INFO [thrift-init] 2014-09-17 13:01:16,171 Connecting to Cassandra cluster: 
 x.x.x.x (port 9160)
  INFO [StompConnection receiver] 2014-09-17 13:01:16,187 New JMX connection 
 (127.0.0.1:7199)
  INFO [thrift-init] 2014-09-17 13:01:16,189 Downed Host Retry service started 
 with queue size -1 and retry delay 10s
  INFO [thrift-init] 2014-09-17 13:01:16,192 Registering JMX 
 me.prettyprint.cassandra.service_Agent 
 Cluster:ServiceType=hector,MonitorType=hector
  INFO [pdp-loader] 2014-09-17 13:01:16,231 in execute with client 
 org.apache.cassandra.thrift.Cassandra$Client@7a22c094
  INFO [pdp-loader] 2014-09-17 13:01:16,237 Attempting to load stored metric 
 values.
  INFO [thrift-init] 2014-09-17 13:01:16,240 Connected to Cassandra cluster: 
 PoC
  INFO [thrift-init] 2014-09-17 13:01:16,240 in execute with client 
 org.apache.cassandra.thrift.Cassandra$Client@7a22c094
  INFO [thrift-init] 2014-09-17 13:01:16,240 Using partitioner: 
 org.apache.cassandra.dht.Murmur3Partitioner
  INFO [jmx-metrics-1] 2014-09-17 13:01:21,181 New JMX connection 
 (127.0.0.1:7199)
 ERROR [StompConnection receiver] 2014-09-17 13:01:24,376 Failed to collect 
 machine info
 java.lang.NullPointerException
 at clojure.lang.Numbers.ops(Numbers.java:942)
 at clojure.lang.Numbers.divide(Numbers.java:157)
 at 
 opsagent.nodedetails.machine_info$get_machine_info.invoke(machine_info.clj:76)
 at 
 opsagent.nodedetails$get_static_properties$fn__4313.invoke(nodedetails.clj:161)
 at 
 opsagent.nodedetails$get_static_properties.invoke(nodedetails.clj:160)
 at 
 opsagent.nodedetails$get_longtime_values$fn__4426.invoke(nodedetails.clj:227)
 at 
 opsagent.nodedetails$get_longtime_values.invoke(nodedetails.clj:226)
 at 
 opsagent.nodedetails$send_all_nodedetails$fn__.invoke(nodedetails.clj:245)
 at opsagent.jmx$jmx_wrap.doInvoke(jmx.clj:111)
 at clojure.lang.RestFn.invoke(RestFn.java:410)
 at 
 opsagent.nodedetails$send_all_nodedetails.invoke(nodedetails.clj:241)
 at opsagent.opsagent$post_interface_startup.doInvoke(opsagent.clj:125)
 at 

[jira] [Updated] (CASSANDRA-5902) Dealing with hints after a topology change

2014-09-18 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-5902:
--
Reviewer: Jonathan Ellis  (was: Aleksey Yeschenko)

 Dealing with hints after a topology change
 --

 Key: CASSANDRA-5902
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5902
 Project: Cassandra
  Issue Type: Bug
Reporter: Jonathan Ellis
Assignee: Branimir Lambov
Priority: Minor
 Fix For: 2.1.1


 Hints are stored and delivered by destination node id.  This allows them to 
 survive IP changes in the target, while making scan all the hints for a 
 given destination an efficient operation.  However, we do not detect and 
 handle new node assuming responsibility for the hinted row via bootstrap 
 before it can be delivered.
 I think we have to take a performance hit in this case -- we need to deliver 
 such a hint to *all* replicas, since we don't know which is the new one.  
 This happens infrequently enough, however -- requiring first the target node 
 to be down to create the hint, then the hint owner to be down long enough for 
 the target to both recover and stream to a new node -- that this should be 
 okay.



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


[jira] [Updated] (CASSANDRA-7849) Server logged error messages (in binary protocol) for unexpected exceptions could be more helpful

2014-09-18 Thread graham sanderson (JIRA)

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

graham sanderson updated CASSANDRA-7849:

Attachment: cassandra-1.2-7849_v3.txt

Updated patch v3 that

# Adds channel info to logged error from call sites in {{Message.java}}
# Keeps everything at ERROR level exception from code path 
{{Dispatcher.exceptionCaught}}, which logs IOException at INFO or DEBUG for 3 
specific messages (Connection reset by peer, Broken pipe, Connection timed 
out)

 Server logged error messages (in binary protocol) for unexpected exceptions 
 could be more helpful
 -

 Key: CASSANDRA-7849
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7849
 Project: Cassandra
  Issue Type: Improvement
Reporter: graham sanderson
Assignee: graham sanderson
 Fix For: 1.2.19, 2.0.11

 Attachments: cassandra-1.2-7849.txt, cassandra-1.2-7849_v2.txt, 
 cassandra-1.2-7849_v3.txt


 From time to time (actually quite frequently) we get error messages in the 
 server logs like this
 {code}
 ERROR [Native-Transport-Requests:288] 2014-08-29 04:48:07,118 
 ErrorMessage.java (line 222) Unexpected exception during request
 java.io.IOException: Connection reset by peer
 at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
 at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
 at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
 at sun.nio.ch.IOUtil.read(IOUtil.java:192)
 at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:379)
 at 
 org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:64)
 at 
 org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:109)
 at 
 org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312)
 at 
 org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:90)
 at 
 org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
 at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
 at java.lang.Thread.run(Thread.java:745)
 {code}
 These particular cases are almost certainly problems with the client driver, 
 client machine, client process, however after the fact this particular 
 exception is practically impossible to debug because there is no indication 
 in the underlying JVM/netty exception of who the peer was. I should note we 
 have lots of different types of applications running against the cluster so 
 it is very hard to correlate these to anything



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


[jira] [Comment Edited] (CASSANDRA-7849) Server logged error messages (in binary protocol) for unexpected exceptions could be more helpful

2014-09-18 Thread graham sanderson (JIRA)

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

graham sanderson edited comment on CASSANDRA-7849 at 9/18/14 4:42 PM:
--

Updated patch v3 that

# Adds channel info to logged error from call sites in {{Message.java}}
# Keeps everything at ERROR level exception from code path 
{{Dispatcher.exceptionCaught}}, which logs IOException at INFO except for 3 
specific message strings at DEBUG (Connection reset by peer, Broken pipe, 
Connection timed out) - corresponding to likely client disconnects

Note that since {{Throwable#getLocalizedMessage}} exists, and the Windows JVM 
code path seems to map windows error codes to the *nix error messages, I think 
these message strings are actually more robust than I thought across platforms 
and/or locales


was (Author: graham sanderson):
Updated patch v3 that

# Adds channel info to logged error from call sites in {{Message.java}}
# Keeps everything at ERROR level exception from code path 
{{Dispatcher.exceptionCaught}}, which logs IOException at INFO or DEBUG for 3 
specific messages (Connection reset by peer, Broken pipe, Connection timed 
out)

 Server logged error messages (in binary protocol) for unexpected exceptions 
 could be more helpful
 -

 Key: CASSANDRA-7849
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7849
 Project: Cassandra
  Issue Type: Improvement
Reporter: graham sanderson
Assignee: graham sanderson
 Fix For: 1.2.19, 2.0.11

 Attachments: cassandra-1.2-7849.txt, cassandra-1.2-7849_v2.txt, 
 cassandra-1.2-7849_v3.txt


 From time to time (actually quite frequently) we get error messages in the 
 server logs like this
 {code}
 ERROR [Native-Transport-Requests:288] 2014-08-29 04:48:07,118 
 ErrorMessage.java (line 222) Unexpected exception during request
 java.io.IOException: Connection reset by peer
 at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
 at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
 at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
 at sun.nio.ch.IOUtil.read(IOUtil.java:192)
 at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:379)
 at 
 org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:64)
 at 
 org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:109)
 at 
 org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312)
 at 
 org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:90)
 at 
 org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
 at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
 at java.lang.Thread.run(Thread.java:745)
 {code}
 These particular cases are almost certainly problems with the client driver, 
 client machine, client process, however after the fact this particular 
 exception is practically impossible to debug because there is no indication 
 in the underlying JVM/netty exception of who the peer was. I should note we 
 have lots of different types of applications running against the cluster so 
 it is very hard to correlate these to anything



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


svn commit: r1626024 - in /cassandra/site: publish/download/index.html src/settings.py

2014-09-18 Thread jake
Author: jake
Date: Thu Sep 18 16:50:41 2014
New Revision: 1626024

URL: http://svn.apache.org/r1626024
Log:
1.2.19 release 


Modified:
cassandra/site/publish/download/index.html
cassandra/site/src/settings.py

Modified: cassandra/site/publish/download/index.html
URL: 
http://svn.apache.org/viewvc/cassandra/site/publish/download/index.html?rev=1626024r1=1626023r2=1626024view=diff
==
--- cassandra/site/publish/download/index.html (original)
+++ cassandra/site/publish/download/index.html Thu Sep 18 16:50:41 2014
@@ -119,15 +119,15 @@
   
   p
   The lastest release on the 1.2 branch is
-  1.2.18 (released on 2014-07-03).
+  1.2.19 (released on 2014-09-18).
   /p
 
   ul
 li
-a class=filename 
href=http://www.apache.org/dyn/closer.cgi?path=/cassandra/1.2.18/apache-cassandra-1.2.18-bin.tar.gz;apache-cassandra-1.2.18-bin.tar.gz/a
-[a 
href=http://www.apache.org/dist/cassandra/1.2.18/apache-cassandra-1.2.18-bin.tar.gz.asc;PGP/a]
-[a 
href=http://www.apache.org/dist/cassandra/1.2.18/apache-cassandra-1.2.18-bin.tar.gz.md5;MD5/a]
-[a 
href=http://www.apache.org/dist/cassandra/1.2.18/apache-cassandra-1.2.18-bin.tar.gz.sha1;SHA1/a]
+a class=filename 
href=http://www.apache.org/dyn/closer.cgi?path=/cassandra/1.2.19/apache-cassandra-1.2.19-bin.tar.gz;apache-cassandra-1.2.19-bin.tar.gz/a
+[a 
href=http://www.apache.org/dist/cassandra/1.2.19/apache-cassandra-1.2.19-bin.tar.gz.asc;PGP/a]
+[a 
href=http://www.apache.org/dist/cassandra/1.2.19/apache-cassandra-1.2.19-bin.tar.gz.md5;MD5/a]
+[a 
href=http://www.apache.org/dist/cassandra/1.2.19/apache-cassandra-1.2.19-bin.tar.gz.sha1;SHA1/a]
 /li
   /ul
   
@@ -162,10 +162,10 @@
   
   
 li
-a class=filename 
href=http://www.apache.org/dyn/closer.cgi?path=/cassandra/1.2.18/apache-cassandra-1.2.18-src.tar.gz;apache-cassandra-1.2.18-src.tar.gz/a
-[a 
href=http://www.apache.org/dist/cassandra/1.2.18/apache-cassandra-1.2.18-src.tar.gz.asc;PGP/a]
-[a 
href=http://www.apache.org/dist/cassandra/1.2.18/apache-cassandra-1.2.18-src.tar.gz.md5;MD5/a]
-[a 
href=http://www.apache.org/dist/cassandra/1.2.18/apache-cassandra-1.2.18-src.tar.gz.sha1;SHA1/a]
+a class=filename 
href=http://www.apache.org/dyn/closer.cgi?path=/cassandra/1.2.19/apache-cassandra-1.2.19-src.tar.gz;apache-cassandra-1.2.19-src.tar.gz/a
+[a 
href=http://www.apache.org/dist/cassandra/1.2.19/apache-cassandra-1.2.19-src.tar.gz.asc;PGP/a]
+[a 
href=http://www.apache.org/dist/cassandra/1.2.19/apache-cassandra-1.2.19-src.tar.gz.md5;MD5/a]
+[a 
href=http://www.apache.org/dist/cassandra/1.2.19/apache-cassandra-1.2.19-src.tar.gz.sha1;SHA1/a]
 /li
   
   

Modified: cassandra/site/src/settings.py
URL: 
http://svn.apache.org/viewvc/cassandra/site/src/settings.py?rev=1626024r1=1626023r2=1626024view=diff
==
--- cassandra/site/src/settings.py (original)
+++ cassandra/site/src/settings.py Thu Sep 18 16:50:41 2014
@@ -95,8 +95,8 @@ class CassandraDef(object):
 oldstable_version = '2.0.10'
 oldstable_release_date = '2014-08-25'
 oldstable_exists = True
-veryoldstable_version = '1.2.18'
-veryoldstable_release_date = '2014-07-03'
+veryoldstable_version = '1.2.19'
+veryoldstable_release_date = '2014-09-18'
 veryoldstable_exists = True
 stable_version = '2.1.0'
 stable_release_date = '2014-09-11'




[jira] [Created] (CASSANDRA-7970) JSON support for CQL

2014-09-18 Thread Jonathan Ellis (JIRA)
Jonathan Ellis created CASSANDRA-7970:
-

 Summary: JSON support for CQL
 Key: CASSANDRA-7970
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7970
 Project: Cassandra
  Issue Type: Bug
  Components: API
Reporter: Jonathan Ellis
Assignee: Tyler Hobbs
 Fix For: 3.0


JSON is popular enough that not supporting it is becoming a competitive 
weakness.  We can add JSON support in a way that is compatible with our 
performance goals by *mapping* JSON to an existing schema: one JSON documents 
maps to one CQL row.

Thus, it is NOT a goal to support schemaless documents, which is a misfeature 
[1] [2] [3].  Rather, it is to allow a convenient way to easily turn a JSON 
document from a service or a user into a CQL row, with all the validation that 
entails.

Since we are not looking to support schemaless documents, we will not be adding 
a JSON data type (CASSANDRA-6833) a la postgresql.  Rather, we will map the 
JSON to UDT, collections, and primitive CQL types.

Here's how this might look:

{code}
CREATE TYPE address (
  street text,
  city text,
  zip_code int,
  phones settext
);

CREATE TABLE users (
  id uuid PRIMARY KEY,
  name text,
  addresses maptext, address
);

INSERT INTO users JSON
{‘id’: 4b856557-7153,
   ‘name’: ‘jbellis’,
   ‘address’: {“home”: {“street”: “9920 Mateo Cv”,
“city”: “Austin”,
“zip_code”: 78747,
“phones”: [2108614702]}}};

SELECT JSON id, address FROM users;
{code}

(We would also want to_json and from_json functions to allow mapping a single 
column's worth of data.  These would not require extra syntax.)

[1] http://rustyrazorblade.com/2014/07/the-myth-of-schema-less/
[2] https://blog.compose.io/schema-less-is-usually-a-lie/
[3] http://dl.acm.org/citation.cfm?id=2481247



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


[jira] [Updated] (CASSANDRA-7849) Server logged error messages (in binary protocol) for unexpected exceptions could be more helpful

2014-09-18 Thread T Jake Luciani (JIRA)

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

T Jake Luciani updated CASSANDRA-7849:
--
Fix Version/s: (was: 1.2.19)

 Server logged error messages (in binary protocol) for unexpected exceptions 
 could be more helpful
 -

 Key: CASSANDRA-7849
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7849
 Project: Cassandra
  Issue Type: Improvement
Reporter: graham sanderson
Assignee: graham sanderson
 Fix For: 2.0.11

 Attachments: cassandra-1.2-7849.txt, cassandra-1.2-7849_v2.txt, 
 cassandra-1.2-7849_v3.txt


 From time to time (actually quite frequently) we get error messages in the 
 server logs like this
 {code}
 ERROR [Native-Transport-Requests:288] 2014-08-29 04:48:07,118 
 ErrorMessage.java (line 222) Unexpected exception during request
 java.io.IOException: Connection reset by peer
 at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
 at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
 at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
 at sun.nio.ch.IOUtil.read(IOUtil.java:192)
 at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:379)
 at 
 org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:64)
 at 
 org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:109)
 at 
 org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312)
 at 
 org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:90)
 at 
 org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
 at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
 at java.lang.Thread.run(Thread.java:745)
 {code}
 These particular cases are almost certainly problems with the client driver, 
 client machine, client process, however after the fact this particular 
 exception is practically impossible to debug because there is no indication 
 in the underlying JVM/netty exception of who the peer was. I should note we 
 have lots of different types of applications running against the cluster so 
 it is very hard to correlate these to anything



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


[jira] [Updated] (CASSANDRA-7938) Releases prior to 2.0 gratuitously invalidate buffer cache

2014-09-18 Thread T Jake Luciani (JIRA)

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

T Jake Luciani updated CASSANDRA-7938:
--
Fix Version/s: (was: 1.2.19)

 Releases prior to 2.0 gratuitously invalidate buffer cache
 --

 Key: CASSANDRA-7938
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7938
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Matt Stump
 Attachments: 7938.txt


 RandomAccessReader gratuitously invalidates the buffer cache in releases 
 prior to 2.0. 
 Additionally, Linux 3.X kernels spend 30% of CPU time in book keeping for the 
 invalidated pages as captured by CPU flame graphs.
 fadvise DONT_NEED should never be called for files other than the commit log 
 segments. 
 https://github.com/apache/cassandra/blob/cassandra-2.1/src/java/org/apache/cassandra/io/util/RandomAccessReader.java#L168



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


[jira] [Updated] (CASSANDRA-7938) Releases prior to 2.0 gratuitously invalidate buffer cache

2014-09-18 Thread T Jake Luciani (JIRA)

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

T Jake Luciani updated CASSANDRA-7938:
--
Priority: Minor  (was: Major)

 Releases prior to 2.0 gratuitously invalidate buffer cache
 --

 Key: CASSANDRA-7938
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7938
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Matt Stump
Priority: Minor
 Attachments: 7938.txt


 RandomAccessReader gratuitously invalidates the buffer cache in releases 
 prior to 2.0. 
 Additionally, Linux 3.X kernels spend 30% of CPU time in book keeping for the 
 invalidated pages as captured by CPU flame graphs.
 fadvise DONT_NEED should never be called for files other than the commit log 
 segments. 
 https://github.com/apache/cassandra/blob/cassandra-2.1/src/java/org/apache/cassandra/io/util/RandomAccessReader.java#L168



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


[jira] [Commented] (CASSANDRA-7032) Improve vnode allocation

2014-09-18 Thread Brandon Williams (JIRA)

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

Brandon Williams commented on CASSANDRA-7032:
-

It seems that our main problem when choosing a distribution for vnodes is not 
knowing what the existing distribution in the cluster is.  Now that we have 
shadow gossip (and already use it during bootstrap) we could know this before 
choosing our own tokens and be able to achieve a perfect distribution.  Of 
course for a new cluster where you aren't bootstrapping it's still worth 
algorithmic improvements.

 Improve vnode allocation
 

 Key: CASSANDRA-7032
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7032
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Benedict
Assignee: Branimir Lambov
  Labels: performance, vnodes
 Fix For: 3.0

 Attachments: TestVNodeAllocation.java, TestVNodeAllocation.java


 It's been known for a little while that random vnode allocation causes 
 hotspots of ownership. It should be possible to improve dramatically on this 
 with deterministic allocation. I have quickly thrown together a simple greedy 
 algorithm that allocates vnodes efficiently, and will repair hotspots in a 
 randomly allocated cluster gradually as more nodes are added, and also 
 ensures that token ranges are fairly evenly spread between nodes (somewhat 
 tunably so). The allocation still permits slight discrepancies in ownership, 
 but it is bound by the inverse of the size of the cluster (as opposed to 
 random allocation, which strangely gets worse as the cluster size increases). 
 I'm sure there is a decent dynamic programming solution to this that would be 
 even better.
 If on joining the ring a new node were to CAS a shared table where a 
 canonical allocation of token ranges lives after running this (or a similar) 
 algorithm, we could then get guaranteed bounds on the ownership distribution 
 in a cluster. This will also help for CASSANDRA-6696.



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


[jira] [Updated] (CASSANDRA-6702) Upgrading node uses the wrong port in gossiping

2014-09-18 Thread T Jake Luciani (JIRA)

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

T Jake Luciani updated CASSANDRA-6702:
--
Fix Version/s: (was: 1.2.19)
   2.0.11

 Upgrading node uses the wrong port in gossiping
 ---

 Key: CASSANDRA-6702
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6702
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: 1.1.7, AWS, Ec2MultiRegionSnitch
Reporter: Minh Do
Priority: Minor
 Fix For: 2.0.11


 When upgrading a node in 1.1.7 (or 1.1.11) cluster to 1.2.15 and inspecting 
 the gossip information on port/Ip, I could see that the upgrading node (1.2 
 version) communicates to one other node in the same region using Public IP 
 and non-encrypted port.
 For the rest, the upgrading node uses the correct ports and IPs to 
 communicate in this manner:
Same region: private IP and non-encrypted port 
and
Different region: public IP and encrypted port
 Because there is one node like this (or 2 out of 12 nodes cluster in which 
 nodes are split equally on 2 AWS regions), we have to modify Security Group 
 to allow the new traffics.
 Without modifying the SG, the 95th and 99th latencies for both reads and 
 writes in the cluster are very bad (due to RPC timeout).  Inspecting closer, 
 that upgraded node (1.2 node) is contributing to all of the high latencies 
 whenever it acts as a coordinator node. 
  



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


[jira] [Updated] (CASSANDRA-7875) Prepared statements using dropped indexes are not handled correctly

2014-09-18 Thread T Jake Luciani (JIRA)

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

T Jake Luciani updated CASSANDRA-7875:
--
Fix Version/s: (was: 1.2.19)

 Prepared statements using dropped indexes are not handled correctly
 ---

 Key: CASSANDRA-7875
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7875
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Tyler Hobbs
Assignee: Tyler Hobbs
Priority: Minor
 Fix For: 2.0.11, 2.1.1

 Attachments: repro.py


 When select statements are prepared, we verify that the column restrictions 
 use indexes (where necessary).  However, we don't perform a similar check 
 when the statement is executed, so it fails somewhere further down the line.  
 In this case, it hits an assertion:
 {noformat}
 java.lang.AssertionError: Sequential scan with filters is not supported (if 
 you just created an index, you need to wait for the creation to be propagated 
 to all nodes before querying it)
   at 
 org.apache.cassandra.db.filter.ExtendedFilter$WithClauses.getExtraFilter(ExtendedFilter.java:259)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.filter(ColumnFamilyStore.java:1759)
   at 
 org.apache.cassandra.db.ColumnFamilyStore.getRangeSlice(ColumnFamilyStore.java:1709)
   at 
 org.apache.cassandra.db.PagedRangeCommand.executeLocally(PagedRangeCommand.java:119)
   at 
 org.apache.cassandra.service.StorageProxy$LocalRangeSliceRunnable.runMayThrow(StorageProxy.java:1394)
   at 
 org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1936)
   at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
   at java.lang.Thread.run(Thread.java:724)
 {noformat}
 During execution, we should check that the indexes still exist and provide a 
 better error if they do not.



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


[jira] [Updated] (CASSANDRA-7909) Do not exit nodetool repair when receiving JMX NOTIF_LOST

2014-09-18 Thread T Jake Luciani (JIRA)

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

T Jake Luciani updated CASSANDRA-7909:
--
Fix Version/s: (was: 1.2.19)

 Do not exit nodetool repair when receiving JMX NOTIF_LOST
 -

 Key: CASSANDRA-7909
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7909
 Project: Cassandra
  Issue Type: Improvement
Reporter: Yuki Morishita
Assignee: Yuki Morishita
Priority: Trivial
 Fix For: 2.0.11, 2.1.1

 Attachments: 
 0001-Do-not-quit-nodetool-when-JMX-notif_lost-received.patch


 {{nodetool repair}} prints out 'Lost notification...' and exits when JMX 
 NOTIF_LOST message is received. But we should not exit right away since that 
 message just indicates some messages are lost because they arrive so fast 
 that they cannot be delivered to the remote client quickly enough according 
 to 
 https://weblogs.java.net/blog/emcmanus/archive/2007/08/when_can_jmx_no.html. 
 So we should just continue to listen to events until repair finishes or 
 connection is really closed.



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


[jira] [Updated] (CASSANDRA-7650) Expose auto_bootstrap as a system property override

2014-09-18 Thread T Jake Luciani (JIRA)

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

T Jake Luciani updated CASSANDRA-7650:
--
Fix Version/s: (was: 1.2.19)

 Expose auto_bootstrap as a system property override
 ---

 Key: CASSANDRA-7650
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7650
 Project: Cassandra
  Issue Type: Improvement
  Components: Config
Reporter: Joe Hohertz
Assignee: Joe Hohertz
Priority: Trivial
  Labels: auto_bootstrap, config, lhf
 Fix For: 2.0.10, 2.1.0

 Attachments: cassandra_auto_bootstrap.patch


 This one-line change gives the auto_bootstrap config parameter the ability to 
 be overridden by a system property.
 As I understand things, setting this false is generally a one-time initial 
 set-up item, and providing this will be potentially easier than swapping out 
 yaml file items when the need to set this false arises.
 The handling is the same as was already implemented for replace_address and 
 the like, look to the system property, and default that to the yaml config 
 value.
 This also will also allow a start-up agent (like Priam) to influence the 
 setting from within it's control over Cassandra's start-up behaviour
 Patch was generated against 1.2 branch but applies ok to 2.0 as well. (It 
 would be great if this could be applied to both code lines)



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


[jira] [Updated] (CASSANDRA-7970) JSON support for CQL

2014-09-18 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-7970:
--
Description: 
JSON is popular enough that not supporting it is becoming a competitive 
weakness.  We can add JSON support in a way that is compatible with our 
performance goals by *mapping* JSON to an existing schema: one JSON documents 
maps to one CQL row.

Thus, it is NOT a goal to support schemaless documents, which is a misfeature 
[1] [2] [3].  Rather, it is to allow a convenient way to easily turn a JSON 
document from a service or a user into a CQL row, with all the validation that 
entails.

Since we are not looking to support schemaless documents, we will not be adding 
a JSON data type (CASSANDRA-6833) a la postgresql.  Rather, we will map the 
JSON to UDT, collections, and primitive CQL types.

Here's how this might look:

{code}
CREATE TYPE address (
  street text,
  city text,
  zip_code int,
  phones settext
);

CREATE TABLE users (
  id uuid PRIMARY KEY,
  name text,
  addresses maptext, address
);

INSERT INTO users JSON
{‘id’: 4b856557-7153,
   ‘name’: ‘jbellis’,
   ‘address’: {“home”: {“street”: “123 Cassandra Dr”,
“city”: “Austin”,
“zip_code”: 78747,
“phones”: [2101234567]}}};

SELECT JSON id, address FROM users;
{code}

(We would also want to_json and from_json functions to allow mapping a single 
column's worth of data.  These would not require extra syntax.)

[1] http://rustyrazorblade.com/2014/07/the-myth-of-schema-less/
[2] https://blog.compose.io/schema-less-is-usually-a-lie/
[3] http://dl.acm.org/citation.cfm?id=2481247

  was:
JSON is popular enough that not supporting it is becoming a competitive 
weakness.  We can add JSON support in a way that is compatible with our 
performance goals by *mapping* JSON to an existing schema: one JSON documents 
maps to one CQL row.

Thus, it is NOT a goal to support schemaless documents, which is a misfeature 
[1] [2] [3].  Rather, it is to allow a convenient way to easily turn a JSON 
document from a service or a user into a CQL row, with all the validation that 
entails.

Since we are not looking to support schemaless documents, we will not be adding 
a JSON data type (CASSANDRA-6833) a la postgresql.  Rather, we will map the 
JSON to UDT, collections, and primitive CQL types.

Here's how this might look:

{code}
CREATE TYPE address (
  street text,
  city text,
  zip_code int,
  phones settext
);

CREATE TABLE users (
  id uuid PRIMARY KEY,
  name text,
  addresses maptext, address
);

INSERT INTO users JSON
{‘id’: 4b856557-7153,
   ‘name’: ‘jbellis’,
   ‘address’: {“home”: {“street”: “9920 Mateo Cv”,
“city”: “Austin”,
“zip_code”: 78747,
“phones”: [2108614702]}}};

SELECT JSON id, address FROM users;
{code}

(We would also want to_json and from_json functions to allow mapping a single 
column's worth of data.  These would not require extra syntax.)

[1] http://rustyrazorblade.com/2014/07/the-myth-of-schema-less/
[2] https://blog.compose.io/schema-less-is-usually-a-lie/
[3] http://dl.acm.org/citation.cfm?id=2481247


 JSON support for CQL
 

 Key: CASSANDRA-7970
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7970
 Project: Cassandra
  Issue Type: Bug
  Components: API
Reporter: Jonathan Ellis
Assignee: Tyler Hobbs
 Fix For: 3.0


 JSON is popular enough that not supporting it is becoming a competitive 
 weakness.  We can add JSON support in a way that is compatible with our 
 performance goals by *mapping* JSON to an existing schema: one JSON documents 
 maps to one CQL row.
 Thus, it is NOT a goal to support schemaless documents, which is a misfeature 
 [1] [2] [3].  Rather, it is to allow a convenient way to easily turn a JSON 
 document from a service or a user into a CQL row, with all the validation 
 that entails.
 Since we are not looking to support schemaless documents, we will not be 
 adding a JSON data type (CASSANDRA-6833) a la postgresql.  Rather, we will 
 map the JSON to UDT, collections, and primitive CQL types.
 Here's how this might look:
 {code}
 CREATE TYPE address (
   street text,
   city text,
   zip_code int,
   phones settext
 );
 CREATE TABLE users (
   id uuid PRIMARY KEY,
   name text,
   addresses maptext, address
 );
 INSERT INTO users JSON
 {‘id’: 4b856557-7153,
‘name’: ‘jbellis’,
‘address’: {“home”: {“street”: “123 Cassandra Dr”,
 “city”: “Austin”,
 “zip_code”: 78747,
 “phones”: [2101234567]}}};
 SELECT JSON id, address FROM users;
 {code}
 (We would also want to_json and from_json functions to allow mapping a single 
 column's worth of data.  These would 

[jira] [Resolved] (CASSANDRA-7650) Expose auto_bootstrap as a system property override

2014-09-18 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis resolved CASSANDRA-7650.
---
   Resolution: Fixed
Reproduced In: 2.0.9, 1.2.18  (was: 1.2.18, 2.0.9)

1.2.19 is released.  There is unlikely to be a 1.2.20.

 Expose auto_bootstrap as a system property override
 ---

 Key: CASSANDRA-7650
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7650
 Project: Cassandra
  Issue Type: Improvement
  Components: Config
Reporter: Joe Hohertz
Assignee: Joe Hohertz
Priority: Trivial
  Labels: auto_bootstrap, config, lhf
 Fix For: 2.1.0, 2.0.10

 Attachments: cassandra_auto_bootstrap.patch


 This one-line change gives the auto_bootstrap config parameter the ability to 
 be overridden by a system property.
 As I understand things, setting this false is generally a one-time initial 
 set-up item, and providing this will be potentially easier than swapping out 
 yaml file items when the need to set this false arises.
 The handling is the same as was already implemented for replace_address and 
 the like, look to the system property, and default that to the yaml config 
 value.
 This also will also allow a start-up agent (like Priam) to influence the 
 setting from within it's control over Cassandra's start-up behaviour
 Patch was generated against 1.2 branch but applies ok to 2.0 as well. (It 
 would be great if this could be applied to both code lines)



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


[jira] [Updated] (CASSANDRA-7938) Releases prior to 2.0 gratuitously invalidate buffer cache

2014-09-18 Thread T Jake Luciani (JIRA)

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

T Jake Luciani updated CASSANDRA-7938:
--
Fix Version/s: 1.2.19

 Releases prior to 2.0 gratuitously invalidate buffer cache
 --

 Key: CASSANDRA-7938
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7938
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Matt Stump
Priority: Minor
 Fix For: 1.2.19

 Attachments: 7938.txt


 RandomAccessReader gratuitously invalidates the buffer cache in releases 
 prior to 2.0. 
 Additionally, Linux 3.X kernels spend 30% of CPU time in book keeping for the 
 invalidated pages as captured by CPU flame graphs.
 fadvise DONT_NEED should never be called for files other than the commit log 
 segments. 
 https://github.com/apache/cassandra/blob/cassandra-2.1/src/java/org/apache/cassandra/io/util/RandomAccessReader.java#L168



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


[jira] [Updated] (CASSANDRA-7849) Server logged error messages (in binary protocol) for unexpected exceptions could be more helpful

2014-09-18 Thread Tyler Hobbs (JIRA)

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

Tyler Hobbs updated CASSANDRA-7849:
---
Fix Version/s: 2.1.1

 Server logged error messages (in binary protocol) for unexpected exceptions 
 could be more helpful
 -

 Key: CASSANDRA-7849
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7849
 Project: Cassandra
  Issue Type: Improvement
Reporter: graham sanderson
Assignee: graham sanderson
 Fix For: 2.0.11, 2.1.1

 Attachments: cassandra-1.2-7849.txt, cassandra-1.2-7849_v2.txt, 
 cassandra-1.2-7849_v3.txt


 From time to time (actually quite frequently) we get error messages in the 
 server logs like this
 {code}
 ERROR [Native-Transport-Requests:288] 2014-08-29 04:48:07,118 
 ErrorMessage.java (line 222) Unexpected exception during request
 java.io.IOException: Connection reset by peer
 at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
 at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
 at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
 at sun.nio.ch.IOUtil.read(IOUtil.java:192)
 at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:379)
 at 
 org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:64)
 at 
 org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:109)
 at 
 org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312)
 at 
 org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:90)
 at 
 org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
 at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
 at java.lang.Thread.run(Thread.java:745)
 {code}
 These particular cases are almost certainly problems with the client driver, 
 client machine, client process, however after the fact this particular 
 exception is practically impossible to debug because there is no indication 
 in the underlying JVM/netty exception of who the peer was. I should note we 
 have lots of different types of applications running against the cluster so 
 it is very hard to correlate these to anything



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


git commit: Log unclean client disconnect excs at DEBUG

2014-09-18 Thread tylerhobbs
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 549f035b9 - cbc705d41


Log unclean client disconnect excs at DEBUG

Patch by Graham Sanderson; reviewed by Tyler Hobbs for CASSANDRA-7849


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

Branch: refs/heads/cassandra-2.0
Commit: cbc705d419d0db54d5a94e181e0f50916eb57dbc
Parents: 549f035
Author: Graham Sanderson gra...@vast.com
Authored: Thu Sep 18 12:24:29 2014 -0500
Committer: Tyler Hobbs ty...@datastax.com
Committed: Thu Sep 18 12:26:08 2014 -0500

--
 CHANGES.txt |  2 +
 .../org/apache/cassandra/transport/Message.java | 73 +++-
 .../transport/messages/ErrorMessage.java| 19 +++--
 3 files changed, 87 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/cbc705d4/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 01d32e7..c9d507a 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,6 @@
 2.0.11:
+ * Log exceptions related to unclean native protocol client disconnects
+   at DEBUG or INFO (CASSANDRA-7849)
  * Allow permissions cache to be set via JMX (CASSANDRA-7698)
  * Include schema_triggers CF in readable system resources (CASSANDRA-7967)
  * Fix RowIndexEntry to report correct serializedSize (CASSANDRA-7948)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/cbc705d4/src/java/org/apache/cassandra/transport/Message.java
--
diff --git a/src/java/org/apache/cassandra/transport/Message.java 
b/src/java/org/apache/cassandra/transport/Message.java
index bbe7e38..eb38558 100644
--- a/src/java/org/apache/cassandra/transport/Message.java
+++ b/src/java/org/apache/cassandra/transport/Message.java
@@ -17,9 +17,13 @@
  */
 package org.apache.cassandra.transport;
 
+import java.io.IOException;
 import java.util.EnumSet;
+import java.util.Set;
 import java.util.UUID;
 
+import com.google.common.base.Predicate;
+import com.google.common.collect.ImmutableSet;
 import org.jboss.netty.buffer.ChannelBuffer;
 import org.jboss.netty.buffer.ChannelBuffers;
 import org.jboss.netty.channel.*;
@@ -38,6 +42,17 @@ public abstract class Message
 {
 protected static final Logger logger = 
LoggerFactory.getLogger(Message.class);
 
+/**
+ * When we encounter an unexpected IOException we look for these {@link 
Throwable#getMessage() messages}
+ * (because we have no better way to distinguish) and log them at DEBUG 
rather than INFO, since they
+ * are generally caused by unclean client disconnects rather than an 
actual problem.
+ */
+private static final SetString ioExceptionsAtDebugLevel = 
ImmutableSet.Stringbuilder().
+add(Connection reset by peer).
+add(Broken pipe).
+add(Connection timed out).
+build();
+
 public interface CodecM extends Message extends CBCodecM {}
 
 public enum Direction
@@ -315,7 +330,7 @@ public abstract class Message
 catch (Throwable ex)
 {
 // Don't let the exception propagate to exceptionCaught() if 
we can help it so that we can assign the right streamID.
-
ctx.getChannel().write(ErrorMessage.fromException(ex).setStreamId(request.getStreamId()));
+ctx.getChannel().write(ErrorMessage.fromException(ex, new 
UnexpectedChannelExceptionHandler(ctx.getChannel(), 
true)).setStreamId(request.getStreamId()));
 }
 }
 
@@ -325,7 +340,7 @@ public abstract class Message
 {
 if (ctx.getChannel().isOpen())
 {
-ChannelFuture future = 
ctx.getChannel().write(ErrorMessage.fromException(e.getCause()));
+ChannelFuture future = 
ctx.getChannel().write(ErrorMessage.fromException(e.getCause(), new 
UnexpectedChannelExceptionHandler(ctx.getChannel(), false)));
 // On protocol exception, close the channel as soon as the 
message have been sent
 if (e.getCause() instanceof ProtocolException)
 {
@@ -338,4 +353,58 @@ public abstract class Message
 }
 }
 }
+
+/**
+ * Include the channel info in the logged information for unexpected 
errors, and (if {@link #alwaysLogAtError} is
+ * false then choose the log level based on the type of exception (some 
are clearly client issues and shouldn't be
+ * logged at server ERROR level)
+ */
+static final class UnexpectedChannelExceptionHandler implements 
PredicateThrowable
+{
+private 

[jira] [Created] (CASSANDRA-7971) Batches with 100 statements should be logged as warnings.

2014-09-18 Thread Matt Stump (JIRA)
Matt Stump created CASSANDRA-7971:
-

 Summary: Batches with  100 statements should be logged as 
warnings.
 Key: CASSANDRA-7971
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7971
 Project: Cassandra
  Issue Type: Improvement
Reporter: Matt Stump


Despite our documentation stating that batches are not to be used for bulk 
loading it's common for customers to attempt otherwise. They then go to 
production and encounter issues. I encounter 2-3 customers per week that run 
into this issue.

I can't think of any reason why a logical transaction should span more than 100 
rows so it seems like a good limit. Maybe make it a hidden configuration 
variable where 0 means disable all warnings.



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


[2/2] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1

2014-09-18 Thread tylerhobbs
Merge branch 'cassandra-2.0' into cassandra-2.1

Conflicts:
src/java/org/apache/cassandra/transport/Message.java
src/java/org/apache/cassandra/transport/messages/ErrorMessage.java


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

Branch: refs/heads/cassandra-2.1
Commit: 3dd2f0064f49aa543647be9882dfe8da5ab6899b
Parents: 74877bb cbc705d
Author: Tyler Hobbs ty...@datastax.com
Authored: Thu Sep 18 12:36:33 2014 -0500
Committer: Tyler Hobbs ty...@datastax.com
Committed: Thu Sep 18 12:36:33 2014 -0500

--
 CHANGES.txt |  4 +-
 .../org/apache/cassandra/transport/Message.java | 76 +++-
 .../transport/messages/ErrorMessage.java| 15 +++-
 3 files changed, 90 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/3dd2f006/CHANGES.txt
--
diff --cc CHANGES.txt
index d25fee5,c9d507a..dfcd36d
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,50 -1,6 +1,50 @@@
 -2.0.11:
 +2.1.1
 + * Provide visibility into prepared statements churn (CASSANDRA-7921)
 + * Invalidate prepared statements when their keyspace or table is
 +   dropped (CASSANDRA-7566)
 + * cassandra-stress: fix support for NetworkTopologyStrategy (CASSANDRA-7945)
 + * Fix saving caches when a table is dropped (CASSANDRA-7784)
 + * Add better error checking of new stress profile (CASSANDRA-7716)
 + * Use ThreadLocalRandom and remove FBUtilities.threadLocalRandom 
(CASSANDRA-7934)
 + * Prevent operator mistakes due to simultaneous bootstrap (CASSANDRA-7069)
 + * cassandra-stress supports whitelist mode for node config (CASSANDRA-7658)
 + * GCInspector more closely tracks GC; cassandra-stress and nodetool report 
it (CASSANDRA-7916)
 + * nodetool won't output bogus ownership info without a keyspace 
(CASSANDRA-7173)
 + * Add human readable option to nodetool commands (CASSANDRA-5433)
 + * Don't try to set repairedAt on old sstables (CASSANDRA-7913)
 + * Add metrics for tracking PreparedStatement use (CASSANDRA-7719)
 + * (cqlsh) tab-completion for triggers (CASSANDRA-7824)
 + * (cqlsh) Support for query paging (CASSANDRA-7514)
 + * (cqlsh) Show progress of COPY operations (CASSANDRA-7789)
 + * Add syntax to remove multiple elements from a map (CASSANDRA-6599)
 + * Support non-equals conditions in lightweight transactions (CASSANDRA-6839)
 + * Add IF [NOT] EXISTS to create/drop triggers (CASSANDRA-7606)
 + * (cqlsh) Display the current logged-in user (CASSANDRA-7785)
 + * (cqlsh) Don't ignore CTRL-C during COPY FROM execution (CASSANDRA-7815)
 + * (cqlsh) Order UDTs according to cross-type dependencies in DESCRIBE
 +   output (CASSANDRA-7659)
 + * (cqlsh) Fix handling of CAS statement results (CASSANDRA-7671)
 + * (cqlsh) COPY TO/FROM improvements (CASSANDRA-7405)
 + * Support list index operations with conditions (CASSANDRA-7499)
 + * Add max live/tombstoned cells to nodetool cfstats output (CASSANDRA-7731)
 + * Validate IPv6 wildcard addresses properly (CASSANDRA-7680)
 + * (cqlsh) Error when tracing query (CASSANDRA-7613)
 + * Avoid IOOBE when building SyntaxError message snippet (CASSANDRA-7569)
 + * SSTableExport uses correct validator to create string representation of 
partition
 +   keys (CASSANDRA-7498)
 + * Avoid NPEs when receiving type changes for an unknown keyspace 
(CASSANDRA-7689)
 + * Add support for custom 2i validation (CASSANDRA-7575)
 + * Pig support for hadoop CqlInputFormat (CASSANDRA-6454)
 + * Add listen_interface and rpc_interface options (CASSANDRA-7417)
 + * Improve schema merge performance (CASSANDRA-7444)
 + * Adjust MT depth based on # of partition validating (CASSANDRA-5263)
 + * Optimise NativeCell comparisons (CASSANDRA-6755)
 + * Configurable client timeout for cqlsh (CASSANDRA-7516)
 + * Include snippet of CQL query near syntax error in messages (CASSANDRA-7111)
 + * Make repair -pr work with -local (CASSANDRA-7450)
 +Merged from 2.0:
- ===
- 2.0.11:
+  * Log exceptions related to unclean native protocol client disconnects
+at DEBUG or INFO (CASSANDRA-7849)
   * Allow permissions cache to be set via JMX (CASSANDRA-7698)
   * Include schema_triggers CF in readable system resources (CASSANDRA-7967)
   * Fix RowIndexEntry to report correct serializedSize (CASSANDRA-7948)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3dd2f006/src/java/org/apache/cassandra/transport/Message.java
--
diff --cc src/java/org/apache/cassandra/transport/Message.java
index 163fffb,eb38558..f4c6b31
--- 

[1/2] git commit: Log unclean client disconnect excs at DEBUG

2014-09-18 Thread tylerhobbs
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 74877bb6a - 3dd2f0064


Log unclean client disconnect excs at DEBUG

Patch by Graham Sanderson; reviewed by Tyler Hobbs for CASSANDRA-7849


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

Branch: refs/heads/cassandra-2.1
Commit: cbc705d419d0db54d5a94e181e0f50916eb57dbc
Parents: 549f035
Author: Graham Sanderson gra...@vast.com
Authored: Thu Sep 18 12:24:29 2014 -0500
Committer: Tyler Hobbs ty...@datastax.com
Committed: Thu Sep 18 12:26:08 2014 -0500

--
 CHANGES.txt |  2 +
 .../org/apache/cassandra/transport/Message.java | 73 +++-
 .../transport/messages/ErrorMessage.java| 19 +++--
 3 files changed, 87 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/cbc705d4/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 01d32e7..c9d507a 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,6 @@
 2.0.11:
+ * Log exceptions related to unclean native protocol client disconnects
+   at DEBUG or INFO (CASSANDRA-7849)
  * Allow permissions cache to be set via JMX (CASSANDRA-7698)
  * Include schema_triggers CF in readable system resources (CASSANDRA-7967)
  * Fix RowIndexEntry to report correct serializedSize (CASSANDRA-7948)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/cbc705d4/src/java/org/apache/cassandra/transport/Message.java
--
diff --git a/src/java/org/apache/cassandra/transport/Message.java 
b/src/java/org/apache/cassandra/transport/Message.java
index bbe7e38..eb38558 100644
--- a/src/java/org/apache/cassandra/transport/Message.java
+++ b/src/java/org/apache/cassandra/transport/Message.java
@@ -17,9 +17,13 @@
  */
 package org.apache.cassandra.transport;
 
+import java.io.IOException;
 import java.util.EnumSet;
+import java.util.Set;
 import java.util.UUID;
 
+import com.google.common.base.Predicate;
+import com.google.common.collect.ImmutableSet;
 import org.jboss.netty.buffer.ChannelBuffer;
 import org.jboss.netty.buffer.ChannelBuffers;
 import org.jboss.netty.channel.*;
@@ -38,6 +42,17 @@ public abstract class Message
 {
 protected static final Logger logger = 
LoggerFactory.getLogger(Message.class);
 
+/**
+ * When we encounter an unexpected IOException we look for these {@link 
Throwable#getMessage() messages}
+ * (because we have no better way to distinguish) and log them at DEBUG 
rather than INFO, since they
+ * are generally caused by unclean client disconnects rather than an 
actual problem.
+ */
+private static final SetString ioExceptionsAtDebugLevel = 
ImmutableSet.Stringbuilder().
+add(Connection reset by peer).
+add(Broken pipe).
+add(Connection timed out).
+build();
+
 public interface CodecM extends Message extends CBCodecM {}
 
 public enum Direction
@@ -315,7 +330,7 @@ public abstract class Message
 catch (Throwable ex)
 {
 // Don't let the exception propagate to exceptionCaught() if 
we can help it so that we can assign the right streamID.
-
ctx.getChannel().write(ErrorMessage.fromException(ex).setStreamId(request.getStreamId()));
+ctx.getChannel().write(ErrorMessage.fromException(ex, new 
UnexpectedChannelExceptionHandler(ctx.getChannel(), 
true)).setStreamId(request.getStreamId()));
 }
 }
 
@@ -325,7 +340,7 @@ public abstract class Message
 {
 if (ctx.getChannel().isOpen())
 {
-ChannelFuture future = 
ctx.getChannel().write(ErrorMessage.fromException(e.getCause()));
+ChannelFuture future = 
ctx.getChannel().write(ErrorMessage.fromException(e.getCause(), new 
UnexpectedChannelExceptionHandler(ctx.getChannel(), false)));
 // On protocol exception, close the channel as soon as the 
message have been sent
 if (e.getCause() instanceof ProtocolException)
 {
@@ -338,4 +353,58 @@ public abstract class Message
 }
 }
 }
+
+/**
+ * Include the channel info in the logged information for unexpected 
errors, and (if {@link #alwaysLogAtError} is
+ * false then choose the log level based on the type of exception (some 
are clearly client issues and shouldn't be
+ * logged at server ERROR level)
+ */
+static final class UnexpectedChannelExceptionHandler implements 
PredicateThrowable
+{
+private 

[3/3] git commit: Merge branch 'cassandra-2.1' into trunk

2014-09-18 Thread tylerhobbs
Merge branch 'cassandra-2.1' into trunk


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

Branch: refs/heads/trunk
Commit: a810c477d983b4f7aa54892a8244063825bcd9b6
Parents: b18478d 3dd2f00
Author: Tyler Hobbs ty...@datastax.com
Authored: Thu Sep 18 12:37:01 2014 -0500
Committer: Tyler Hobbs ty...@datastax.com
Committed: Thu Sep 18 12:37:01 2014 -0500

--
 CHANGES.txt |  4 +-
 .../org/apache/cassandra/transport/Message.java | 76 +++-
 .../transport/messages/ErrorMessage.java| 15 +++-
 3 files changed, 90 insertions(+), 5 deletions(-)
--


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



[1/3] git commit: Log unclean client disconnect excs at DEBUG

2014-09-18 Thread tylerhobbs
Repository: cassandra
Updated Branches:
  refs/heads/trunk b18478d05 - a810c477d


Log unclean client disconnect excs at DEBUG

Patch by Graham Sanderson; reviewed by Tyler Hobbs for CASSANDRA-7849


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

Branch: refs/heads/trunk
Commit: cbc705d419d0db54d5a94e181e0f50916eb57dbc
Parents: 549f035
Author: Graham Sanderson gra...@vast.com
Authored: Thu Sep 18 12:24:29 2014 -0500
Committer: Tyler Hobbs ty...@datastax.com
Committed: Thu Sep 18 12:26:08 2014 -0500

--
 CHANGES.txt |  2 +
 .../org/apache/cassandra/transport/Message.java | 73 +++-
 .../transport/messages/ErrorMessage.java| 19 +++--
 3 files changed, 87 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/cbc705d4/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 01d32e7..c9d507a 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,6 @@
 2.0.11:
+ * Log exceptions related to unclean native protocol client disconnects
+   at DEBUG or INFO (CASSANDRA-7849)
  * Allow permissions cache to be set via JMX (CASSANDRA-7698)
  * Include schema_triggers CF in readable system resources (CASSANDRA-7967)
  * Fix RowIndexEntry to report correct serializedSize (CASSANDRA-7948)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/cbc705d4/src/java/org/apache/cassandra/transport/Message.java
--
diff --git a/src/java/org/apache/cassandra/transport/Message.java 
b/src/java/org/apache/cassandra/transport/Message.java
index bbe7e38..eb38558 100644
--- a/src/java/org/apache/cassandra/transport/Message.java
+++ b/src/java/org/apache/cassandra/transport/Message.java
@@ -17,9 +17,13 @@
  */
 package org.apache.cassandra.transport;
 
+import java.io.IOException;
 import java.util.EnumSet;
+import java.util.Set;
 import java.util.UUID;
 
+import com.google.common.base.Predicate;
+import com.google.common.collect.ImmutableSet;
 import org.jboss.netty.buffer.ChannelBuffer;
 import org.jboss.netty.buffer.ChannelBuffers;
 import org.jboss.netty.channel.*;
@@ -38,6 +42,17 @@ public abstract class Message
 {
 protected static final Logger logger = 
LoggerFactory.getLogger(Message.class);
 
+/**
+ * When we encounter an unexpected IOException we look for these {@link 
Throwable#getMessage() messages}
+ * (because we have no better way to distinguish) and log them at DEBUG 
rather than INFO, since they
+ * are generally caused by unclean client disconnects rather than an 
actual problem.
+ */
+private static final SetString ioExceptionsAtDebugLevel = 
ImmutableSet.Stringbuilder().
+add(Connection reset by peer).
+add(Broken pipe).
+add(Connection timed out).
+build();
+
 public interface CodecM extends Message extends CBCodecM {}
 
 public enum Direction
@@ -315,7 +330,7 @@ public abstract class Message
 catch (Throwable ex)
 {
 // Don't let the exception propagate to exceptionCaught() if 
we can help it so that we can assign the right streamID.
-
ctx.getChannel().write(ErrorMessage.fromException(ex).setStreamId(request.getStreamId()));
+ctx.getChannel().write(ErrorMessage.fromException(ex, new 
UnexpectedChannelExceptionHandler(ctx.getChannel(), 
true)).setStreamId(request.getStreamId()));
 }
 }
 
@@ -325,7 +340,7 @@ public abstract class Message
 {
 if (ctx.getChannel().isOpen())
 {
-ChannelFuture future = 
ctx.getChannel().write(ErrorMessage.fromException(e.getCause()));
+ChannelFuture future = 
ctx.getChannel().write(ErrorMessage.fromException(e.getCause(), new 
UnexpectedChannelExceptionHandler(ctx.getChannel(), false)));
 // On protocol exception, close the channel as soon as the 
message have been sent
 if (e.getCause() instanceof ProtocolException)
 {
@@ -338,4 +353,58 @@ public abstract class Message
 }
 }
 }
+
+/**
+ * Include the channel info in the logged information for unexpected 
errors, and (if {@link #alwaysLogAtError} is
+ * false then choose the log level based on the type of exception (some 
are clearly client issues and shouldn't be
+ * logged at server ERROR level)
+ */
+static final class UnexpectedChannelExceptionHandler implements 
PredicateThrowable
+{
+private final Channel 

[2/3] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1

2014-09-18 Thread tylerhobbs
Merge branch 'cassandra-2.0' into cassandra-2.1

Conflicts:
src/java/org/apache/cassandra/transport/Message.java
src/java/org/apache/cassandra/transport/messages/ErrorMessage.java


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

Branch: refs/heads/trunk
Commit: 3dd2f0064f49aa543647be9882dfe8da5ab6899b
Parents: 74877bb cbc705d
Author: Tyler Hobbs ty...@datastax.com
Authored: Thu Sep 18 12:36:33 2014 -0500
Committer: Tyler Hobbs ty...@datastax.com
Committed: Thu Sep 18 12:36:33 2014 -0500

--
 CHANGES.txt |  4 +-
 .../org/apache/cassandra/transport/Message.java | 76 +++-
 .../transport/messages/ErrorMessage.java| 15 +++-
 3 files changed, 90 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/3dd2f006/CHANGES.txt
--
diff --cc CHANGES.txt
index d25fee5,c9d507a..dfcd36d
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,50 -1,6 +1,50 @@@
 -2.0.11:
 +2.1.1
 + * Provide visibility into prepared statements churn (CASSANDRA-7921)
 + * Invalidate prepared statements when their keyspace or table is
 +   dropped (CASSANDRA-7566)
 + * cassandra-stress: fix support for NetworkTopologyStrategy (CASSANDRA-7945)
 + * Fix saving caches when a table is dropped (CASSANDRA-7784)
 + * Add better error checking of new stress profile (CASSANDRA-7716)
 + * Use ThreadLocalRandom and remove FBUtilities.threadLocalRandom 
(CASSANDRA-7934)
 + * Prevent operator mistakes due to simultaneous bootstrap (CASSANDRA-7069)
 + * cassandra-stress supports whitelist mode for node config (CASSANDRA-7658)
 + * GCInspector more closely tracks GC; cassandra-stress and nodetool report 
it (CASSANDRA-7916)
 + * nodetool won't output bogus ownership info without a keyspace 
(CASSANDRA-7173)
 + * Add human readable option to nodetool commands (CASSANDRA-5433)
 + * Don't try to set repairedAt on old sstables (CASSANDRA-7913)
 + * Add metrics for tracking PreparedStatement use (CASSANDRA-7719)
 + * (cqlsh) tab-completion for triggers (CASSANDRA-7824)
 + * (cqlsh) Support for query paging (CASSANDRA-7514)
 + * (cqlsh) Show progress of COPY operations (CASSANDRA-7789)
 + * Add syntax to remove multiple elements from a map (CASSANDRA-6599)
 + * Support non-equals conditions in lightweight transactions (CASSANDRA-6839)
 + * Add IF [NOT] EXISTS to create/drop triggers (CASSANDRA-7606)
 + * (cqlsh) Display the current logged-in user (CASSANDRA-7785)
 + * (cqlsh) Don't ignore CTRL-C during COPY FROM execution (CASSANDRA-7815)
 + * (cqlsh) Order UDTs according to cross-type dependencies in DESCRIBE
 +   output (CASSANDRA-7659)
 + * (cqlsh) Fix handling of CAS statement results (CASSANDRA-7671)
 + * (cqlsh) COPY TO/FROM improvements (CASSANDRA-7405)
 + * Support list index operations with conditions (CASSANDRA-7499)
 + * Add max live/tombstoned cells to nodetool cfstats output (CASSANDRA-7731)
 + * Validate IPv6 wildcard addresses properly (CASSANDRA-7680)
 + * (cqlsh) Error when tracing query (CASSANDRA-7613)
 + * Avoid IOOBE when building SyntaxError message snippet (CASSANDRA-7569)
 + * SSTableExport uses correct validator to create string representation of 
partition
 +   keys (CASSANDRA-7498)
 + * Avoid NPEs when receiving type changes for an unknown keyspace 
(CASSANDRA-7689)
 + * Add support for custom 2i validation (CASSANDRA-7575)
 + * Pig support for hadoop CqlInputFormat (CASSANDRA-6454)
 + * Add listen_interface and rpc_interface options (CASSANDRA-7417)
 + * Improve schema merge performance (CASSANDRA-7444)
 + * Adjust MT depth based on # of partition validating (CASSANDRA-5263)
 + * Optimise NativeCell comparisons (CASSANDRA-6755)
 + * Configurable client timeout for cqlsh (CASSANDRA-7516)
 + * Include snippet of CQL query near syntax error in messages (CASSANDRA-7111)
 + * Make repair -pr work with -local (CASSANDRA-7450)
 +Merged from 2.0:
- ===
- 2.0.11:
+  * Log exceptions related to unclean native protocol client disconnects
+at DEBUG or INFO (CASSANDRA-7849)
   * Allow permissions cache to be set via JMX (CASSANDRA-7698)
   * Include schema_triggers CF in readable system resources (CASSANDRA-7967)
   * Fix RowIndexEntry to report correct serializedSize (CASSANDRA-7948)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3dd2f006/src/java/org/apache/cassandra/transport/Message.java
--
diff --cc src/java/org/apache/cassandra/transport/Message.java
index 163fffb,eb38558..f4c6b31
--- a/src/java/org/apache/cassandra/transport/Message.java
+++ 

[jira] [Resolved] (CASSANDRA-7971) Batches with 100 statements should be logged as warnings.

2014-09-18 Thread Benedict (JIRA)

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

Benedict resolved CASSANDRA-7971.
-
Resolution: Not a Problem

We already log if they are above a certain size (default 5K)

 Batches with  100 statements should be logged as warnings.
 ---

 Key: CASSANDRA-7971
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7971
 Project: Cassandra
  Issue Type: Improvement
Reporter: Matt Stump

 Despite our documentation stating that batches are not to be used for bulk 
 loading it's common for customers to attempt otherwise. They then go to 
 production and encounter issues. I encounter 2-3 customers per week that run 
 into this issue.
 I can't think of any reason why a logical transaction should span more than 
 100 rows so it seems like a good limit. Maybe make it a hidden configuration 
 variable where 0 means disable all warnings.



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


[jira] [Updated] (CASSANDRA-7410) Pig support for BulkOutputFormat as a parameter in url

2014-09-18 Thread Alex Liu (JIRA)

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

Alex Liu updated CASSANDRA-7410:

Attachment: 7410-v3-2.0-branch.txt

V3 is attached to restore CqlStorage class

 Pig support for BulkOutputFormat as a parameter in url
 --

 Key: CASSANDRA-7410
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7410
 Project: Cassandra
  Issue Type: Improvement
  Components: Hadoop
Reporter: Alex Liu
Assignee: Alex Liu
Priority: Minor
 Fix For: 2.0.11

 Attachments: 7410-2.0-branch.txt, 7410-v2-2.0-branch.txt, 
 7410-v3-2.0-branch.txt


 Add BulkOutputFormat support in Pig url



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


[jira] [Updated] (CASSANDRA-7956) nodetool compactionhistory crashes because of low heap size (GC overhead limit exceeded)

2014-09-18 Thread Michael Shuler (JIRA)

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

Michael Shuler updated CASSANDRA-7956:
--
Fix Version/s: 2.0.11

 nodetool compactionhistory crashes because of low heap size (GC overhead 
 limit exceeded)
 --

 Key: CASSANDRA-7956
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7956
 Project: Cassandra
  Issue Type: Bug
 Environment: Cassandra 2.0.8
Reporter: Nikolai Grigoriev
Priority: Trivial
 Fix For: 2.0.11

 Attachments: nodetool_compactionhistory_128m_heap_output.txt.gz


 {code}
 ]# nodetool compactionhistory
 Compaction History:
 Exception in thread main java.lang.OutOfMemoryError: GC overhead limit 
 exceeded
 at java.io.ObjectStreamClass.newInstance(ObjectStreamClass.java:967)
 at 
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1782)
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
 at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
 at java.util.HashMap.readObject(HashMap.java:1180)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at 
 java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1017)
 at 
 java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1893)
 at 
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
 at 
 java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990)
 at 
 java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:500)
 at 
 javax.management.openmbean.TabularDataSupport.readObject(TabularDataSupport.java:912)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at 
 java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1017)
 at 
 java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1893)
 at 
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
 at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
 at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:325)
 at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:174)
 at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source)
 at 
 javax.management.remote.rmi.RMIConnectionImpl_Stub.getAttribute(Unknown 
 Source)
 at 
 javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.getAttribute(RMIConnector.java:906)
 at 
 javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:267)
 at com.sun.proxy.$Proxy3.getCompactionHistory(Unknown Source)
 {code}
 nodetool starts with -Xmx32m. This seems to be not enough at least in my case 
 to show the history. I am not sure what would the appropriate amount be but 
 increasing it to 128m definitely solves the problem. Output from modified 
 nodetool attached.



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


[jira] [Updated] (CASSANDRA-7238) Nodetool Status performance is much slower with VNodes On

2014-09-18 Thread Michael Shuler (JIRA)

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

Michael Shuler updated CASSANDRA-7238:
--
Fix Version/s: 2.0.11

 Nodetool Status performance is much slower with VNodes On
 -

 Key: CASSANDRA-7238
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7238
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
 Environment: 1000 M1.Large Ubuntu 12.04
Reporter: Russell Alexander Spitzer
Priority: Minor
 Fix For: 2.0.11


 Nodetool status on a 1000 Node cluster without vnodes returns in several 
 seconds. With vnodes on (256) there are OOM errors with the default XMX of 
 32. Adjusting the XMX to 128 allows nodetool status to complete but the 
 execution takes roughly 10 minutes.
 Tested
 {code}
 XMX|  Status
 32 |OOM
 64 |OOM: GC Overhead
 128|Finishes in ~10 minutes
 500|Finishes in ~10 minutes
 1000   |Finishes in ~10 minutes
 {code}



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


[jira] [Updated] (CASSANDRA-7956) nodetool compactionhistory crashes because of low heap size (GC overhead limit exceeded)

2014-09-18 Thread Michael Shuler (JIRA)

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

Michael Shuler updated CASSANDRA-7956:
--
Attachment: 7956.txt

I think bumping up the default nodetool -Xmx to 128m is probably OK.  This 
doesn't fix vnode performance time seen in CASSANDRA-7238, but does at least 
get larger cluster nodetool usage functional by default.

 nodetool compactionhistory crashes because of low heap size (GC overhead 
 limit exceeded)
 --

 Key: CASSANDRA-7956
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7956
 Project: Cassandra
  Issue Type: Bug
 Environment: Cassandra 2.0.8
Reporter: Nikolai Grigoriev
Priority: Trivial
 Fix For: 2.0.11

 Attachments: 7956.txt, 
 nodetool_compactionhistory_128m_heap_output.txt.gz


 {code}
 ]# nodetool compactionhistory
 Compaction History:
 Exception in thread main java.lang.OutOfMemoryError: GC overhead limit 
 exceeded
 at java.io.ObjectStreamClass.newInstance(ObjectStreamClass.java:967)
 at 
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1782)
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
 at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
 at java.util.HashMap.readObject(HashMap.java:1180)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at 
 java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1017)
 at 
 java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1893)
 at 
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
 at 
 java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990)
 at 
 java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:500)
 at 
 javax.management.openmbean.TabularDataSupport.readObject(TabularDataSupport.java:912)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at 
 java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1017)
 at 
 java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1893)
 at 
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
 at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
 at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:325)
 at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:174)
 at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source)
 at 
 javax.management.remote.rmi.RMIConnectionImpl_Stub.getAttribute(Unknown 
 Source)
 at 
 javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.getAttribute(RMIConnector.java:906)
 at 
 javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:267)
 at com.sun.proxy.$Proxy3.getCompactionHistory(Unknown Source)
 {code}
 nodetool starts with -Xmx32m. This seems to be not enough at least in my case 
 to show the history. I am not sure what would the appropriate amount be but 
 increasing it to 128m definitely solves the problem. Output from modified 
 nodetool attached.



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


[jira] [Commented] (CASSANDRA-7964) cassandra-stress over schema should support multiple simultaneous inserts over the same seed

2014-09-18 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-7964:
-

Patch available 
[here|https://github.com/belliottsmith/cassandra/tree/7964-simultinserts]

It does some reasonably non-trivial refactoring so that the various bits of 
state can be maintained. The basic idea, though, is very simple: whenever we 
setup an iterator for a partition we're writing to, we check the current 
position of the seed, establish a limit we will visit for this iterator and 
immediately cas the position we have to this new limit; if we succeed, we now 
own that range exclusively, but another writer can still come and operate over 
the remainder of the range. We don't immediately validate that the range 
exists, we just operate over averages, and corroborate after adoption. If it 
doesn't exist, we attempt to cas the position again to an existing position, 
and then another limit, until we exhaust the partition, at which point we abort 
and ask for a new seed. 

This somewhat complicates the iteration logic, and increases coupling of seed 
generation to the iterator, but it's pretty inescapable unfortunately.

 cassandra-stress over schema should support multiple simultaneous inserts 
 over the same seed
 

 Key: CASSANDRA-7964
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7964
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Reporter: Benedict
Assignee: Benedict
Priority: Minor

 This constraint makes testing contention essentially impossible



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


[jira] [Commented] (CASSANDRA-6075) The token function should allow column identifiers in the correct order only

2014-09-18 Thread Tyler Hobbs (JIRA)

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

Tyler Hobbs commented on CASSANDRA-6075:


If I specify the partition key items out of order, I get a somewhat confusing 
type error message:

{noformat}
cqlsh:ks1 create table foo (a int, b text, c int, d int, PRIMARY KEY ((a, b, 
c)));
cqlsh:ks1 select * from foo WHERE token(a, c, b)  token(0, 0, 'a');
Bad Request: Type error: 0 cannot be passed as argument 1 of function token of 
type text
{noformat}

We need to do the order check prior to the type check or find a way to do the 
type check properly.

 The token function should allow column identifiers in the correct order only
 

 Key: CASSANDRA-6075
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6075
 Project: Cassandra
  Issue Type: Bug
 Environment: Cassandra 1.2.9
Reporter: Michaël Figuière
Assignee: Benjamin Lerer
Priority: Minor
  Labels: cql
 Fix For: 2.0.11

 Attachments: CASSANDRA-2.1-6075.txt, CASSANDRA-6075.txt


 Given the following table:
 {code}
 CREATE TABLE t1 (a int, b text, PRIMARY KEY ((a, b)));
 {code}
 The following request returns an error in cqlsh as literal arguments order is 
 incorrect:
 {code}
 SELECT * FROM t1 WHERE token(a, b)  token('s', 1);
 Bad Request: Type error: 's' cannot be passed as argument 0 of function token 
 of type int
 {code}
 But surprisingly if we provide the column identifier arguments in the wrong 
 order no error is returned:
 {code}
 SELECT * FROM t1 WHERE token(a, b)  token(1, 'a'); // correct order is valid
 SELECT * FROM t1 WHERE token(b, a)  token(1, 'a'); // incorrect order is 
 valid as well
 {code}



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


[jira] [Commented] (CASSANDRA-7956) nodetool compactionhistory crashes because of low heap size (GC overhead limit exceeded)

2014-09-18 Thread Nikolai Grigoriev (JIRA)

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

Nikolai Grigoriev commented on CASSANDRA-7956:
--

I think that setting is not effective for nodetool status because of the GC 
settings. I have seen it before in other apps that the default GC settings may 
be very ineffective. Mostly it was due to the parallel GC not being enabled. 
Maybe trying to put -XX:+UseParNewGC -XX:+UseConcMarkSweepGC 
-XX:+CMSParallelRemarkEnabled would be enough. Although, of course, in that 
case nodetool will use more CPU resources.



 nodetool compactionhistory crashes because of low heap size (GC overhead 
 limit exceeded)
 --

 Key: CASSANDRA-7956
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7956
 Project: Cassandra
  Issue Type: Bug
 Environment: Cassandra 2.0.8
Reporter: Nikolai Grigoriev
Priority: Trivial
 Fix For: 2.0.11

 Attachments: 7956.txt, 
 nodetool_compactionhistory_128m_heap_output.txt.gz


 {code}
 ]# nodetool compactionhistory
 Compaction History:
 Exception in thread main java.lang.OutOfMemoryError: GC overhead limit 
 exceeded
 at java.io.ObjectStreamClass.newInstance(ObjectStreamClass.java:967)
 at 
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1782)
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
 at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
 at java.util.HashMap.readObject(HashMap.java:1180)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at 
 java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1017)
 at 
 java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1893)
 at 
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
 at 
 java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990)
 at 
 java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:500)
 at 
 javax.management.openmbean.TabularDataSupport.readObject(TabularDataSupport.java:912)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at 
 java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1017)
 at 
 java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1893)
 at 
 java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
 at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
 at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:325)
 at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:174)
 at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source)
 at 
 javax.management.remote.rmi.RMIConnectionImpl_Stub.getAttribute(Unknown 
 Source)
 at 
 javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.getAttribute(RMIConnector.java:906)
 at 
 javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:267)
 at com.sun.proxy.$Proxy3.getCompactionHistory(Unknown Source)
 {code}
 nodetool starts with -Xmx32m. This seems to be not enough at least in my case 
 to show the history. I am not sure what would the appropriate amount be but 
 increasing it to 128m definitely solves the problem. Output from modified 
 nodetool attached.



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


[jira] [Commented] (CASSANDRA-7546) AtomicSortedColumns.addAllWithSizeDelta has a spin loop that allocates memory

2014-09-18 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-7546:
-

I've uploaded a patch 
[here|https://github.com/belliottsmith/cassandra/tree/7964-simultinserts], and 
another [here|https://github.com/belliottsmith/cassandra/tree/7964+7926] which 
combines it with another stress patch that reduces the risk of OOM (although 
this risk is pretty low, and almost certainly not what you were hitting) - but 
as you scale thread count up it becomes more of a risk

The main 7964 patch includes a couple of small bug fixes as well, and I've 
tested it against your schema and some other related schemas that are trickier 
to process.

One thing I would suggest considering is expanding the clustering column count 
to increase the speed of generation, as 1200 items is still quite a few to 
create for only sending 1 item, which might end up reducing contention server 
side. Possibly reduce to only 30-40 items per tier.

 AtomicSortedColumns.addAllWithSizeDelta has a spin loop that allocates memory
 -

 Key: CASSANDRA-7546
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7546
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: graham sanderson
Assignee: graham sanderson
 Fix For: 2.1.1

 Attachments: 7546.20.txt, 7546.20_2.txt, 7546.20_3.txt, 
 7546.20_4.txt, 7546.20_5.txt, 7546.20_6.txt, 7546.20_7.txt, 7546.20_7b.txt, 
 7546.20_alt.txt, 7546.20_async.txt, 7546.21_v1.txt, hint_spikes.png, 
 suggestion1.txt, suggestion1_21.txt, young_gen_gc.png


 In order to preserve atomicity, this code attempts to read, clone/update, 
 then CAS the state of the partition.
 Under heavy contention for updating a single partition this can cause some 
 fairly staggering memory growth (the more cores on your machine the worst it 
 gets).
 Whilst many usage patterns don't do highly concurrent updates to the same 
 partition, hinting today, does, and in this case wild (order(s) of magnitude 
 more than expected) memory allocation rates can be seen (especially when the 
 updates being hinted are small updates to different partitions which can 
 happen very fast on their own) - see CASSANDRA-7545
 It would be best to eliminate/reduce/limit the spinning memory allocation 
 whilst not slowing down the very common un-contended case.



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


[jira] [Resolved] (CASSANDRA-7728) ConcurrentModificationException after upgrade to trunk

2014-09-18 Thread Benedict (JIRA)

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

Benedict resolved CASSANDRA-7728.
-
Resolution: Duplicate

 ConcurrentModificationException after upgrade to trunk
 --

 Key: CASSANDRA-7728
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7728
 Project: Cassandra
  Issue Type: Bug
Reporter: Russ Hatch

 Trying to repro another issue, I ran across this exception. It occurred 
 during a rolling upgrade to trunk. It happening during or right after the 
 test script checks counters to see if they are correct.
 {noformat}
 ERROR [Thrift:2] 2014-08-11 13:47:09,668 CustomTThreadPoolServer.java:219 - 
 Error occurred during processing of message.
 java.util.ConcurrentModificationException: null
   at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:859) 
 ~[na:1.7.0_65]
   at java.util.ArrayList$Itr.next(ArrayList.java:831) ~[na:1.7.0_65]
   at 
 org.apache.cassandra.service.RowDigestResolver.getData(RowDigestResolver.java:40)
  ~[main/:na]
   at 
 org.apache.cassandra.service.RowDigestResolver.getData(RowDigestResolver.java:28)
  ~[main/:na]
   at org.apache.cassandra.service.ReadCallback.get(ReadCallback.java:110) 
 ~[main/:na]
   at 
 org.apache.cassandra.service.AbstractReadExecutor.get(AbstractReadExecutor.java:144)
  ~[main/:na]
   at 
 org.apache.cassandra.service.StorageProxy.fetchRows(StorageProxy.java:1262) 
 ~[main/:na]
   at 
 org.apache.cassandra.service.StorageProxy.read(StorageProxy.java:1188) 
 ~[main/:na]
   at 
 org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:256)
  ~[main/:na]
   at 
 org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:212)
  ~[main/:na]
   at 
 org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:61)
  ~[main/:na]
   at 
 org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:186)
  ~[main/:na]
   at 
 org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:205) 
 ~[main/:na]
   at 
 org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1916)
  ~[main/:na]
   at 
 org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4588)
  ~[thrift/:na]
   at 
 org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4572)
  ~[thrift/:na]
   at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) 
 ~[libthrift-0.9.1.jar:0.9.1]
   at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39) 
 ~[libthrift-0.9.1.jar:0.9.1]
   at 
 org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:201)
  ~[main/:na]
   at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  [na:1.7.0_65]
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  [na:1.7.0_65]
   at java.lang.Thread.run(Thread.java:745) [na:1.7.0_65]
 {noformat}
 It's not happening 100% of the time, but may be triggered by running this 
 dtest:
 {noformat}
 nosetests -vs 
 upgrade_through_versions_test.py:TestUpgradeThroughVersions.upgrade_test_mixed
 {noformat}



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


[jira] [Commented] (CASSANDRA-7882) Memtable slab allocation should scale logarithmically to improve occupancy rate

2014-09-18 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-7882:
-

[~pateljay3001], any progress or would you like us to have a crack at it?

 Memtable slab allocation should scale logarithmically to improve occupancy 
 rate
 ---

 Key: CASSANDRA-7882
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7882
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Jay Patel
Assignee: Jay Patel
  Labels: performance
 Fix For: 2.1.1


 CASSANDRA-5935 allows option to disable region-based allocation for on-heap 
 memtables but there is no option to disable it for off-heap memtables 
 (memtable_allocation_type: offheap_objects). 
 Disabling region-based allocation will allow us to pack more tables in the 
 schema since minimum of 1MB region won't be allocated per table. Downside can 
 be more fragmentation which should be controllable by using better allocator 
 like JEMalloc.
 How about below option in yaml?:
 memtable_allocation_type: unslabbed_offheap_objects
 Thanks.



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


[jira] [Updated] (CASSANDRA-7096) Evaluate murmur hash of token only once

2014-09-18 Thread Benedict (JIRA)

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

Benedict updated CASSANDRA-7096:

Assignee: Branimir Lambov  (was: T Jake Luciani)

 Evaluate murmur hash of token only once
 ---

 Key: CASSANDRA-7096
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7096
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Benedict
Assignee: Branimir Lambov
Priority: Minor
  Labels: performance
 Fix For: 3.0


 Every bloom filter lookup we perform recalculates the murmur hash for the 
 token. I propose we extend DecoratedKey for the purposes of reads only, and 
 attach the full murmur hash to it so that we can pass these directly to the 
 bloom filter.



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


[jira] [Commented] (CASSANDRA-6075) The token function should allow column identifiers in the correct order only

2014-09-18 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer commented on CASSANDRA-6075:
---

I am impressed Tyler. I would have never thought about testing such a crappy 
case.

 The token function should allow column identifiers in the correct order only
 

 Key: CASSANDRA-6075
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6075
 Project: Cassandra
  Issue Type: Bug
 Environment: Cassandra 1.2.9
Reporter: Michaël Figuière
Assignee: Benjamin Lerer
Priority: Minor
  Labels: cql
 Fix For: 2.0.11

 Attachments: CASSANDRA-2.1-6075.txt, CASSANDRA-6075.txt


 Given the following table:
 {code}
 CREATE TABLE t1 (a int, b text, PRIMARY KEY ((a, b)));
 {code}
 The following request returns an error in cqlsh as literal arguments order is 
 incorrect:
 {code}
 SELECT * FROM t1 WHERE token(a, b)  token('s', 1);
 Bad Request: Type error: 's' cannot be passed as argument 0 of function token 
 of type int
 {code}
 But surprisingly if we provide the column identifier arguments in the wrong 
 order no error is returned:
 {code}
 SELECT * FROM t1 WHERE token(a, b)  token(1, 'a'); // correct order is valid
 SELECT * FROM t1 WHERE token(b, a)  token(1, 'a'); // incorrect order is 
 valid as well
 {code}



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


[jira] [Commented] (CASSANDRA-7928) Digest queries do not require alder32 checks

2014-09-18 Thread Jeremiah Jordan (JIRA)

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

Jeremiah Jordan commented on CASSANDRA-7928:


In the mean time, you can lower the crc_check_chance to do it less often.

 Digest queries do not require alder32 checks
 

 Key: CASSANDRA-7928
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7928
 Project: Cassandra
  Issue Type: Improvement
Reporter: sankalp kohli
Assignee: sankalp kohli
Priority: Minor
  Labels: performance
 Fix For: 2.1.1


  While reading data from sstables, C* does Alder32 checks for any data being 
 read. We have seen that this causes higher CPU usage while doing kernel 
 profiling. These checks might not be useful for digest queries as they will 
 have a different digest in case of corruption. 
  



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


[jira] [Updated] (CASSANDRA-6904) commitlog segments may not be archived after restart

2014-09-18 Thread Jeremiah Jordan (JIRA)

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

Jeremiah Jordan updated CASSANDRA-6904:
---
Assignee: Sam Tunnicliffe

 commitlog segments may not be archived after restart
 

 Key: CASSANDRA-6904
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6904
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Jonathan Ellis
Assignee: Sam Tunnicliffe
 Fix For: 2.1.1


 commitlog segments are archived when they are full, so the current active 
 segment will not be archived on restart (and its contents will not be 
 available for pitr).



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


[2/3] git commit: (cqlsh) Add command line option for cqlshrc file path.

2014-09-18 Thread mishail
(cqlsh) Add command line option for cqlshrc file path.

patch by Aaron Ploetz; reviewed by Mikhail Stepura for CASSANDRA-7131


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

Branch: refs/heads/trunk
Commit: 146b8e39777ec19f9651d65caec00bb6c7c033c6
Parents: 3dd2f00
Author: Aaron Ploetz aaronplo...@gmail.com
Authored: Thu Sep 18 13:30:43 2014 -0700
Committer: Mikhail Stepura mish...@apache.org
Committed: Thu Sep 18 13:30:43 2014 -0700

--
 CHANGES.txt |  1 +
 bin/cqlsh   | 46 ++
 2 files changed, 31 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/146b8e39/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index dfcd36d..a34e0b1 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.1
+ * (cqlsh) Add command line option for cqlshrc file path (CASSANDRA-7131)
  * Provide visibility into prepared statements churn (CASSANDRA-7921)
  * Invalidate prepared statements when their keyspace or table is
dropped (CASSANDRA-7566)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/146b8e39/bin/cqlsh
--
diff --git a/bin/cqlsh b/bin/cqlsh
index fa5de05..763a828 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -124,22 +124,6 @@ from cqlshlib.formatting import format_by_type, 
formatter_for, format_value_utyp
 from cqlshlib.util import trim_if_present
 from cqlshlib.tracing import print_trace_session, print_trace
 
-HISTORY_DIR = os.path.expanduser(os.path.join('~', '.cassandra'))
-CONFIG_FILE = os.path.join(HISTORY_DIR, 'cqlshrc')
-HISTORY = os.path.join(HISTORY_DIR, 'cqlsh_history')
-if not os.path.exists(HISTORY_DIR):
-try:
-os.mkdir(HISTORY_DIR)
-except OSError:
-print '\nWarning: Cannot create directory at `%s`. Command history 
will not be saved.\n' % HISTORY_DIR
-
-OLD_CONFIG_FILE = os.path.expanduser(os.path.join('~', '.cqlshrc'))
-if os.path.exists(OLD_CONFIG_FILE):
-os.rename(OLD_CONFIG_FILE, CONFIG_FILE)
-OLD_HISTORY = os.path.expanduser(os.path.join('~', '.cqlsh_history'))
-if os.path.exists(OLD_HISTORY):
-os.rename(OLD_HISTORY, HISTORY)
-
 DEFAULT_HOST = '127.0.0.1'
 DEFAULT_PORT = 9042
 DEFAULT_CQLVER = '3.2.0'
@@ -173,11 +157,41 @@ parser.add_option('-k', '--keyspace', help='Authenticate 
to the given keyspace.'
 parser.add_option(-f, --file, help=Execute commands from FILE, then exit)
 parser.add_option('--debug', action='store_true',
   help='Show additional debugging information')
+parser.add_option(--cqlshrc, help=Specify an alternative cqlshrc file 
location.)
 parser.add_option('--cqlversion', default=DEFAULT_CQLVER,
   help='Specify a particular CQL version (default: %default).'
' Examples: 3.0.3, 3.1.0')
 parser.add_option(-e, --execute, help='Execute the statement and quit.')
 
+optvalues = optparse.Values()
+(options, arguments) = parser.parse_args(sys.argv[1:], values=optvalues)
+
+#BEGIN history/config definition
+HISTORY_DIR = os.path.expanduser(os.path.join('~', '.cassandra'))
+
+if hasattr(options, 'cqlshrc'):
+CONFIG_FILE = options.cqlshrc
+if not os.path.exists(CONFIG_FILE):
+print '\nWarning: Specified cqlshrc location `%s` does not exist.  
Using `%s` instead.\n' % (CONFIG_FILE, HISTORY_DIR)
+CONFIG_FILE = os.path.join(HISTORY_DIR, 'cqlshrc')
+else:
+CONFIG_FILE = os.path.join(HISTORY_DIR, 'cqlshrc')
+
+HISTORY = os.path.join(HISTORY_DIR, 'cqlsh_history')
+if not os.path.exists(HISTORY_DIR):
+try:
+os.mkdir(HISTORY_DIR)
+except OSError:
+print '\nWarning: Cannot create directory at `%s`. Command history 
will not be saved.\n' % HISTORY_DIR
+
+OLD_CONFIG_FILE = os.path.expanduser(os.path.join('~', '.cqlshrc'))
+if os.path.exists(OLD_CONFIG_FILE):
+os.rename(OLD_CONFIG_FILE, CONFIG_FILE)
+OLD_HISTORY = os.path.expanduser(os.path.join('~', '.cqlsh_history'))
+if os.path.exists(OLD_HISTORY):
+os.rename(OLD_HISTORY, HISTORY)
+#END history/config definition
+
 CQL_ERRORS = (
 cassandra.AlreadyExists, cassandra.AuthenticationFailed, 
cassandra.InvalidRequest,
 cassandra.Timeout, cassandra.Unauthorized, cassandra.OperationTimedOut,



[3/3] git commit: Merge branch 'cassandra-2.1' into trunk

2014-09-18 Thread mishail
Merge branch 'cassandra-2.1' into trunk


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

Branch: refs/heads/trunk
Commit: e9f94447ed3f53b5f6050dda6772f44c5daaabc1
Parents: a810c47 146b8e3
Author: Mikhail Stepura mish...@apache.org
Authored: Thu Sep 18 13:31:08 2014 -0700
Committer: Mikhail Stepura mish...@apache.org
Committed: Thu Sep 18 13:31:08 2014 -0700

--
 CHANGES.txt |  1 +
 bin/cqlsh   | 46 ++
 2 files changed, 31 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e9f94447/CHANGES.txt
--
diff --cc CHANGES.txt
index 254fe2b,a34e0b1..ddc115e
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,29 -1,5 +1,30 @@@
 +3.0
 + * Make assassinate a first class command (CASSANDRA-7935)
 + * Support IN clause on any clustering column (CASSANDRA-4762)
 + * Improve compaction logging (CASSANDRA-7818)
 + * Remove YamlFileNetworkTopologySnitch (CASSANDRA-7917)
 + * Support Java source code for user-defined functions (CASSANDRA-7562)
 + * Require arg types to disambiguate UDF drops (CASSANDRA-7812)
 + * Do anticompaction in groups (CASSANDRA-6851)
 + * Verify that UDF class methods are static (CASSANDRA-7781)
 + * Support pure user-defined functions (CASSANDRA-7395, 7740)
 + * Permit configurable timestamps with cassandra-stress (CASSANDRA-7416)
 + * Move sstable RandomAccessReader to nio2, which allows using the
 +   FILE_SHARE_DELETE flag on Windows (CASSANDRA-4050)
 + * Remove CQL2 (CASSANDRA-5918)
 + * Add Thrift get_multi_slice call (CASSANDRA-6757)
 + * Optimize fetching multiple cells by name (CASSANDRA-6933)
 + * Allow compilation in java 8 (CASSANDRA-7028)
 + * Make incremental repair default (CASSANDRA-7250)
 + * Enable code coverage thru JaCoCo (CASSANDRA-7226)
 + * Switch external naming of 'column families' to 'tables' (CASSANDRA-4369) 
 + * Shorten SSTable path (CASSANDRA-6962)
 + * Use unsafe mutations for most unit tests (CASSANDRA-6969)
 + * Fix race condition during calculation of pending ranges (CASSANDRA-7390)
 +
 +
  2.1.1
+  * (cqlsh) Add command line option for cqlshrc file path (CASSANDRA-7131)
   * Provide visibility into prepared statements churn (CASSANDRA-7921)
   * Invalidate prepared statements when their keyspace or table is
 dropped (CASSANDRA-7566)



[jira] [Updated] (CASSANDRA-6125) Race condition in Gossip propagation

2014-09-18 Thread Brandon Williams (JIRA)

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

Brandon Williams updated CASSANDRA-6125:

Reviewer: Jason Brown

 Race condition in Gossip propagation
 

 Key: CASSANDRA-6125
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6125
 Project: Cassandra
  Issue Type: Bug
Reporter: Sergio Bossa
Assignee: Brandon Williams
 Fix For: 2.0.11

 Attachments: 6125.txt


 Gossip propagation has a race when concurrent VersionedValues are created and 
 submitted/propagated, causing some updates to be lost, even if happening on 
 different ApplicationStatuses.
 That's what happens basically:
 1) A new VersionedValue V1 is created with version X.
 2) A new VersionedValue V2 is created with version Y = X + 1.
 3) V2 is added to the endpoint state map and propagated.
 4) Nodes register Y as max version seen.
 5) At this point, V1 is added to the endpoint state map and propagated too.
 6) V1 version is X  Y, so nodes do not ask for his value after digests.
 A possible solution would be to propagate/track per-ApplicationStatus 
 versions, possibly encoding them to avoid network overhead.



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


[jira] [Updated] (CASSANDRA-6125) Race condition in Gossip propagation

2014-09-18 Thread Brandon Williams (JIRA)

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

Brandon Williams updated CASSANDRA-6125:

Attachment: 6125.txt

bq. A possible solution would be to propagate/track per-ApplicationStatus 
versions, possibly encoding them to avoid network overhead

That's a fairly invasive measure.  In practice there are very few instances 
where we update two application states together, and really only one case: 
STATUS and TOKENS.  Instead, we can just create a utility method that locks the 
gossip task, adds the states, and then releases it, so there can be no 
propagation in between.  Patch to do this.

 Race condition in Gossip propagation
 

 Key: CASSANDRA-6125
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6125
 Project: Cassandra
  Issue Type: Bug
Reporter: Sergio Bossa
Assignee: Brandon Williams
 Fix For: 2.0.11

 Attachments: 6125.txt


 Gossip propagation has a race when concurrent VersionedValues are created and 
 submitted/propagated, causing some updates to be lost, even if happening on 
 different ApplicationStatuses.
 That's what happens basically:
 1) A new VersionedValue V1 is created with version X.
 2) A new VersionedValue V2 is created with version Y = X + 1.
 3) V2 is added to the endpoint state map and propagated.
 4) Nodes register Y as max version seen.
 5) At this point, V1 is added to the endpoint state map and propagated too.
 6) V1 version is X  Y, so nodes do not ask for his value after digests.
 A possible solution would be to propagate/track per-ApplicationStatus 
 versions, possibly encoding them to avoid network overhead.



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


[1/3] git commit: (cqlsh) Add command line option for cqlshrc file path.

2014-09-18 Thread mishail
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 3dd2f0064 - 146b8e397
  refs/heads/trunk a810c477d - e9f94447e


(cqlsh) Add command line option for cqlshrc file path.

patch by Aaron Ploetz; reviewed by Mikhail Stepura for CASSANDRA-7131


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

Branch: refs/heads/cassandra-2.1
Commit: 146b8e39777ec19f9651d65caec00bb6c7c033c6
Parents: 3dd2f00
Author: Aaron Ploetz aaronplo...@gmail.com
Authored: Thu Sep 18 13:30:43 2014 -0700
Committer: Mikhail Stepura mish...@apache.org
Committed: Thu Sep 18 13:30:43 2014 -0700

--
 CHANGES.txt |  1 +
 bin/cqlsh   | 46 ++
 2 files changed, 31 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/146b8e39/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index dfcd36d..a34e0b1 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.1
+ * (cqlsh) Add command line option for cqlshrc file path (CASSANDRA-7131)
  * Provide visibility into prepared statements churn (CASSANDRA-7921)
  * Invalidate prepared statements when their keyspace or table is
dropped (CASSANDRA-7566)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/146b8e39/bin/cqlsh
--
diff --git a/bin/cqlsh b/bin/cqlsh
index fa5de05..763a828 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -124,22 +124,6 @@ from cqlshlib.formatting import format_by_type, 
formatter_for, format_value_utyp
 from cqlshlib.util import trim_if_present
 from cqlshlib.tracing import print_trace_session, print_trace
 
-HISTORY_DIR = os.path.expanduser(os.path.join('~', '.cassandra'))
-CONFIG_FILE = os.path.join(HISTORY_DIR, 'cqlshrc')
-HISTORY = os.path.join(HISTORY_DIR, 'cqlsh_history')
-if not os.path.exists(HISTORY_DIR):
-try:
-os.mkdir(HISTORY_DIR)
-except OSError:
-print '\nWarning: Cannot create directory at `%s`. Command history 
will not be saved.\n' % HISTORY_DIR
-
-OLD_CONFIG_FILE = os.path.expanduser(os.path.join('~', '.cqlshrc'))
-if os.path.exists(OLD_CONFIG_FILE):
-os.rename(OLD_CONFIG_FILE, CONFIG_FILE)
-OLD_HISTORY = os.path.expanduser(os.path.join('~', '.cqlsh_history'))
-if os.path.exists(OLD_HISTORY):
-os.rename(OLD_HISTORY, HISTORY)
-
 DEFAULT_HOST = '127.0.0.1'
 DEFAULT_PORT = 9042
 DEFAULT_CQLVER = '3.2.0'
@@ -173,11 +157,41 @@ parser.add_option('-k', '--keyspace', help='Authenticate 
to the given keyspace.'
 parser.add_option(-f, --file, help=Execute commands from FILE, then exit)
 parser.add_option('--debug', action='store_true',
   help='Show additional debugging information')
+parser.add_option(--cqlshrc, help=Specify an alternative cqlshrc file 
location.)
 parser.add_option('--cqlversion', default=DEFAULT_CQLVER,
   help='Specify a particular CQL version (default: %default).'
' Examples: 3.0.3, 3.1.0')
 parser.add_option(-e, --execute, help='Execute the statement and quit.')
 
+optvalues = optparse.Values()
+(options, arguments) = parser.parse_args(sys.argv[1:], values=optvalues)
+
+#BEGIN history/config definition
+HISTORY_DIR = os.path.expanduser(os.path.join('~', '.cassandra'))
+
+if hasattr(options, 'cqlshrc'):
+CONFIG_FILE = options.cqlshrc
+if not os.path.exists(CONFIG_FILE):
+print '\nWarning: Specified cqlshrc location `%s` does not exist.  
Using `%s` instead.\n' % (CONFIG_FILE, HISTORY_DIR)
+CONFIG_FILE = os.path.join(HISTORY_DIR, 'cqlshrc')
+else:
+CONFIG_FILE = os.path.join(HISTORY_DIR, 'cqlshrc')
+
+HISTORY = os.path.join(HISTORY_DIR, 'cqlsh_history')
+if not os.path.exists(HISTORY_DIR):
+try:
+os.mkdir(HISTORY_DIR)
+except OSError:
+print '\nWarning: Cannot create directory at `%s`. Command history 
will not be saved.\n' % HISTORY_DIR
+
+OLD_CONFIG_FILE = os.path.expanduser(os.path.join('~', '.cqlshrc'))
+if os.path.exists(OLD_CONFIG_FILE):
+os.rename(OLD_CONFIG_FILE, CONFIG_FILE)
+OLD_HISTORY = os.path.expanduser(os.path.join('~', '.cqlsh_history'))
+if os.path.exists(OLD_HISTORY):
+os.rename(OLD_HISTORY, HISTORY)
+#END history/config definition
+
 CQL_ERRORS = (
 cassandra.AlreadyExists, cassandra.AuthenticationFailed, 
cassandra.InvalidRequest,
 cassandra.Timeout, cassandra.Unauthorized, cassandra.OperationTimedOut,



[jira] [Commented] (CASSANDRA-6125) Race condition in Gossip propagation

2014-09-18 Thread Brandon Williams (JIRA)

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

Brandon Williams commented on CASSANDRA-6125:
-

There's still a small window where a remote node could gossip with us and 
receive a partial state, but that looks confined to node replacement where 
we'll be in a dead state and nobody will initiate a round with us, so we just 
need to isolate our own propagation.

 Race condition in Gossip propagation
 

 Key: CASSANDRA-6125
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6125
 Project: Cassandra
  Issue Type: Bug
Reporter: Sergio Bossa
Assignee: Brandon Williams
 Fix For: 2.0.11

 Attachments: 6125.txt


 Gossip propagation has a race when concurrent VersionedValues are created and 
 submitted/propagated, causing some updates to be lost, even if happening on 
 different ApplicationStatuses.
 That's what happens basically:
 1) A new VersionedValue V1 is created with version X.
 2) A new VersionedValue V2 is created with version Y = X + 1.
 3) V2 is added to the endpoint state map and propagated.
 4) Nodes register Y as max version seen.
 5) At this point, V1 is added to the endpoint state map and propagated too.
 6) V1 version is X  Y, so nodes do not ask for his value after digests.
 A possible solution would be to propagate/track per-ApplicationStatus 
 versions, possibly encoding them to avoid network overhead.



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


[jira] [Created] (CASSANDRA-7972) Add CREATE INDEX ... ON ..(KEYS()) syntax to cqlsh and CQL.textile

2014-09-18 Thread Mikhail Stepura (JIRA)
Mikhail Stepura created CASSANDRA-7972:
--

 Summary: Add CREATE INDEX ... ON ..(KEYS()) syntax to cqlsh and 
CQL.textile
 Key: CASSANDRA-7972
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7972
 Project: Cassandra
  Issue Type: Sub-task
  Components: Tools
Reporter: Mikhail Stepura
Priority: Minor
 Fix For: 2.1.1






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


[jira] [Updated] (CASSANDRA-7972) Add CREATE INDEX ... ON ..(KEYS()) syntax to cqlsh and CQL.textile

2014-09-18 Thread Mikhail Stepura (JIRA)

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

Mikhail Stepura updated CASSANDRA-7972:
---
Description: 
http://www.datastax.com/documentation/cql/3.1/cql/cql_reference/create_index_r.html?scroll=reference_ds_eqm_nmd_xj__CreatIdxCollKey

 Add CREATE INDEX ... ON ..(KEYS()) syntax to cqlsh and CQL.textile
 

 Key: CASSANDRA-7972
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7972
 Project: Cassandra
  Issue Type: Sub-task
  Components: Tools
Reporter: Mikhail Stepura
Priority: Minor
  Labels: cqlsh, lhf
 Fix For: 2.1.1


 http://www.datastax.com/documentation/cql/3.1/cql/cql_reference/create_index_r.html?scroll=reference_ds_eqm_nmd_xj__CreatIdxCollKey



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


[jira] [Created] (CASSANDRA-7973) cqlsh connect error member_descriptor' object is not callable

2014-09-18 Thread Digant Modha (JIRA)
Digant Modha created CASSANDRA-7973:
---

 Summary: cqlsh connect error member_descriptor' object is not 
callable
 Key: CASSANDRA-7973
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7973
 Project: Cassandra
  Issue Type: Bug
 Environment: Cassandra 2.1.0
Reporter: Digant Modha
Priority: Minor


When using cqlsh (Cassandra 2.1.0) with ssl, python 2.6.9. I get Connection 
error: ('Unable to connect to any servers', {...: 
TypeError('member_descriptor' object is not callable,)}) 
I am able to connect from another machine using python 2.7.5.



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


[jira] [Assigned] (CASSANDRA-7973) cqlsh connect error member_descriptor' object is not callable

2014-09-18 Thread Philip Thompson (JIRA)

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

Philip Thompson reassigned CASSANDRA-7973:
--

Assignee: Philip Thompson

 cqlsh connect error member_descriptor' object is not callable
 ---

 Key: CASSANDRA-7973
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7973
 Project: Cassandra
  Issue Type: Bug
 Environment: Cassandra 2.1.0
Reporter: Digant Modha
Assignee: Philip Thompson
Priority: Minor

 When using cqlsh (Cassandra 2.1.0) with ssl, python 2.6.9. I get Connection 
 error: ('Unable to connect to any servers', {...: 
 TypeError('member_descriptor' object is not callable,)}) 
 I am able to connect from another machine using python 2.7.5.



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


[jira] [Updated] (CASSANDRA-7946) NPE when streaming data to a joining node and dropping table in cluster

2014-09-18 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-7946:
--
Reviewer: Marcus Eriksson

 NPE when streaming data to a joining node and dropping table in cluster
 ---

 Key: CASSANDRA-7946
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7946
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: Cassandra 2.0.9
Reporter: DOAN DuyHai
Assignee: Yuki Morishita
  Labels: streaming
 Fix For: 2.0.11, 2.1.1

 Attachments: 7946-2.0.txt


 Summary
  The cluster has 3 nodes with Vnodes. We were adding a 4th one (in auto 
 bootstrap mode). The 4 node has stream sessions, receiving data from the 
 others.
  While the streaming was going on (it takes quite a while because there are 
 200Gb of data of worth), an existing table is dropped in the cluster and a 
 new one is created.
  A few time after, we caught an NPE in the log file of the joining node 
 (still not finished joining):
  The NPE is located here: 
 https://github.com/apache/cassandra/blob/cassandra-2.0/src/java/org/apache/cassandra/streaming/compress/CompressedStreamReader.java#L63
  It can be a race condition where schema agreement has not reached the 
 joining node.



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


[jira] [Commented] (CASSANDRA-6904) commitlog segments may not be archived after restart

2014-09-18 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-6904:
---

Archive everything on restart is definitely a simpler solution.

 commitlog segments may not be archived after restart
 

 Key: CASSANDRA-6904
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6904
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Jonathan Ellis
Assignee: Sam Tunnicliffe
 Fix For: 2.1.1


 commitlog segments are archived when they are full, so the current active 
 segment will not be archived on restart (and its contents will not be 
 available for pitr).



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


  1   2   >