[jira] [Comment Edited] (CASSANDRA-5422) Binary protocol sanity check

2013-05-13 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne edited comment on CASSANDRA-5422 at 5/13/13 6:50 AM:
--

bq. Make StorageProxy non-blocking

For info, CASSANDRA-5239 is open for this (and I have 3 quarters of a patch 
written, which I'm going to attach soonish).

  was (Author: slebresne):
bq. Make StorageProxy non-blocking

For info, CASSANDRA-5239 is open for this (and I have 2 quarters of a patch 
written, which I'm going to attach soonish).
  
 Binary protocol sanity check
 

 Key: CASSANDRA-5422
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5422
 Project: Cassandra
  Issue Type: Bug
  Components: API
Reporter: Jonathan Ellis
Assignee: Daniel Norberg
 Attachments: 5422-test.txt


 With MutationStatement.execute turned into a no-op, I only get about 33k 
 insert_prepared ops/s on my laptop.  That is: this is an upper bound for our 
 performance if Cassandra were infinitely fast, limited by netty handling the 
 protocol + connections.
 This is up from about 13k/s with MS.execute running normally.
 ~40% overhead from netty seems awfully high to me, especially for 
 insert_prepared where the return value is tiny.  (I also used 4-byte column 
 values to minimize that part as well.)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5422) Binary protocol sanity check

2013-05-13 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-5422:
-

bq. Make StorageProxy non-blocking

For info, CASSANDRA-5239 is open for this (and I have 2 quarters of a patch 
written, which I'm going to attach soonish).

 Binary protocol sanity check
 

 Key: CASSANDRA-5422
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5422
 Project: Cassandra
  Issue Type: Bug
  Components: API
Reporter: Jonathan Ellis
Assignee: Daniel Norberg
 Attachments: 5422-test.txt


 With MutationStatement.execute turned into a no-op, I only get about 33k 
 insert_prepared ops/s on my laptop.  That is: this is an upper bound for our 
 performance if Cassandra were infinitely fast, limited by netty handling the 
 protocol + connections.
 This is up from about 13k/s with MS.execute running normally.
 ~40% overhead from netty seems awfully high to me, especially for 
 insert_prepared where the return value is tiny.  (I also used 4-byte column 
 values to minimize that part as well.)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Created] (CASSANDRA-5559) Collection size overflow not handled in CQL3 binary protocol responses

2013-05-13 Thread Theo Hultberg (JIRA)
Theo Hultberg created CASSANDRA-5559:


 Summary: Collection size overflow not handled in CQL3 binary 
protocol responses
 Key: CASSANDRA-5559
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5559
 Project: Cassandra
  Issue Type: Bug
Reporter: Theo Hultberg
Priority: Minor


In the binary/native protocol collection sizes are specified with an unsigned 
int, but it's still possible to create collections larger than 2^16 items. When 
the client asks for a row with a collection that is bigger than this the 
collection size field overflows and the client will see an inconsistent size. 
If the collection size is 2^16 + 1 the client will see a size of 1.

All of the items in the collection are actually in the response, and the frame 
is still correct, it's just that a client that interprets the protocol strictly 
will not see them (I don't know how the Java CQL3 driver handles this, but my 
reading of the spec for the Ruby driver I'm writing means that I can't read 
those values without going outside of the spec).

I don't know exactly what the correct thing to do is. The way it works now 
leads to weird results (getting only one item when the collection is 2^16 + 1), 
and getting only the first 2^16 items may be less surprising.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Comment Edited] (CASSANDRA-4421) Support cql3 table definitions in Hadoop InputFormat

2013-05-13 Thread Cyril Scetbon (JIRA)

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

Cyril Scetbon edited comment on CASSANDRA-4421 at 5/13/13 8:45 AM:
---

[~alexliu68] Oh, I was thinking that only thrift was affected by the CQL3 issue 
and that it was why pig was not working. If Pig needs to be updated too (as you 
say), I'll wait for that with hope that it will come soon… Can you change the 
status of [CASSANDRA-5234|https://issues.apache.org/jira/browse/CASSANDRA-5234] 
otherwise it won't be assigned unless there is another JIRA for that ?
[~jbellis] I thought it was ONE whole block

  was (Author: cscetbon):
[~alexliu68] Oh, I was thinking that only thrift was affected by the CQL3 
issue and that it was why pig was not working. If Pig needs to be updated too 
(as you say), I'll wait for that with hope that it will come soon… Can you 
change the status of 
[CASSANDRA-5234|https://issues.apache.org/jira/browse/CASSANDRA-5234] otherwise 
it won't be assigned unless there is another JIRA for that ?
[~jbellis] I thought it was ONE whole block
  
 Support cql3 table definitions in Hadoop InputFormat
 

 Key: CASSANDRA-4421
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4421
 Project: Cassandra
  Issue Type: Improvement
  Components: API
Affects Versions: 1.1.0
 Environment: Debian Squeeze
Reporter: bert Passek
  Labels: cql3
 Fix For: 1.2.5

 Attachments: 4421-1.txt, 4421-2.txt, 4421.txt


 Hello,
 i faced a bug while writing composite column values and following validation 
 on server side.
 This is the setup for reproduction:
 1. create a keyspace
 create keyspace test with strategy_class = 'SimpleStrategy' and 
 strategy_options:replication_factor = 1;
 2. create a cf via cql (3.0)
 create table test1 (
 a int,
 b int,
 c int,
 primary key (a, b)
 );
 If i have a look at the schema in cli i noticed that there is no column 
 metadata for columns not part of primary key.
 create column family test1
   with column_type = 'Standard'
   and comparator = 
 'CompositeType(org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.UTF8Type)'
   and default_validation_class = 'UTF8Type'
   and key_validation_class = 'Int32Type'
   and read_repair_chance = 0.1
   and dclocal_read_repair_chance = 0.0
   and gc_grace = 864000
   and min_compaction_threshold = 4
   and max_compaction_threshold = 32
   and replicate_on_write = true
   and compaction_strategy = 
 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'
   and caching = 'KEYS_ONLY'
   and compression_options = {'sstable_compression' : 
 'org.apache.cassandra.io.compress.SnappyCompressor'};
 Please notice the default validation class: UTF8Type
 Now i would like to insert value  127 via cassandra client (no cql, part of 
 mr-jobs). Have a look at the attachement.
 Batch mutate fails:
 InvalidRequestException(why:(String didn't validate.) [test][test1][1:c] 
 failed validation)
 A validator for column value is fetched in 
 ThriftValidation::validateColumnData which returns always the default 
 validator which is UTF8Type as described above (The ColumnDefinition for 
 given column name c is always null)
 In UTF8Type there is a check for
 if (b  127)
return false;
 Anyway, maybe i'm doing something wrong, but i used cql 3.0 for table 
 creation. I assigned data types to all columns, but i can not set values for 
 a composite column because the default validation class is used.
 I think the schema should know the correct validator even for composite 
 columns. The usage of the default validation class does not make sense.
 Best Regards 
 Bert Passek

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Reopened] (CASSANDRA-5234) Table created through CQL3 are not accessble to Pig 0.10

2013-05-13 Thread Cyril Scetbon (JIRA)

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

Cyril Scetbon reopened CASSANDRA-5234:
--


It should be fixed after 
[CASSANDRA-4421|https://issues.apache.org/jira/browse/CASSANDRA-4421]

 Table created through CQL3 are not accessble to Pig 0.10
 

 Key: CASSANDRA-5234
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5234
 Project: Cassandra
  Issue Type: Bug
  Components: Hadoop
Affects Versions: 1.2.1
 Environment: Red hat linux 5
Reporter: Shamim Ahmed
 Fix For: 1.2.2


 Hi,
   i have faced a bug when creating table through CQL3 and trying to load data 
 through pig 0.10 as follows:
 java.lang.RuntimeException: Column family 'abc' not found in keyspace 'XYZ'
   at 
 org.apache.cassandra.hadoop.pig.CassandraStorage.initSchema(CassandraStorage.java:1112)
   at 
 org.apache.cassandra.hadoop.pig.CassandraStorage.setLocation(CassandraStorage.java:615).
 This effects from Simple table to table with compound key. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Resolved] (CASSANDRA-5559) Collection size overflow not handled in CQL3 binary protocol responses

2013-05-13 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne resolved CASSANDRA-5559.
-

Resolution: Duplicate

This is a duplicate of CASSANDRA-5428 (CASSANDRA-5355 is also relevant on early 
1.2 versions). I refer you to that former issue for the current plan of action.

 Collection size overflow not handled in CQL3 binary protocol responses
 --

 Key: CASSANDRA-5559
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5559
 Project: Cassandra
  Issue Type: Bug
Reporter: Theo Hultberg
Priority: Minor

 In the binary/native protocol collection sizes are specified with an unsigned 
 int, but it's still possible to create collections larger than 2^16 items. 
 When the client asks for a row with a collection that is bigger than this the 
 collection size field overflows and the client will see an inconsistent size. 
 If the collection size is 2^16 + 1 the client will see a size of 1.
 All of the items in the collection are actually in the response, and the 
 frame is still correct, it's just that a client that interprets the protocol 
 strictly will not see them (I don't know how the Java CQL3 driver handles 
 this, but my reading of the spec for the Ruby driver I'm writing means that I 
 can't read those values without going outside of the spec).
 I don't know exactly what the correct thing to do is. The way it works now 
 leads to weird results (getting only one item when the collection is 2^16 + 
 1), and getting only the first 2^16 items may be less surprising.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


git commit: Fix intersection with Bound computation

2013-05-13 Thread slebresne
Updated Branches:
  refs/heads/cassandra-1.2 d34978751 - 2e2dd48ff


Fix intersection with Bound computation

patch by wy96f; reviewed by slebresne for CASSANDRA-5551


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

Branch: refs/heads/cassandra-1.2
Commit: 2e2dd48ff911a84ef46dae3fe05331ce8f669791
Parents: d349787
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon May 13 12:11:08 2013 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon May 13 12:11:08 2013 +0200

--
 CHANGES.txt  |1 +
 src/java/org/apache/cassandra/dht/Range.java |2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2e2dd48f/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index dfe3015..cf218d6 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -23,6 +23,7 @@
  * Add custom secondary index support to CQL3 (CASSANDRA-5484)
  * Fix repair hanging silently on unexpected error (CASSANDRA-5229)
  * Fix Ec2Snitch regression introduced by CASSANDRA-5171 (CASSANDRA-5432)
+ * Fix Bound intersection computation (CASSANDRA-5551)
 Merged from 1.1
  * Add retry mechanism to OTC for non-droppable_verbs (CASSANDRA-5393)
  * Use allocator information to improve memtable memory usage estimate

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2e2dd48f/src/java/org/apache/cassandra/dht/Range.java
--
diff --git a/src/java/org/apache/cassandra/dht/Range.java 
b/src/java/org/apache/cassandra/dht/Range.java
index 99286fe..c2d7b63 100644
--- a/src/java/org/apache/cassandra/dht/Range.java
+++ b/src/java/org/apache/cassandra/dht/Range.java
@@ -136,7 +136,7 @@ public class RangeT extends RingPosition extends 
AbstractBoundsT implements
  */
 public boolean intersects(BoundsT that)
 {
-return intersects(new RangeT(that.left, that.right)) || 
contains(that.right);
+return intersects(new RangeT(that.left, that.right)) || 
contains(that.left);
 }
 
 public static T extends RingPosition SetRangeT rangeSet(RangeT ... 
ranges)



[1/2] git commit: Fix intersection with Bound computation

2013-05-13 Thread slebresne
Updated Branches:
  refs/heads/trunk aecd63011 - 49a7311f5


Fix intersection with Bound computation

patch by wy96f; reviewed by slebresne for CASSANDRA-5551


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

Branch: refs/heads/trunk
Commit: 2e2dd48ff911a84ef46dae3fe05331ce8f669791
Parents: d349787
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon May 13 12:11:08 2013 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon May 13 12:11:08 2013 +0200

--
 CHANGES.txt  |1 +
 src/java/org/apache/cassandra/dht/Range.java |2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2e2dd48f/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index dfe3015..cf218d6 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -23,6 +23,7 @@
  * Add custom secondary index support to CQL3 (CASSANDRA-5484)
  * Fix repair hanging silently on unexpected error (CASSANDRA-5229)
  * Fix Ec2Snitch regression introduced by CASSANDRA-5171 (CASSANDRA-5432)
+ * Fix Bound intersection computation (CASSANDRA-5551)
 Merged from 1.1
  * Add retry mechanism to OTC for non-droppable_verbs (CASSANDRA-5393)
  * Use allocator information to improve memtable memory usage estimate

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2e2dd48f/src/java/org/apache/cassandra/dht/Range.java
--
diff --git a/src/java/org/apache/cassandra/dht/Range.java 
b/src/java/org/apache/cassandra/dht/Range.java
index 99286fe..c2d7b63 100644
--- a/src/java/org/apache/cassandra/dht/Range.java
+++ b/src/java/org/apache/cassandra/dht/Range.java
@@ -136,7 +136,7 @@ public class RangeT extends RingPosition extends 
AbstractBoundsT implements
  */
 public boolean intersects(BoundsT that)
 {
-return intersects(new RangeT(that.left, that.right)) || 
contains(that.right);
+return intersects(new RangeT(that.left, that.right)) || 
contains(that.left);
 }
 
 public static T extends RingPosition SetRangeT rangeSet(RangeT ... 
ranges)



[2/2] git commit: Merge branch 'cassandra-1.2' into trunk

2013-05-13 Thread slebresne
Merge branch 'cassandra-1.2' into trunk


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

Branch: refs/heads/trunk
Commit: 49a7311f5fffa3ae25fbd1e7f1b9d13900f3b8cd
Parents: aecd630 2e2dd48
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon May 13 12:13:05 2013 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon May 13 12:13:05 2013 +0200

--
 CHANGES.txt  |1 +
 src/java/org/apache/cassandra/dht/Range.java |2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
--


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



[jira] [Resolved] (CASSANDRA-5551) intersects the bounds not right

2013-05-13 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne resolved CASSANDRA-5551.
-

   Resolution: Fixed
Fix Version/s: 1.2.5
 Reviewer: slebresne
 Assignee: yangwei

Make sense. +1, committed, thanks.

 intersects the bounds not right
 ---

 Key: CASSANDRA-5551
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5551
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.2.0
Reporter: yangwei
Assignee: yangwei
Priority: Minor
 Fix For: 1.2.5

 Attachments: 0001-correctly-intersects-the-bounds.patch


 intersecs the bound includes the left of bound instead of right

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5378) Fat Client: No longer works in 1.2

2013-05-13 Thread Carl Yeksigian (JIRA)

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

Carl Yeksigian commented on CASSANDRA-5378:
---

The point of the second patch was to prevent us from using the file system. 
This means that the migration manager probably needs to be able to operate 
exclusively in memory.

I'll take a look at this issue later today.

 Fat Client: No longer works in 1.2
 --

 Key: CASSANDRA-5378
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5378
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.0
Reporter: Carl Yeksigian
Assignee: Carl Yeksigian
  Labels: client
 Fix For: 1.2.4

 Attachments: 5378-1.2.txt, 5378.txt, 5378-v2.txt


 The current client only example doesn't compile. After doing some updates, 
 the fat client still won't work, mainly because the schema is not being 
 pushed to the fat client.
 I've made changes to the client to support CQL3 commands, to the 
 ServiceManager to wait until a migration has completed before starting the 
 client, and to the MigrationManager to not try to pull schemas from a fat 
 client.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5551) intersects the bounds not right

2013-05-13 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-5551:
---

Is this also a problem in 1.1?

 intersects the bounds not right
 ---

 Key: CASSANDRA-5551
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5551
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.2.0
Reporter: yangwei
Assignee: yangwei
Priority: Minor
 Fix For: 1.2.5

 Attachments: 0001-correctly-intersects-the-bounds.patch


 intersecs the bound includes the left of bound instead of right

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5551) intersects the bounds not right

2013-05-13 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-5551:
-

It is apparently. Forgot to look sorry. I'll backport there.

 intersects the bounds not right
 ---

 Key: CASSANDRA-5551
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5551
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.2.0
Reporter: yangwei
Assignee: yangwei
Priority: Minor
 Fix For: 1.2.5

 Attachments: 0001-correctly-intersects-the-bounds.patch


 intersecs the bound includes the left of bound instead of right

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Created] (CASSANDRA-5560) Improve DESC command for sets

2013-05-13 Thread Ofir P (JIRA)
Ofir P created CASSANDRA-5560:
-

 Summary: Improve DESC command for sets
 Key: CASSANDRA-5560
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5560
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 1.2.4
Reporter: Ofir P
Priority: Minor


When doing a Describe column family on a table with a set column, it 
doesn't show the type of the field in the set. 
(I am just guessing it's probably also for map and list columns)

Also a small request(I can open another ticket if you prefer), it is possible 
to make the Column family keywords optional:
DESC[ribe] [Column Family] cf_name
So it will be possible like sql to just Desc table_name. (without typing much 
redundant expected text)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


git commit: Backport #5551 to 1.1

2013-05-13 Thread slebresne
Updated Branches:
  refs/heads/cassandra-1.1 ce8bc33d4 - c5dc0292e


Backport #5551 to 1.1


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

Branch: refs/heads/cassandra-1.1
Commit: c5dc0292e0689f2e714e23495944f6a6a58b5028
Parents: ce8bc33
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon May 13 16:31:22 2013 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon May 13 16:31:22 2013 +0200

--
 CHANGES.txt  |1 +
 src/java/org/apache/cassandra/dht/Range.java |2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c5dc0292/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 5a559a8..7c89987 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -3,6 +3,7 @@
  * Use allocator information to improve memtable memory usage estimate 
(CASSANDRA-5497)
  * fsync leveled manifest to avoid corruption (CASSANDRA-5535)
+ * Fix Bound intersection computation (CASSANDRA-5551)
 
 1.1.11
  * Fix trying to load deleted row into row cache on startup (CASSANDRA-4463)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c5dc0292/src/java/org/apache/cassandra/dht/Range.java
--
diff --git a/src/java/org/apache/cassandra/dht/Range.java 
b/src/java/org/apache/cassandra/dht/Range.java
index 3f1d41b..978179e 100644
--- a/src/java/org/apache/cassandra/dht/Range.java
+++ b/src/java/org/apache/cassandra/dht/Range.java
@@ -137,7 +137,7 @@ public class RangeT extends RingPosition extends 
AbstractBoundsT implements
  */
 public boolean intersects(BoundsT that)
 {
-return intersects(new RangeT(that.left, that.right)) || 
contains(that.right);
+return intersects(new RangeT(that.left, that.right)) || 
contains(that.left);
 }
 
 public static T extends RingPosition SetRangeT rangeSet(RangeT ... 
ranges)



[1/3] git commit: Backport #5551 to 1.1

2013-05-13 Thread slebresne
Updated Branches:
  refs/heads/cassandra-1.2 2e2dd48ff - f91d320af


Backport #5551 to 1.1


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

Branch: refs/heads/cassandra-1.2
Commit: c5dc0292e0689f2e714e23495944f6a6a58b5028
Parents: ce8bc33
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon May 13 16:31:22 2013 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon May 13 16:31:22 2013 +0200

--
 CHANGES.txt  |1 +
 src/java/org/apache/cassandra/dht/Range.java |2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c5dc0292/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 5a559a8..7c89987 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -3,6 +3,7 @@
  * Use allocator information to improve memtable memory usage estimate 
(CASSANDRA-5497)
  * fsync leveled manifest to avoid corruption (CASSANDRA-5535)
+ * Fix Bound intersection computation (CASSANDRA-5551)
 
 1.1.11
  * Fix trying to load deleted row into row cache on startup (CASSANDRA-4463)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c5dc0292/src/java/org/apache/cassandra/dht/Range.java
--
diff --git a/src/java/org/apache/cassandra/dht/Range.java 
b/src/java/org/apache/cassandra/dht/Range.java
index 3f1d41b..978179e 100644
--- a/src/java/org/apache/cassandra/dht/Range.java
+++ b/src/java/org/apache/cassandra/dht/Range.java
@@ -137,7 +137,7 @@ public class RangeT extends RingPosition extends 
AbstractBoundsT implements
  */
 public boolean intersects(BoundsT that)
 {
-return intersects(new RangeT(that.left, that.right)) || 
contains(that.right);
+return intersects(new RangeT(that.left, that.right)) || 
contains(that.left);
 }
 
 public static T extends RingPosition SetRangeT rangeSet(RangeT ... 
ranges)



[3/3] git commit: Fix changelog

2013-05-13 Thread slebresne
Fix changelog


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

Branch: refs/heads/cassandra-1.2
Commit: f91d320afd70a5f201183708ed02a98e2d85ff70
Parents: f80d17d
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon May 13 16:32:19 2013 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon May 13 16:32:19 2013 +0200

--
 CHANGES.txt |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f91d320a/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 1c5ff95..69d8218 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -23,7 +23,6 @@
  * Add custom secondary index support to CQL3 (CASSANDRA-5484)
  * Fix repair hanging silently on unexpected error (CASSANDRA-5229)
  * Fix Ec2Snitch regression introduced by CASSANDRA-5171 (CASSANDRA-5432)
- * Fix Bound intersection computation (CASSANDRA-5551)
 Merged from 1.1
  * Add retry mechanism to OTC for non-droppable_verbs (CASSANDRA-5393)
  * Use allocator information to improve memtable memory usage estimate



[2/3] git commit: Merge branch 'cassandra-1.1' into cassandra-1.2

2013-05-13 Thread slebresne
Merge branch 'cassandra-1.1' into cassandra-1.2


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

Branch: refs/heads/cassandra-1.2
Commit: f80d17da970638e004824b626d4107b1de1dc3cd
Parents: 2e2dd48 c5dc029
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon May 13 16:31:46 2013 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon May 13 16:31:46 2013 +0200

--
 CHANGES.txt |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f80d17da/CHANGES.txt
--
diff --cc CHANGES.txt
index cf218d6,7c89987..1c5ff95
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,104 -1,12 +1,105 @@@
 -1.1.12
 +1.2.5
 + * fix 2i updates with indentical values and timestamps (CASSANDRA-5540)
 + * fix compaction throttling bursty-ness (CASSANDRA-4316)
 + * reduce memory consumption of IndexSummary (CASSANDRA-5506)
 + * remove per-row column name bloom filters (CASSANDRA-5492)
 + * Include fatal errors in trace events (CASSANDRA-5447)
 + * Ensure that PerRowSecondaryIndex is notified of row-level deletes
 +   (CASSANDRA-5445)
 + * Allow empty blob literals in CQL3 (CASSANDRA-5452)
 + * Fix streaming RangeTombstones at column index boundary (CASSANDRA-5418)
 + * Fix preparing statements when current keyspace is not set (CASSANDRA-5468)
 + * Fix SemanticVersion.isSupportedBy minor/patch handling (CASSANDRA-5496)
 + * Don't provide oldCfId for post-1.1 system cfs (CASSANDRA-5490)
 + * Fix primary range ignores replication strategy (CASSANDRA-5424)
 + * Fix shutdown of binary protocol server (CASSANDRA-5507)
 + * Fix repair -snapshot not working (CASSANDRA-5512)
 + * Set isRunning flag later in binary protocol server (CASSANDRA-5467)
 + * Fix use of CQL3 functions with descending clustering order (CASSANDRA-5472)
 + * Prevent repair when protocol version does not match (CASSANDRA-5523)
 + * Disallow renaming columns one at a time for thrift table in CQL3
 +   (CASSANDRA-5531)
 + * cqlsh: add CLUSTERING ORDER BY support to DESCRIBE (CASSANDRA-5528)
 + * Add custom secondary index support to CQL3 (CASSANDRA-5484)
 + * Fix repair hanging silently on unexpected error (CASSANDRA-5229)
 + * Fix Ec2Snitch regression introduced by CASSANDRA-5171 (CASSANDRA-5432)
 + * Fix Bound intersection computation (CASSANDRA-5551)
 +Merged from 1.1
   * Add retry mechanism to OTC for non-droppable_verbs (CASSANDRA-5393)
 - * Use allocator information to improve memtable memory usage estimate 
 + * Use allocator information to improve memtable memory usage estimate
 (CASSANDRA-5497)
 + * Fix trying to load deleted row into row cache on startup (CASSANDRA-4463)
   * fsync leveled manifest to avoid corruption (CASSANDRA-5535)
+  * Fix Bound intersection computation (CASSANDRA-5551)
  
 -1.1.11
 - * Fix trying to load deleted row into row cache on startup (CASSANDRA-4463)
 +
 +1.2.4
 + * Ensure that PerRowSecondaryIndex updates see the most recent values
 +   (CASSANDRA-5397)
 + * avoid duplicate index entries ind PrecompactedRow and 
 +   ParallelCompactionIterable (CASSANDRA-5395)
 + * remove the index entry on oldColumn when new column is a tombstone 
 +   (CASSANDRA-5395)
 + * Change default stream throughput from 400 to 200 mbps (CASSANDRA-5036)
 + * Gossiper logs DOWN for symmetry with UP (CASSANDRA-5187)
 + * Fix mixing prepared statements between keyspaces (CASSANDRA-5352)
 + * Fix consistency level during bootstrap - strike 3 (CASSANDRA-5354)
 + * Fix transposed arguments in AlreadyExistsException (CASSANDRA-5362)
 + * Improve asynchronous hint delivery (CASSANDRA-5179)
 + * Fix Guava dependency version (12.0 - 13.0.1) for Maven (CASSANDRA-5364)
 + * Validate that provided CQL3 collection value are  64K (CASSANDRA-5355)
 + * Make upgradeSSTable skip current version sstables by default 
(CASSANDRA-5366)
 + * Optimize min/max timestamp collection (CASSANDRA-5373)
 + * Invalid streamId in cql binary protocol when using invalid CL 
 +   (CASSANDRA-5164)
 + * Fix validation for IN where clauses with collections (CASSANDRA-5376)
 + * Copy resultSet on count query to avoid ConcurrentModificationException 
 +   (CASSANDRA-5382)
 + * Correctly typecheck in CQL3 even with ReversedType (CASSANDRA-5386)
 + * Fix streaming compressed files when using encryption (CASSANDRA-5391)
 + * cassandra-all 1.2.0 pom missing netty dependency (CASSANDRA-5392)
 + * Fix writetime/ttl functions on null values (CASSANDRA-5341)
 + * Fix NPE during cql3 select with token() (CASSANDRA-5404)
 + * IndexHelper.skipBloomFilters won't skip non-SHA filters (CASSANDRA-5385)
 + * cqlsh: 

[jira] [Commented] (CASSANDRA-5560) Improve DESC command for sets

2013-05-13 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-5560:
--

Something's wrong with your setup.

{noformat}
cqlsh:test CREATE TABLE test (id int PRIMARY KEY, alist listvarchar, aset 
setint, amap mapvarint, boolean);
cqlsh:test DESC TABLE test;

CREATE TABLE test (
  id int PRIMARY KEY,
  alist listtext,
  amap mapvarint, boolean,
  aset setint
) WITH
  bloom_filter_fp_chance=0.01 AND
  caching='KEYS_ONLY' AND
  comment='' AND
  dclocal_read_repair_chance=0.00 AND
  gc_grace_seconds=864000 AND
  read_repair_chance=0.10 AND
  replicate_on_write='true' AND
  populate_io_cache_on_flush='false' AND
  compaction={'class': 'SizeTieredCompactionStrategy'};
{noformat}

As for that small request - with tab-completion you only have to type 'DESC 
t[tab] table_name' to get 'DESC TABLE table_name' (table_name can also be 
tab-completed).

 Improve DESC command for sets
 -

 Key: CASSANDRA-5560
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5560
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 1.2.4
Reporter: Ofir P
Priority: Minor
  Labels: describe, set

 When doing a Describe column family on a table with a set column, it 
 doesn't show the type of the field in the set. 
 (I am just guessing it's probably also for map and list columns)
 Also a small request(I can open another ticket if you prefer), it is possible 
 to make the Column family keywords optional:
 DESC[ribe] [Column Family] cf_name
 So it will be possible like sql to just Desc table_name. (without typing much 
 redundant expected text)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Resolved] (CASSANDRA-5560) Improve DESC command for sets

2013-05-13 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko resolved CASSANDRA-5560.
--

Resolution: Invalid

 Improve DESC command for sets
 -

 Key: CASSANDRA-5560
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5560
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 1.2.4
Reporter: Ofir P
Priority: Minor
  Labels: describe, set

 When doing a Describe column family on a table with a set column, it 
 doesn't show the type of the field in the set. 
 (I am just guessing it's probably also for map and list columns)
 Also a small request(I can open another ticket if you prefer), it is possible 
 to make the Column family keywords optional:
 DESC[ribe] [Column Family] cf_name
 So it will be possible like sql to just Desc table_name. (without typing much 
 redundant expected text)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[1/4] git commit: Backport #5551 to 1.1

2013-05-13 Thread slebresne
Updated Branches:
  refs/heads/trunk 49a7311f5 - 3e2b4b961


Backport #5551 to 1.1


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

Branch: refs/heads/trunk
Commit: c5dc0292e0689f2e714e23495944f6a6a58b5028
Parents: ce8bc33
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon May 13 16:31:22 2013 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon May 13 16:31:22 2013 +0200

--
 CHANGES.txt  |1 +
 src/java/org/apache/cassandra/dht/Range.java |2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c5dc0292/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 5a559a8..7c89987 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -3,6 +3,7 @@
  * Use allocator information to improve memtable memory usage estimate 
(CASSANDRA-5497)
  * fsync leveled manifest to avoid corruption (CASSANDRA-5535)
+ * Fix Bound intersection computation (CASSANDRA-5551)
 
 1.1.11
  * Fix trying to load deleted row into row cache on startup (CASSANDRA-4463)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c5dc0292/src/java/org/apache/cassandra/dht/Range.java
--
diff --git a/src/java/org/apache/cassandra/dht/Range.java 
b/src/java/org/apache/cassandra/dht/Range.java
index 3f1d41b..978179e 100644
--- a/src/java/org/apache/cassandra/dht/Range.java
+++ b/src/java/org/apache/cassandra/dht/Range.java
@@ -137,7 +137,7 @@ public class RangeT extends RingPosition extends 
AbstractBoundsT implements
  */
 public boolean intersects(BoundsT that)
 {
-return intersects(new RangeT(that.left, that.right)) || 
contains(that.right);
+return intersects(new RangeT(that.left, that.right)) || 
contains(that.left);
 }
 
 public static T extends RingPosition SetRangeT rangeSet(RangeT ... 
ranges)



[2/4] git commit: Merge branch 'cassandra-1.1' into cassandra-1.2

2013-05-13 Thread slebresne
Merge branch 'cassandra-1.1' into cassandra-1.2


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

Branch: refs/heads/trunk
Commit: f80d17da970638e004824b626d4107b1de1dc3cd
Parents: 2e2dd48 c5dc029
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon May 13 16:31:46 2013 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon May 13 16:31:46 2013 +0200

--
 CHANGES.txt |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f80d17da/CHANGES.txt
--
diff --cc CHANGES.txt
index cf218d6,7c89987..1c5ff95
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,104 -1,12 +1,105 @@@
 -1.1.12
 +1.2.5
 + * fix 2i updates with indentical values and timestamps (CASSANDRA-5540)
 + * fix compaction throttling bursty-ness (CASSANDRA-4316)
 + * reduce memory consumption of IndexSummary (CASSANDRA-5506)
 + * remove per-row column name bloom filters (CASSANDRA-5492)
 + * Include fatal errors in trace events (CASSANDRA-5447)
 + * Ensure that PerRowSecondaryIndex is notified of row-level deletes
 +   (CASSANDRA-5445)
 + * Allow empty blob literals in CQL3 (CASSANDRA-5452)
 + * Fix streaming RangeTombstones at column index boundary (CASSANDRA-5418)
 + * Fix preparing statements when current keyspace is not set (CASSANDRA-5468)
 + * Fix SemanticVersion.isSupportedBy minor/patch handling (CASSANDRA-5496)
 + * Don't provide oldCfId for post-1.1 system cfs (CASSANDRA-5490)
 + * Fix primary range ignores replication strategy (CASSANDRA-5424)
 + * Fix shutdown of binary protocol server (CASSANDRA-5507)
 + * Fix repair -snapshot not working (CASSANDRA-5512)
 + * Set isRunning flag later in binary protocol server (CASSANDRA-5467)
 + * Fix use of CQL3 functions with descending clustering order (CASSANDRA-5472)
 + * Prevent repair when protocol version does not match (CASSANDRA-5523)
 + * Disallow renaming columns one at a time for thrift table in CQL3
 +   (CASSANDRA-5531)
 + * cqlsh: add CLUSTERING ORDER BY support to DESCRIBE (CASSANDRA-5528)
 + * Add custom secondary index support to CQL3 (CASSANDRA-5484)
 + * Fix repair hanging silently on unexpected error (CASSANDRA-5229)
 + * Fix Ec2Snitch regression introduced by CASSANDRA-5171 (CASSANDRA-5432)
 + * Fix Bound intersection computation (CASSANDRA-5551)
 +Merged from 1.1
   * Add retry mechanism to OTC for non-droppable_verbs (CASSANDRA-5393)
 - * Use allocator information to improve memtable memory usage estimate 
 + * Use allocator information to improve memtable memory usage estimate
 (CASSANDRA-5497)
 + * Fix trying to load deleted row into row cache on startup (CASSANDRA-4463)
   * fsync leveled manifest to avoid corruption (CASSANDRA-5535)
+  * Fix Bound intersection computation (CASSANDRA-5551)
  
 -1.1.11
 - * Fix trying to load deleted row into row cache on startup (CASSANDRA-4463)
 +
 +1.2.4
 + * Ensure that PerRowSecondaryIndex updates see the most recent values
 +   (CASSANDRA-5397)
 + * avoid duplicate index entries ind PrecompactedRow and 
 +   ParallelCompactionIterable (CASSANDRA-5395)
 + * remove the index entry on oldColumn when new column is a tombstone 
 +   (CASSANDRA-5395)
 + * Change default stream throughput from 400 to 200 mbps (CASSANDRA-5036)
 + * Gossiper logs DOWN for symmetry with UP (CASSANDRA-5187)
 + * Fix mixing prepared statements between keyspaces (CASSANDRA-5352)
 + * Fix consistency level during bootstrap - strike 3 (CASSANDRA-5354)
 + * Fix transposed arguments in AlreadyExistsException (CASSANDRA-5362)
 + * Improve asynchronous hint delivery (CASSANDRA-5179)
 + * Fix Guava dependency version (12.0 - 13.0.1) for Maven (CASSANDRA-5364)
 + * Validate that provided CQL3 collection value are  64K (CASSANDRA-5355)
 + * Make upgradeSSTable skip current version sstables by default 
(CASSANDRA-5366)
 + * Optimize min/max timestamp collection (CASSANDRA-5373)
 + * Invalid streamId in cql binary protocol when using invalid CL 
 +   (CASSANDRA-5164)
 + * Fix validation for IN where clauses with collections (CASSANDRA-5376)
 + * Copy resultSet on count query to avoid ConcurrentModificationException 
 +   (CASSANDRA-5382)
 + * Correctly typecheck in CQL3 even with ReversedType (CASSANDRA-5386)
 + * Fix streaming compressed files when using encryption (CASSANDRA-5391)
 + * cassandra-all 1.2.0 pom missing netty dependency (CASSANDRA-5392)
 + * Fix writetime/ttl functions on null values (CASSANDRA-5341)
 + * Fix NPE during cql3 select with token() (CASSANDRA-5404)
 + * IndexHelper.skipBloomFilters won't skip non-SHA filters (CASSANDRA-5385)
 + * cqlsh: Print maps 

[4/4] git commit: Merge branch 'cassandra-1.2' into trunk

2013-05-13 Thread slebresne
Merge branch 'cassandra-1.2' into trunk


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

Branch: refs/heads/trunk
Commit: 3e2b4b96120a9b301cdfb8ac1eb8b86487adfa80
Parents: 49a7311 f91d320
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon May 13 16:35:12 2013 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon May 13 16:35:12 2013 +0200

--
 CHANGES.txt |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
--


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



[3/4] git commit: Fix changelog

2013-05-13 Thread slebresne
Fix changelog


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

Branch: refs/heads/trunk
Commit: f91d320afd70a5f201183708ed02a98e2d85ff70
Parents: f80d17d
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon May 13 16:32:19 2013 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon May 13 16:32:19 2013 +0200

--
 CHANGES.txt |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f91d320a/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 1c5ff95..69d8218 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -23,7 +23,6 @@
  * Add custom secondary index support to CQL3 (CASSANDRA-5484)
  * Fix repair hanging silently on unexpected error (CASSANDRA-5229)
  * Fix Ec2Snitch regression introduced by CASSANDRA-5171 (CASSANDRA-5432)
- * Fix Bound intersection computation (CASSANDRA-5551)
 Merged from 1.1
  * Add retry mechanism to OTC for non-droppable_verbs (CASSANDRA-5393)
  * Use allocator information to improve memtable memory usage estimate



[jira] [Updated] (CASSANDRA-5551) intersects the bounds not right

2013-05-13 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-5551:


Fix Version/s: 1.1.12

 intersects the bounds not right
 ---

 Key: CASSANDRA-5551
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5551
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.2.0
Reporter: yangwei
Assignee: yangwei
Priority: Minor
 Fix For: 1.1.12, 1.2.5

 Attachments: 0001-correctly-intersects-the-bounds.patch


 intersecs the bound includes the left of bound instead of right

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5560) Improve DESC command for sets

2013-05-13 Thread Ofir P (JIRA)

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

Ofir P commented on CASSANDRA-5560:
---

Right, thanks.

 Improve DESC command for sets
 -

 Key: CASSANDRA-5560
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5560
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 1.2.4
Reporter: Ofir P
Priority: Minor
  Labels: describe, set

 When doing a Describe column family on a table with a set column, it 
 doesn't show the type of the field in the set. 
 (I am just guessing it's probably also for map and list columns)
 Also a small request(I can open another ticket if you prefer), it is possible 
 to make the Column family keywords optional:
 DESC[ribe] [Column Family] cf_name
 So it will be possible like sql to just Desc table_name. (without typing much 
 redundant expected text)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


git commit: replace Thread.sleep with Uninterruptibles.sleepUninterruptibly patch by Mikhail Mazursky; reviewed by jbellis for CASSANDRA-5557

2013-05-13 Thread jbellis
Updated Branches:
  refs/heads/trunk 3e2b4b961 - 2effc40ed


replace Thread.sleep with Uninterruptibles.sleepUninterruptibly
patch by Mikhail Mazursky; reviewed by jbellis for CASSANDRA-5557


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

Branch: refs/heads/trunk
Commit: 2effc40edb798fc3e39b0511b5be39e6d0738f59
Parents: 3e2b4b9
Author: Jonathan Ellis jbel...@apache.org
Authored: Mon May 13 11:26:23 2013 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Mon May 13 11:26:23 2013 -0500

--
 examples/client_only/src/ClientOnlyExample.java|   12 +-
 examples/hadoop_word_count/src/WordCountSetup.java |   12 +-
 .../org/apache/cassandra/db/ColumnFamilyStore.java |   16 +--
 src/java/org/apache/cassandra/db/Directories.java  |   12 +-
 .../apache/cassandra/db/HintedHandOffManager.java  |   20 +--
 .../PeriodicCommitLogExecutorService.java  |4 +-
 src/java/org/apache/cassandra/gms/Gossiper.java|   34 +---
 .../cassandra/net/OutboundTcpConnection.java   |   12 +-
 .../org/apache/cassandra/service/StorageProxy.java |6 +-
 .../apache/cassandra/service/StorageService.java   |  136 +++
 .../apache/cassandra/streaming/FileStreamTask.java |   11 +-
 .../cassandra/thrift/CustomTThreadPoolServer.java  |   11 +-
 .../org/apache/cassandra/tools/BulkLoader.java |5 +-
 .../org/apache/cassandra/utils/ExpiringMap.java|   11 +-
 .../org/apache/cassandra/utils/FBUtilities.java|   12 --
 src/java/org/apache/cassandra/utils/Throttle.java  |   13 +-
 .../apache/cassandra/db/RemoveSubColumnTest.java   |7 +-
 test/unit/org/apache/cassandra/db/RowTest.java |   17 +--
 .../cassandra/db/context/CounterContextTest.java   |   12 +-
 .../org/apache/cassandra/service/RelocateTest.java |   12 +-
 .../org/apache/cassandra/stress/StressAction.java  |   11 +-
 21 files changed, 107 insertions(+), 279 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2effc40e/examples/client_only/src/ClientOnlyExample.java
--
diff --git a/examples/client_only/src/ClientOnlyExample.java 
b/examples/client_only/src/ClientOnlyExample.java
index d73043e..e823ead 100644
--- a/examples/client_only/src/ClientOnlyExample.java
+++ b/examples/client_only/src/ClientOnlyExample.java
@@ -18,6 +18,7 @@
 
 import java.nio.ByteBuffer;
 import java.util.*;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.cassandra.cql3.QueryProcessor;
 import org.apache.cassandra.db.ConsistencyLevel;
@@ -30,6 +31,8 @@ import org.apache.cassandra.transport.messages.ResultMessage;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.google.common.util.concurrent.Uninterruptibles;
+
 public class ClientOnlyExample
 {
 private static final Logger logger = 
LoggerFactory.getLogger(ClientOnlyExample.class);
@@ -121,14 +124,7 @@ public class ClientOnlyExample
 setupKeyspace();
 testWriting();
 logger.info(Writing is done. Sleeping, then will try to read.);
-try
-{
-Thread.currentThread().sleep(1000);
-}
-catch (InterruptedException ex)
-{
-throw new RuntimeException(ex);
-}
+Uninterruptibles.sleepUninterruptibly(1, TimeUnit.SECONDS);
 
 testReading();
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2effc40e/examples/hadoop_word_count/src/WordCountSetup.java
--
diff --git a/examples/hadoop_word_count/src/WordCountSetup.java 
b/examples/hadoop_word_count/src/WordCountSetup.java
index 6837bec..e222327 100644
--- a/examples/hadoop_word_count/src/WordCountSetup.java
+++ b/examples/hadoop_word_count/src/WordCountSetup.java
@@ -18,6 +18,7 @@
 
 import java.nio.ByteBuffer;
 import java.util.*;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.cassandra.thrift.*;
 import org.apache.cassandra.utils.ByteBufferUtil;
@@ -32,6 +33,8 @@ import org.apache.thrift.transport.TTransportException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.google.common.util.concurrent.Uninterruptibles;
+
 public class WordCountSetup
 {
 private static final Logger logger = 
LoggerFactory.getLogger(WordCountSetup.class);
@@ -174,14 +177,7 @@ public class WordCountSetup
 ksDef.putToStrategy_options(replication_factor, 1);
 client.system_add_keyspace(ksDef);
 int magnitude = client.describe_ring(WordCount.KEYSPACE).size();
-try
-{
-Thread.sleep(1000 * magnitude);
-}
-catch 

[jira] [Created] (CASSANDRA-5561) Compaction strategy that minimizes re-compaction of old/frozen data

2013-05-13 Thread Tupshin Harper (JIRA)
Tupshin Harper created CASSANDRA-5561:
-

 Summary: Compaction strategy that minimizes re-compaction of 
old/frozen data
 Key: CASSANDRA-5561
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5561
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 1.2.3
Reporter: Tupshin Harper
 Fix For: 2.0


Neither LCS nor STCS are good for data that becomes immutable over time. The 
most obvious case is for time-series data where the application can guarantee 
that out-of-order delivery (to Cassandra) of events can't take place more than 
N minutes/seconds/hours/days have elapsed after the real (wall time).

There are various approaches that could involve paying attention to the row 
keys (if they include a time component) and/or the column name (if they are 
TimeUUID or Integer based and are inherently time-ordered), but it might be 
sufficient to just look at the timestamp of the columns themselves.

A possible approach:
1) Define an optional max-out-of-order window on a per-CF basis.
2) Use normal (LCS or STCS) compaction strategy for any SSTables that include 
any columns younger than max-out-of-order-delivery).
3) Use alternate compaction strategy (will call it TWCS time window compaction 
strategy for now) for any SSTables that only contain columns older than 
max-out-of-order-delivery.
4) TWCS will only compact sstables containing data older than 
max-out-of-order-delivery.
5) TWCS will only perform compaction to reduce row fragmentation (if there is 
any by the time it gets to TWCS or to reduce the number of small sstables.
6) To minimize re-compaction in TWCS, it should aggresively try to compact as 
many small sstables as possible into one large sstable that would never have to 
get recompacted. 

In the case of large datasets (e.g. 5TB per node) with LCS, there would be on 
the order of seven levels, and hence seven separate writes of the same data 
over time. With this approach, it should be possible to get about 3 compactions 
per column (2 in original compaction and one more once hitting TWCS) in most 
cases, cutting the write workload by a factor of two or more for high volume 
time-series applications.

Note that the only workaround I can currently suggest to minimize compaction 
for these workloads is to programatically shard your data across time-window 
ranges (e.g. new CF per week), but that pushes unnecessary writing and querying 
logic out to the user and is not as convenient nor flexible.

Also note that I am not convinced that the approach I've suggested above is the 
best/most general way to solve the problem, but it does appear to be a 
relatively easy one to implement.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Assigned] (CASSANDRA-5556) Enabling/Disabling incremental backup via nodetool

2013-05-13 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis reassigned CASSANDRA-5556:
-

Assignee: Pavel Margolin

SGTM; that's true for any of the nodetool configure-at-runtime commands.

 Enabling/Disabling incremental backup via nodetool
 --

 Key: CASSANDRA-5556
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5556
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Reporter: Pavel Margolin
Assignee: Pavel Margolin
Priority: Trivial
 Fix For: 1.2.5

 Attachments: CASSANDRA-5556.patch

   Original Estimate: 1h
  Remaining Estimate: 1h

 Change incremental backup setting via nodetool. In some scenarios, we'd like 
 to control whether the incremental backup is switched on or off without 
 redeploying

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Created] (CASSANDRA-5562) sstablescrub should respect MAX_HEAP_SIZE

2013-05-13 Thread Mina Naguib (JIRA)
Mina Naguib created CASSANDRA-5562:
--

 Summary: sstablescrub should respect MAX_HEAP_SIZE
 Key: CASSANDRA-5562
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5562
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 1.1.11
Reporter: Mina Naguib
Priority: Minor


sstablescrub has Xmx hardcoded to 256MB.  This is not enough to load the bloom 
filters in my installation and causes an OOM.

Since it's meant to be run offline, the memory usually allocated to the daemon 
can be safely given to the tool.

Attached is a patch that makes it respect $MAX_HEAP_SIZE (with fallback to 
256MB if not defined)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-5562) sstablescrub should respect MAX_HEAP_SIZE

2013-05-13 Thread Mina Naguib (JIRA)

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

Mina Naguib updated CASSANDRA-5562:
---

Attachment: CASSANDRA-5562-sstablescrub_max_heap_size.patch

 sstablescrub should respect MAX_HEAP_SIZE
 -

 Key: CASSANDRA-5562
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5562
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 1.1.11
Reporter: Mina Naguib
Priority: Minor
  Labels: MAX_HEAP_SIZE, heap, oom, sstablescrub, xmx
 Attachments: CASSANDRA-5562-sstablescrub_max_heap_size.patch


 sstablescrub has Xmx hardcoded to 256MB.  This is not enough to load the 
 bloom filters in my installation and causes an OOM.
 Since it's meant to be run offline, the memory usually allocated to the 
 daemon can be safely given to the tool.
 Attached is a patch that makes it respect $MAX_HEAP_SIZE (with fallback to 
 256MB if not defined)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5322) Make dtest logging more granular

2013-05-13 Thread Ryan McGuire (JIRA)

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

Ryan McGuire commented on CASSANDRA-5322:
-

Pasting what I wrote from an offline discussion:

I think there is a bit of ambiguity in the original request: There's logging in 
the python code for dtests, and there's logging in cassandra itself. The 
conf/log4-server.properties that Brandon mentioned is in C* (not dtests) for 
controlling how much logging a single C* class generates. The only problem with 
it, is that since it's a static file, the classes that it sets to DEBUG will be 
spewing out lots of logs over the course of every test that dtests defines. If 
I understand Brandon's request, he wants a way so that we turn on debugging for 
a single C* class for the duration of a single dtest only.

To do that we need to make dtests (or possibly ccm) check for an environment 
variable to turn on a different debugging strategy for a given dtest. Here's my 
idea:

We have the default conf/log4-server.properties file, we make a copy of that 
file someplace for each dtest configuration we need. Let's assume that the 
upgrade_through_versions_test.py exercises the 
org.apache.cassandra.io.sstable.SSTableMetadata class and we want to debug that 
(I don't know that it actually does, this is just an example.) We don't 
necessarily want that class to output debugging for all dtests, just 
upgrade_through_versions_test.py. So we make a copy of 
conf/log4-server.properties and add debugging for SSTableMetadata. Then we 
create an environment variable like this: 
DTEST_LOG4_PROPERTIES=upgrade_through_versions_test:/path/to/our/modified_log4-server.properties|some_other_test:/path/to/another/properties
 . Dtests (or ccm) takes that environment variable and when it finds it 
specifies an alternate config for a dtest, it uses the alternate 
log4-server.properties file when starting up C*.

Since we're invoking ccm's cluster.populate() directly in the dtests I see two 
options:

* Add this environment variable check and config file swap inside ccm
* Refactor all of the cluster.populate() calls to a dtest utility function that 
creates the cluster in the way we want (adds the right log4j-server.properties 
file to each node.)

The former is easier, but it adds complexity to ccm. The second way means we 
have to refactor pretty much all of our tests, but it gives dtests more control 
over the environment, which I think is a win.

 Make dtest logging more granular 
 -

 Key: CASSANDRA-5322
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5322
 Project: Cassandra
  Issue Type: Test
Reporter: Ryan McGuire
Assignee: Alex Zarutin

 From Brandon: We need a way (might need to go in ccm, I haven't looked) to 
 just set one class to DEBUG or TRACE, like we'd do in 
 conf/log4-server.properties but with an env var preferably, so I can control 
 it via buildbot, since it's better at reproducing some issues than I am 
 sometimes, but I don't want to run the full hammer debug all the time. Also, 
 a way to set Tester.allow_log_errors to false via an env var, since sometimes 
 there's an error there that takes a while to fix but is cosmetic, and in the 
 meantime I want to catch new failures so we don't fall behind.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-5562) sstablescrub should respect MAX_HEAP_SIZE

2013-05-13 Thread Mina Naguib (JIRA)

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

Mina Naguib updated CASSANDRA-5562:
---

Description: 
sstablescrub has Xmx hardcoded to 256MB.  This is not enough in my installation 
and causes an OOM.

Since it's meant to be run offline, the memory usually allocated to the daemon 
can be safely given to the tool.

Attached is a patch that makes it respect $MAX_HEAP_SIZE (with fallback to 
256MB if not defined)

  was:
sstablescrub has Xmx hardcoded to 256MB.  This is not enough to load the bloom 
filters in my installation and causes an OOM.

Since it's meant to be run offline, the memory usually allocated to the daemon 
can be safely given to the tool.

Attached is a patch that makes it respect $MAX_HEAP_SIZE (with fallback to 
256MB if not defined)


 sstablescrub should respect MAX_HEAP_SIZE
 -

 Key: CASSANDRA-5562
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5562
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 1.1.11
Reporter: Mina Naguib
Priority: Minor
  Labels: MAX_HEAP_SIZE, heap, oom, sstablescrub, xmx
 Attachments: CASSANDRA-5562-sstablescrub_max_heap_size.patch


 sstablescrub has Xmx hardcoded to 256MB.  This is not enough in my 
 installation and causes an OOM.
 Since it's meant to be run offline, the memory usually allocated to the 
 daemon can be safely given to the tool.
 Attached is a patch that makes it respect $MAX_HEAP_SIZE (with fallback to 
 256MB if not defined)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


git commit: add nodetool enablebackup/disablebackup patch by pmargolin reviewed by dbrosius for CASSANDRA-5556

2013-05-13 Thread dbrosius
Updated Branches:
  refs/heads/cassandra-1.2 f91d320af - 56927973f


add nodetool enablebackup/disablebackup
patch by pmargolin reviewed by dbrosius for CASSANDRA-5556


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

Branch: refs/heads/cassandra-1.2
Commit: 56927973fea9112a5d3aa704e82af45af457772c
Parents: f91d320
Author: Dave Brosius dbros...@apache.org
Authored: Mon May 13 14:12:19 2013 -0400
Committer: Dave Brosius dbros...@apache.org
Committed: Mon May 13 14:12:19 2013 -0400

--
 CHANGES.txt|3 ++-
 src/java/org/apache/cassandra/tools/NodeCmd.java   |7 ++-
 src/java/org/apache/cassandra/tools/NodeProbe.java |4 
 .../org/apache/cassandra/tools/NodeToolHelp.yaml   |6 ++
 4 files changed, 18 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/56927973/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 69d8218..844fe3d 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,5 @@
 1.2.5
- * fix 2i updates with indentical values and timestamps (CASSANDRA-5540)
+ * fix 2i updates with identical values and timestamps (CASSANDRA-5540)
  * fix compaction throttling bursty-ness (CASSANDRA-4316)
  * reduce memory consumption of IndexSummary (CASSANDRA-5506)
  * remove per-row column name bloom filters (CASSANDRA-5492)
@@ -23,6 +23,7 @@
  * Add custom secondary index support to CQL3 (CASSANDRA-5484)
  * Fix repair hanging silently on unexpected error (CASSANDRA-5229)
  * Fix Ec2Snitch regression introduced by CASSANDRA-5171 (CASSANDRA-5432)
+ * Add nodetool enablebackup/disablebackup (CASSANDRA-5556)
 Merged from 1.1
  * Add retry mechanism to OTC for non-droppable_verbs (CASSANDRA-5393)
  * Use allocator information to improve memtable memory usage estimate

http://git-wip-us.apache.org/repos/asf/cassandra/blob/56927973/src/java/org/apache/cassandra/tools/NodeCmd.java
--
diff --git a/src/java/org/apache/cassandra/tools/NodeCmd.java 
b/src/java/org/apache/cassandra/tools/NodeCmd.java
index ed82e32..b2732a5 100644
--- a/src/java/org/apache/cassandra/tools/NodeCmd.java
+++ b/src/java/org/apache/cassandra/tools/NodeCmd.java
@@ -155,7 +155,9 @@ public class NodeCmd
 RANGEKEYSAMPLE,
 REBUILD_INDEX,
 RESETLOCALSCHEMA,
-PREDICTCONSISTENCY
+PREDICTCONSISTENCY,
+ENABLEBACKUP,
+DISABLEBACKUP
 }
 
 
@@ -1069,6 +1071,9 @@ public class NodeCmd
 case ENABLETHRIFT: probe.startThriftServer(); break;
 case STATUSTHRIFT: 
nodeCmd.printIsThriftServerRunning(System.out); break;
 case RESETLOCALSCHEMA: probe.resetLocalSchema(); break;
+case ENABLEBACKUP: 
probe.setIncrementalBackupsEnabled(true); break;
+case DISABLEBACKUP   : 
probe.setIncrementalBackupsEnabled(false); break;
+
 
 case STATUS :
 if (arguments.length  0) 
nodeCmd.printClusterStatus(System.out, arguments[0]);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/56927973/src/java/org/apache/cassandra/tools/NodeProbe.java
--
diff --git a/src/java/org/apache/cassandra/tools/NodeProbe.java 
b/src/java/org/apache/cassandra/tools/NodeProbe.java
index e6eca7b..b2b9cf8 100644
--- a/src/java/org/apache/cassandra/tools/NodeProbe.java
+++ b/src/java/org/apache/cassandra/tools/NodeProbe.java
@@ -520,6 +520,10 @@ public class NodeProbe
 cfsProxy.setCompactionThresholds(minimumCompactionThreshold, 
maximumCompactionThreshold);
 }
 
+public void setIncrementalBackupsEnabled(boolean enabled){
+ssProxy.setIncrementalBackupsEnabled(enabled);
+}
+
 public void setCacheCapacities(int keyCacheCapacity, int rowCacheCapacity)
 {
 try

http://git-wip-us.apache.org/repos/asf/cassandra/blob/56927973/src/resources/org/apache/cassandra/tools/NodeToolHelp.yaml
--
diff --git a/src/resources/org/apache/cassandra/tools/NodeToolHelp.yaml 
b/src/resources/org/apache/cassandra/tools/NodeToolHelp.yaml
index d3e8436..f918804 100644
--- a/src/resources/org/apache/cassandra/tools/NodeToolHelp.yaml
+++ b/src/resources/org/apache/cassandra/tools/NodeToolHelp.yaml
@@ -82,6 +82,12 @@ commands:
   - name: enablethrift
 help: |
   Reenable thrift server
+  - name: enablebackup
+help: |
+  Enable incremental backup
+ 

[1/2] git commit: add nodetool enablebackup/disablebackup patch by pmargolin reviewed by dbrosius for CASSANDRA-5556

2013-05-13 Thread dbrosius
Updated Branches:
  refs/heads/trunk 2effc40ed - 3683d621b


add nodetool enablebackup/disablebackup
patch by pmargolin reviewed by dbrosius for CASSANDRA-5556


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

Branch: refs/heads/trunk
Commit: 56927973fea9112a5d3aa704e82af45af457772c
Parents: f91d320
Author: Dave Brosius dbros...@apache.org
Authored: Mon May 13 14:12:19 2013 -0400
Committer: Dave Brosius dbros...@apache.org
Committed: Mon May 13 14:12:19 2013 -0400

--
 CHANGES.txt|3 ++-
 src/java/org/apache/cassandra/tools/NodeCmd.java   |7 ++-
 src/java/org/apache/cassandra/tools/NodeProbe.java |4 
 .../org/apache/cassandra/tools/NodeToolHelp.yaml   |6 ++
 4 files changed, 18 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/56927973/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 69d8218..844fe3d 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,5 @@
 1.2.5
- * fix 2i updates with indentical values and timestamps (CASSANDRA-5540)
+ * fix 2i updates with identical values and timestamps (CASSANDRA-5540)
  * fix compaction throttling bursty-ness (CASSANDRA-4316)
  * reduce memory consumption of IndexSummary (CASSANDRA-5506)
  * remove per-row column name bloom filters (CASSANDRA-5492)
@@ -23,6 +23,7 @@
  * Add custom secondary index support to CQL3 (CASSANDRA-5484)
  * Fix repair hanging silently on unexpected error (CASSANDRA-5229)
  * Fix Ec2Snitch regression introduced by CASSANDRA-5171 (CASSANDRA-5432)
+ * Add nodetool enablebackup/disablebackup (CASSANDRA-5556)
 Merged from 1.1
  * Add retry mechanism to OTC for non-droppable_verbs (CASSANDRA-5393)
  * Use allocator information to improve memtable memory usage estimate

http://git-wip-us.apache.org/repos/asf/cassandra/blob/56927973/src/java/org/apache/cassandra/tools/NodeCmd.java
--
diff --git a/src/java/org/apache/cassandra/tools/NodeCmd.java 
b/src/java/org/apache/cassandra/tools/NodeCmd.java
index ed82e32..b2732a5 100644
--- a/src/java/org/apache/cassandra/tools/NodeCmd.java
+++ b/src/java/org/apache/cassandra/tools/NodeCmd.java
@@ -155,7 +155,9 @@ public class NodeCmd
 RANGEKEYSAMPLE,
 REBUILD_INDEX,
 RESETLOCALSCHEMA,
-PREDICTCONSISTENCY
+PREDICTCONSISTENCY,
+ENABLEBACKUP,
+DISABLEBACKUP
 }
 
 
@@ -1069,6 +1071,9 @@ public class NodeCmd
 case ENABLETHRIFT: probe.startThriftServer(); break;
 case STATUSTHRIFT: 
nodeCmd.printIsThriftServerRunning(System.out); break;
 case RESETLOCALSCHEMA: probe.resetLocalSchema(); break;
+case ENABLEBACKUP: 
probe.setIncrementalBackupsEnabled(true); break;
+case DISABLEBACKUP   : 
probe.setIncrementalBackupsEnabled(false); break;
+
 
 case STATUS :
 if (arguments.length  0) 
nodeCmd.printClusterStatus(System.out, arguments[0]);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/56927973/src/java/org/apache/cassandra/tools/NodeProbe.java
--
diff --git a/src/java/org/apache/cassandra/tools/NodeProbe.java 
b/src/java/org/apache/cassandra/tools/NodeProbe.java
index e6eca7b..b2b9cf8 100644
--- a/src/java/org/apache/cassandra/tools/NodeProbe.java
+++ b/src/java/org/apache/cassandra/tools/NodeProbe.java
@@ -520,6 +520,10 @@ public class NodeProbe
 cfsProxy.setCompactionThresholds(minimumCompactionThreshold, 
maximumCompactionThreshold);
 }
 
+public void setIncrementalBackupsEnabled(boolean enabled){
+ssProxy.setIncrementalBackupsEnabled(enabled);
+}
+
 public void setCacheCapacities(int keyCacheCapacity, int rowCacheCapacity)
 {
 try

http://git-wip-us.apache.org/repos/asf/cassandra/blob/56927973/src/resources/org/apache/cassandra/tools/NodeToolHelp.yaml
--
diff --git a/src/resources/org/apache/cassandra/tools/NodeToolHelp.yaml 
b/src/resources/org/apache/cassandra/tools/NodeToolHelp.yaml
index d3e8436..f918804 100644
--- a/src/resources/org/apache/cassandra/tools/NodeToolHelp.yaml
+++ b/src/resources/org/apache/cassandra/tools/NodeToolHelp.yaml
@@ -82,6 +82,12 @@ commands:
   - name: enablethrift
 help: |
   Reenable thrift server
+  - name: enablebackup
+help: |
+  Enable incremental backup
+  - name: 

[2/2] git commit: Merge branch 'cassandra-1.2' into trunk

2013-05-13 Thread dbrosius
Merge branch 'cassandra-1.2' into trunk


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

Branch: refs/heads/trunk
Commit: 3683d621b11efee78f37e31ea7145488b46488e6
Parents: 2effc40 5692797
Author: Dave Brosius dbros...@apache.org
Authored: Mon May 13 14:19:49 2013 -0400
Committer: Dave Brosius dbros...@apache.org
Committed: Mon May 13 14:19:49 2013 -0400

--
 CHANGES.txt|3 ++-
 src/java/org/apache/cassandra/tools/NodeCmd.java   |5 +
 src/java/org/apache/cassandra/tools/NodeProbe.java |5 +
 .../org/apache/cassandra/tools/NodeToolHelp.yaml   |6 ++
 4 files changed, 18 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/3683d621/CHANGES.txt
--
diff --cc CHANGES.txt
index 6efd6bf,844fe3d..1aca920
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,52 -1,5 +1,52 @@@
 +2.0
 + * JEMalloc support for off-heap allocation (CASSANDRA-3997)
 + * Single-pass compaction (CASSANDRA-4180)
 + * Removed token range bisection (CASSANDRA-5518)
 + * Removed compatibility with pre-1.2.5 sstables and network messages
 +   (CASSANDRA-5511)
 + * removed PBSPredictor (CASSANDRA-5455)
 + * CAS support (CASSANDRA-5062, 5441, 5443)
 + * Leveled compaction performs size-tiered compactions in L0 
 +   (CASSANDRA-5371, 5439)
 + * Add yaml network topology snitch for mixed ec2/other envs (CASSANDRA-5339)
 + * Log when a node is down longer than the hint window (CASSANDRA-4554)
 + * Optimize tombstone creation for ExpiringColumns (CASSANDRA-4917)
 + * Improve LeveledScanner work estimation (CASSANDRA-5250, 5407)
 + * Replace compaction lock with runWithCompactionsDisabled (CASSANDRA-3430)
 + * Change Message IDs to ints (CASSANDRA-5307)
 + * Move sstable level information into the Stats component, removing the
 +   need for a separate Manifest file (CASSANDRA-4872)
 + * avoid serializing to byte[] on commitlog append (CASSANDRA-5199)
 + * make index_interval configurable per columnfamily (CASSANDRA-3961)
 + * add default_time_to_live (CASSANDRA-3974)
 + * add memtable_flush_period_in_ms (CASSANDRA-4237)
 + * replace supercolumns internally by composites (CASSANDRA-3237, 5123)
 + * upgrade thrift to 0.9.0 (CASSANDRA-3719)
 + * drop unnecessary keyspace parameter from user-defined compaction API 
 +   (CASSANDRA-5139)
 + * more robust solution to incomplete compactions + counters (CASSANDRA-5151)
 + * Change order of directory searching for c*.in.sh (CASSANDRA-3983)
 + * Add tool to reset SSTable compaction level for LCS (CASSANDRA-5271)
 + * Allow custom configuration loader (CASSANDRA-5045)
 + * Remove memory emergency pressure valve logic (CASSANDRA-3534)
 + * Reduce request latency with eager retry (CASSANDRA-4705)
 + * cqlsh: Remove ASSUME command (CASSANDRA-5331)
 + * Rebuild BF when loading sstables if bloom_filter_fp_chance
 +   has changed since compaction (CASSANDRA-5015)
 + * remove row-level bloom filters (CASSANDRA-4885)
 + * Change Kernel Page Cache skipping into row preheating (disabled by default)
 +   (CASSANDRA-4937)
 + * Improve repair by deciding on a gcBefore before sending
 +   out TreeRequests (CASSANDRA-4932)
 + * Add an official way to disable compactions (CASSANDRA-5074)
 + * Reenable ALTER TABLE DROP with new semantics (CASSANDRA-3919)
 + * Add binary protocol versioning (CASSANDRA-5436)
 + * Swap THshaServer for TThreadedSelectorServer (CASSANDRA-5530)
 + * Add alias support to SELECT statement (CASSANDRA-5075)
 +
 +
  1.2.5
-  * fix 2i updates with indentical values and timestamps (CASSANDRA-5540)
+  * fix 2i updates with identical values and timestamps (CASSANDRA-5540)
   * fix compaction throttling bursty-ness (CASSANDRA-4316)
   * reduce memory consumption of IndexSummary (CASSANDRA-5506)
   * remove per-row column name bloom filters (CASSANDRA-5492)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3683d621/src/java/org/apache/cassandra/tools/NodeCmd.java
--
diff --cc src/java/org/apache/cassandra/tools/NodeCmd.java
index 63a3357,b2732a5..4008ffa
--- a/src/java/org/apache/cassandra/tools/NodeCmd.java
+++ b/src/java/org/apache/cassandra/tools/NodeCmd.java
@@@ -155,6 -155,9 +155,8 @@@ public class NodeCm
  RANGEKEYSAMPLE,
  REBUILD_INDEX,
  RESETLOCALSCHEMA,
 -PREDICTCONSISTENCY,
+ ENABLEBACKUP,
+ DISABLEBACKUP
  }
  
  

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3683d621/src/java/org/apache/cassandra/tools/NodeProbe.java

[jira] [Updated] (CASSANDRA-5554) Growing pending compactions

2013-05-13 Thread Brandon Williams (JIRA)

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

Brandon Williams updated CASSANDRA-5554:


Reviewer: yukim

 Growing pending compactions
 ---

 Key: CASSANDRA-5554
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5554
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.2.4
Reporter: Oleg Anastasyev
 Attachments: patch.diff, pending_compactions_fixed.png


 I noticed on one of our new cassandra production server, that pending 
 compactions number is steadily growing. The cluster is under low write load, 
 so compactions are not keeping up was not the case.
 A quick investigation shown, that compactions are stopping far before all 
 pending tasks are completed. I also found, that if concurrent_compactors=1, 
 background compactions are not happening at all.
 The bug is in BackgroundCompactionTask rescheduling logic. The executor pool 
 room control code in CompactionManager.submitBackground() does not 
 reschedule next background cycle, if executor.getActiveCount reach maximun 
 pool size, so it is lost forever.
 So I patched it to always schedule single background cycle, regardless of the 
 free room in executor pool.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


git commit: don't create empty RowMutations in CommitLogReplayer patch by jbellis reviewed by dbrosius for (CASSANDRA-5541)

2013-05-13 Thread dbrosius
Updated Branches:
  refs/heads/trunk 3683d621b - 31d991a25


don't create empty RowMutations in CommitLogReplayer
patch by jbellis reviewed by dbrosius for (CASSANDRA-5541)


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

Branch: refs/heads/trunk
Commit: 31d991a2551278de629ef38ed7e31b483ca67157
Parents: 3683d62
Author: Dave Brosius dbros...@apache.org
Authored: Mon May 13 14:29:46 2013 -0400
Committer: Dave Brosius dbros...@apache.org
Committed: Mon May 13 14:29:46 2013 -0400

--
 CHANGES.txt|2 +-
 .../cassandra/db/commitlog/CommitLogReplayer.java  |7 +--
 2 files changed, 6 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/31d991a2/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 1aca920..fb95e14 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -43,7 +43,7 @@
  * Add binary protocol versioning (CASSANDRA-5436)
  * Swap THshaServer for TThreadedSelectorServer (CASSANDRA-5530)
  * Add alias support to SELECT statement (CASSANDRA-5075)
-
+ * Don't create empty RowMutations in CommitLogReplayer (CASSANDRA-5541)
 
 1.2.5
  * fix 2i updates with identical values and timestamps (CASSANDRA-5540)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/31d991a2/src/java/org/apache/cassandra/db/commitlog/CommitLogReplayer.java
--
diff --git a/src/java/org/apache/cassandra/db/commitlog/CommitLogReplayer.java 
b/src/java/org/apache/cassandra/db/commitlog/CommitLogReplayer.java
index 37094c6..3d4cb8c 100644
--- a/src/java/org/apache/cassandra/db/commitlog/CommitLogReplayer.java
+++ b/src/java/org/apache/cassandra/db/commitlog/CommitLogReplayer.java
@@ -237,11 +237,11 @@ public class CommitLogReplayer
 return;
 
 final Table table = Table.open(frm.getTable());
-RowMutation newRm = new RowMutation(frm.getTable(), 
frm.key());
 
 // Rebuild the row mutation, omitting column families 
that 
 // a) have already been flushed,
 // b) are part of a cf that was dropped. Keep in mind 
that the cf.name() is suspect. do every thing based on the cfid instead.
+RowMutation newRm = null;
 for (ColumnFamily columnFamily : 
frm.getColumnFamilies())
 {
 if (Schema.instance.getCF(columnFamily.id()) == 
null)
@@ -254,12 +254,15 @@ public class CommitLogReplayer
 // if it is the last known segment, if we are 
after the replay position
 if (segment  rp.segment || (segment == rp.segment 
 entryLocation  rp.position))
 {
+if (newRm == null)
+newRm = new RowMutation(frm.getTable(), 
frm.key());
 newRm.add(columnFamily);
 replayedCount.incrementAndGet();
 }
 }
-if (!newRm.isEmpty())
+if (newRm != null)
 {
+assert !newRm.isEmpty();
 Table.open(newRm.getTable()).apply(newRm, false);
 tablesRecovered.add(table);
 }



[2/2] git commit: Ensure that submitBackground enqueues at least one task patch by Oleg Anastasyev; reviewed by jbellis for CASSANDRA-5554

2013-05-13 Thread jbellis
Ensure that submitBackground enqueues at least one task
patch by Oleg Anastasyev; reviewed by jbellis for CASSANDRA-5554


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

Branch: refs/heads/cassandra-1.2
Commit: 3b41d21d9b997530e48511e1d09ea904e8937bf0
Parents: 5692797
Author: Jonathan Ellis jbel...@apache.org
Authored: Mon May 13 11:51:56 2013 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Mon May 13 13:45:10 2013 -0500

--
 CHANGES.txt|1 +
 .../cassandra/db/compaction/CompactionManager.java |   23 ---
 2 files changed, 13 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/3b41d21d/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 844fe3d..740d8e3 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.2.5
+ * Ensure that submitBackground enqueues at least one task (CASSANDRA-5554)
  * fix 2i updates with identical values and timestamps (CASSANDRA-5540)
  * fix compaction throttling bursty-ness (CASSANDRA-4316)
  * reduce memory consumption of IndexSummary (CASSANDRA-5506)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3b41d21d/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
--
diff --git a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java 
b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
index 96c3011..7ebbc7c 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
@@ -149,8 +149,8 @@ public class CompactionManager implements 
CompactionManagerMBean
 
 /**
  * Call this whenever a compaction might be needed on the given 
columnfamily.
- * It's okay to over-call (within reason) since the compactions are 
single-threaded,
- * and if a call is unnecessary, it will just be no-oped in the bucketing 
phase.
+ * It's okay to over-call (within reason) if a call is unnecessary, it will
+ * turn into a no-op in the bucketing/candidate-scan phase.
  */
 public ListFuture? submitBackground(final ColumnFamilyStore cfs)
 {
@@ -158,21 +158,23 @@ public class CompactionManager implements 
CompactionManagerMBean
 if (count  0  executor.getActiveCount() = 
executor.getMaximumPoolSize())
 {
 logger.debug(Background compaction is still running for {}.{} ({} 
remaining). Skipping,
- new Object[] {cfs.table.name, cfs.columnFamily, 
count});
+ cfs.table.name, cfs.columnFamily, count);
 return Collections.emptyList();
 }
 
 logger.debug(Scheduling a background task check for {}.{} with {},
- new Object[] {cfs.table.name,
-   cfs.columnFamily,
-   
cfs.getCompactionStrategy().getClass().getSimpleName()});
+ cfs.table.name,
+ cfs.columnFamily,
+ cfs.getCompactionStrategy().getClass().getSimpleName());
 ListFuture? futures = new ArrayListFuture?();
-// if we have room for more compactions, then fill up executor
-while (executor.getActiveCount() + futures.size()  
executor.getMaximumPoolSize())
-{
+
+// we must schedule it at least once, otherwise compaction will stop 
for a CF until next flush
+do {
 futures.add(executor.submit(new BackgroundCompactionTask(cfs)));
 compactingCF.add(cfs);
-}
+// if we have room for more compactions, then fill up executor
+} while (executor.getActiveCount() + futures.size()  
executor.getMaximumPoolSize());
+
 return futures;
 }
 
@@ -590,7 +592,6 @@ public class CompactionManager implements 
CompactionManagerMBean
 throw new IOException(disk full);
 
 SSTableScanner scanner = 
sstable.getDirectScanner(getRateLimiter());
-long rowsRead = 0;
 ListIColumn indexedColumnsInRow = null;
 
 CleanupInfo ci = new CleanupInfo(sstable, scanner);



[1/2] git commit: Ensure that submitBackground enqueues at least one task patch by Oleg Anastasyev; reviewed by jbellis for CASSANDRA-5554

2013-05-13 Thread jbellis
Updated Branches:
  refs/heads/cassandra-1.2 56927973f - 3b41d21d9
  refs/heads/trunk 31d991a25 - 740e344c7


Ensure that submitBackground enqueues at least one task
patch by Oleg Anastasyev; reviewed by jbellis for CASSANDRA-5554


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

Branch: refs/heads/trunk
Commit: 740e344c7fc1ee0283744fefd659db999b48c71f
Parents: 31d991a
Author: Jonathan Ellis jbel...@apache.org
Authored: Mon May 13 11:51:56 2013 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Mon May 13 13:44:40 2013 -0500

--
 CHANGES.txt|2 ++
 .../cassandra/db/compaction/CompactionManager.java |   15 ---
 2 files changed, 10 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/740e344c/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index fb95e14..f67f0c2 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -45,7 +45,9 @@
  * Add alias support to SELECT statement (CASSANDRA-5075)
  * Don't create empty RowMutations in CommitLogReplayer (CASSANDRA-5541)
 
+
 1.2.5
+ * Ensure that submitBackground enqueues at least one task (CASSANDRA-5554)
  * fix 2i updates with identical values and timestamps (CASSANDRA-5540)
  * fix compaction throttling bursty-ness (CASSANDRA-4316)
  * reduce memory consumption of IndexSummary (CASSANDRA-5506)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/740e344c/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
--
diff --git a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java 
b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
index 758068c..e0d186f 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
@@ -122,8 +122,8 @@ public class CompactionManager implements 
CompactionManagerMBean
 
 /**
  * Call this whenever a compaction might be needed on the given 
columnfamily.
- * It's okay to over-call (within reason) since the compactions are 
single-threaded,
- * and if a call is unnecessary, it will just be no-oped in the bucketing 
phase.
+ * It's okay to over-call (within reason) if a call is unnecessary, it will
+ * turn into a no-op in the bucketing/candidate-scan phase.
  */
 public ListFuture? submitBackground(final ColumnFamilyStore cfs)
 {
@@ -146,12 +146,14 @@ public class CompactionManager implements 
CompactionManagerMBean
  cfs.name,
  cfs.getCompactionStrategy().getClass().getSimpleName());
 ListFuture? futures = new ArrayListFuture?();
-// if we have room for more compactions, then fill up executor
-while (executor.getActiveCount() + futures.size()  
executor.getMaximumPoolSize())
-{
+
+// we must schedule it at least once, otherwise compaction will stop 
for a CF until next flush
+do {
 futures.add(executor.submit(new BackgroundCompactionTask(cfs)));
 compactingCF.add(cfs);
-}
+// if we have room for more compactions, then fill up executor
+} while (executor.getActiveCount() + futures.size()  
executor.getMaximumPoolSize());
+
 return futures;
 }
 
@@ -490,7 +492,6 @@ public class CompactionManager implements 
CompactionManagerMBean
 throw new IOException(disk full);
 
 SSTableScanner scanner = sstable.getScanner(getRateLimiter());
-long rowsRead = 0;
 ListColumn indexedColumnsInRow = null;
 
 CleanupInfo ci = new CleanupInfo(sstable, scanner);



[jira] [Assigned] (CASSANDRA-5554) Growing pending compactions

2013-05-13 Thread Brandon Williams (JIRA)

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

Brandon Williams reassigned CASSANDRA-5554:
---

Assignee: Oleg Anastasyev

 Growing pending compactions
 ---

 Key: CASSANDRA-5554
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5554
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.2.4
Reporter: Oleg Anastasyev
Assignee: Oleg Anastasyev
 Attachments: patch.diff, pending_compactions_fixed.png


 I noticed on one of our new cassandra production server, that pending 
 compactions number is steadily growing. The cluster is under low write load, 
 so compactions are not keeping up was not the case.
 A quick investigation shown, that compactions are stopping far before all 
 pending tasks are completed. I also found, that if concurrent_compactors=1, 
 background compactions are not happening at all.
 The bug is in BackgroundCompactionTask rescheduling logic. The executor pool 
 room control code in CompactionManager.submitBackground() does not 
 reschedule next background cycle, if executor.getActiveCount reach maximun 
 pool size, so it is lost forever.
 So I patched it to always schedule single background cycle, regardless of the 
 free room in executor pool.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Created] (CASSANDRA-5563) The CQL3 binary protocol does not allow a user to bind an empty buffer to signify the start of the token range

2013-05-13 Thread Steven Lowenthal (JIRA)
Steven Lowenthal created CASSANDRA-5563:
---

 Summary: The CQL3 binary protocol does not allow a user to bind an 
empty buffer to signify the start of the token range
 Key: CASSANDRA-5563
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5563
 Project: Cassandra
  Issue Type: Improvement
  Components: API
Affects Versions: 1.2.3
Reporter: Steven Lowenthal


Using CQL2 or CQL3 over thrift, one can issue a query which starts at the 
beginning of the table by binding an empty buffer.  The same is true for CQL2 
using calls like get_range_slice.   This is not allowed with the binary 
protocol.  Here is working sample code for CQL3 over thrift:

// Bind empty buffer to get query to start at the beginning of 
// the table
ByteBuffer b = ByteBuffer.wrap(new byte[0]);
bindVars.add(b);

int cnt = 0;
CqlResult result;

do {
  result =  _client.execute_prepared_cql3_query(stmt.itemId, bindVars, 
ConsistencyLevel.ONE);
  // Set up the next chunk, by setting the bind var to the last received key
  bindVars.set(0, ByteBuffer.wrap(result.getRows()
  .get(result.getRows().size() - 
1).getColumns().get(0).getValue()));

  // Count rows
  cnt += result.getRows().size();

  if (cnt  100)
Assert.fail(Running past the end of the table: cnt =  + cnt + , 
size() =   + result.getRows().size());

} while (result.getRows().size() = CHUNK_SIZE);

Assert.assertEquals(Wrong count, 100, cnt);

  } 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-5563) The CQL3 binary protocol does not allow a user to bind an empty buffer to signify the start of the token range

2013-05-13 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-5563:
--

  Description: 
Using CQL2 or CQL3 over thrift, one can issue a query which starts at the 
beginning of the table by binding an empty buffer.  The same is true for CQL2 
using calls like get_range_slice.   This is not allowed with the binary 
protocol.  Here is working sample code for CQL3 over thrift:

{code}
// Bind empty buffer to get query to start at the beginning of 
// the table
ByteBuffer b = ByteBuffer.wrap(new byte[0]);
bindVars.add(b);

int cnt = 0;
CqlResult result;

do {
  result =  _client.execute_prepared_cql3_query(stmt.itemId, bindVars, 
ConsistencyLevel.ONE);
  // Set up the next chunk, by setting the bind var to the last received key
  bindVars.set(0, ByteBuffer.wrap(result.getRows()
  .get(result.getRows().size() - 
1).getColumns().get(0).getValue()));

  // Count rows
  cnt += result.getRows().size();

  if (cnt  100)
Assert.fail(Running past the end of the table: cnt =  + cnt + , 
size() =   + result.getRows().size());

} while (result.getRows().size() = CHUNK_SIZE);

Assert.assertEquals(Wrong count, 100, cnt);

  } 
{code}

  was:
Using CQL2 or CQL3 over thrift, one can issue a query which starts at the 
beginning of the table by binding an empty buffer.  The same is true for CQL2 
using calls like get_range_slice.   This is not allowed with the binary 
protocol.  Here is working sample code for CQL3 over thrift:

// Bind empty buffer to get query to start at the beginning of 
// the table
ByteBuffer b = ByteBuffer.wrap(new byte[0]);
bindVars.add(b);

int cnt = 0;
CqlResult result;

do {
  result =  _client.execute_prepared_cql3_query(stmt.itemId, bindVars, 
ConsistencyLevel.ONE);
  // Set up the next chunk, by setting the bind var to the last received key
  bindVars.set(0, ByteBuffer.wrap(result.getRows()
  .get(result.getRows().size() - 
1).getColumns().get(0).getValue()));

  // Count rows
  cnt += result.getRows().size();

  if (cnt  100)
Assert.fail(Running past the end of the table: cnt =  + cnt + , 
size() =   + result.getRows().size());

} while (result.getRows().size() = CHUNK_SIZE);

Assert.assertEquals(Wrong count, 100, cnt);

  } 

 Priority: Minor  (was: Major)
Affects Version/s: (was: 1.2.3)
   1.2.0
Fix Version/s: 1.2.5

You didn't include your statement.  Is it using {{token()}}?

 The CQL3 binary protocol does not allow a user to bind an empty buffer to 
 signify the start of the token range
 --

 Key: CASSANDRA-5563
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5563
 Project: Cassandra
  Issue Type: Improvement
  Components: API
Affects Versions: 1.2.0
Reporter: Steven Lowenthal
Priority: Minor
 Fix For: 1.2.5


 Using CQL2 or CQL3 over thrift, one can issue a query which starts at the 
 beginning of the table by binding an empty buffer.  The same is true for CQL2 
 using calls like get_range_slice.   This is not allowed with the binary 
 protocol.  Here is working sample code for CQL3 over thrift:
 {code}
 // Bind empty buffer to get query to start at the beginning of 
 // the table
 ByteBuffer b = ByteBuffer.wrap(new byte[0]);
 bindVars.add(b);
 int cnt = 0;
 CqlResult result;
 do {
   result =  _client.execute_prepared_cql3_query(stmt.itemId, bindVars, 
 ConsistencyLevel.ONE);
   // Set up the next chunk, by setting the bind var to the last received 
 key
   bindVars.set(0, ByteBuffer.wrap(result.getRows()
   .get(result.getRows().size() - 
 1).getColumns().get(0).getValue()));
   // Count rows
   cnt += result.getRows().size();
   if (cnt  100)
 Assert.fail(Running past the end of the table: cnt =  + cnt + , 
 size() =   + result.getRows().size());
 } while (result.getRows().size() = CHUNK_SIZE);
 Assert.assertEquals(Wrong count, 100, cnt);
   } 
 {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-4860) Estimated Row Cache Entry size incorrect (always 24?)

2013-05-13 Thread Carl Yeksigian (JIRA)

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

Carl Yeksigian updated CASSANDRA-4860:
--

Attachment: 4860-fix-row-index-entry.patch

The issue is in the following code from RowIndexEntry:208

{code}
long internal = 0;
for (IndexHelper.IndexInfo idx : columnsIndex)
internal += idx.memorySize();
long listSize = 
ObjectSizes.getFieldSize(ObjectSizes.getArraySize(columnsIndex.size(), 
internal) + 4);
return ObjectSizes.getFieldSize(deletionTime.memorySize() + 
listSize);
{code}

The list size is *not* getArraySize(columnsIndex.size(), internal). That 
multiplies the number of elements by the size that was just calculated.

It should instead be:
{code}
ObjectSizes.getFieldSize(internal + 4)
{code}

There are no other suspicious usages of getArraySize, the only other ones are 
from the ObjectSizes file for byte array sizes (those make sense).

 Estimated Row Cache Entry size incorrect (always 24?)
 -

 Key: CASSANDRA-4860
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4860
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.0, 1.2.3, 2.0
Reporter: Chris Burroughs
Assignee: Vijay
 Fix For: 1.2.0 beta 3

 Attachments: 0001-4860-v2.patch, 0001-4860-v3.patch, 
 0001-CASSANDRA-4860-for-11.patch, 0001-CASSANDRA-4860.patch, 
 4860-fix-row-index-entry.patch, 4860-perf-test.zip, 4860-tests.patch, 
 trunk-4860-revert.patch


 After running for several hours the RowCacheSize was suspicious low (ie 70 
 something MB)  I used  CASSANDRA-4859 to measure the size and number of 
 entries on a node:
 In [3]: 1560504./65021
 Out[3]: 24.0
 In [4]: 2149464./89561
 Out[4]: 24.0
 In [6]: 7216096./300785
 Out[6]: 23.990877204647838
 That's RowCacheSize/RowCacheNumEntires  .  Just to prove I don't have crazy 
 small rows the mean size of the row *keys* in the saved cache is 67 and 
 Compacted row mean size: 355.  No jamm errors in the log
 Config notes:
 row_cache_provider: ConcurrentLinkedHashCacheProvider
 row_cache_size_in_mb: 2048
 Version info:
  * C*: 1.1.6
  * centos 2.6.32-220.13.1.el6.x86_64
  * java 6u31 Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01, mixed mode)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-5562) sstablescrub should respect MAX_HEAP_SIZE

2013-05-13 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-5562:
--

  Component/s: (was: Core)
   Tools
Affects Version/s: (was: 1.1.11)
 Assignee: Brandon Williams

 sstablescrub should respect MAX_HEAP_SIZE
 -

 Key: CASSANDRA-5562
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5562
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Reporter: Mina Naguib
Assignee: Brandon Williams
Priority: Minor
  Labels: MAX_HEAP_SIZE, heap, oom, sstablescrub, xmx
 Attachments: CASSANDRA-5562-sstablescrub_max_heap_size.patch


 sstablescrub has Xmx hardcoded to 256MB.  This is not enough in my 
 installation and causes an OOM.
 Since it's meant to be run offline, the memory usually allocated to the 
 daemon can be safely given to the tool.
 Attached is a patch that makes it respect $MAX_HEAP_SIZE (with fallback to 
 256MB if not defined)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-5563) The CQL3 binary protocol does not allow a user to bind an empty buffer to signify the start of the token range

2013-05-13 Thread Steven Lowenthal (JIRA)

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

Steven Lowenthal updated CASSANDRA-5563:


Description: 
Using CQL2 or CQL3 over thrift, one can issue a query which starts at the 
beginning of the table by binding an empty buffer.  The same is true for CQL2 
using calls like get_range_slice.   This is not allowed with the binary 
protocol.  Here is working sample code for CQL3 over thrift:

{code}

CqlPreparedResult stmt = _client.prepare_cql3_query(ByteBuffer.wrap(SELECT 
\ Sequence number\ from \nhanes52simple\ where TOKEN (\ Sequence number\) 
 TOKEN(?) limit 15.getBytes()), Compression.NONE);

// Bind empty buffer to get query to start at the beginning of 
// the table
ByteBuffer b = ByteBuffer.wrap(new byte[0]);
bindVars.add(b);

int cnt = 0;
CqlResult result;

do {
  result =  _client.execute_prepared_cql3_query(stmt.itemId, bindVars, 
ConsistencyLevel.ONE);
  // Set up the next chunk, by setting the bind var to the last received key
  bindVars.set(0, ByteBuffer.wrap(result.getRows()
  .get(result.getRows().size() - 
1).getColumns().get(0).getValue()));

  // Count rows
  cnt += result.getRows().size();

  if (cnt  100)
Assert.fail(Running past the end of the table: cnt =  + cnt + , 
size() =   + result.getRows().size());

} while (result.getRows().size() = CHUNK_SIZE);

Assert.assertEquals(Wrong count, 100, cnt);

  } 
{code}

  was:
Using CQL2 or CQL3 over thrift, one can issue a query which starts at the 
beginning of the table by binding an empty buffer.  The same is true for CQL2 
using calls like get_range_slice.   This is not allowed with the binary 
protocol.  Here is working sample code for CQL3 over thrift:

{code}
// Bind empty buffer to get query to start at the beginning of 
// the table
ByteBuffer b = ByteBuffer.wrap(new byte[0]);
bindVars.add(b);

int cnt = 0;
CqlResult result;

do {
  result =  _client.execute_prepared_cql3_query(stmt.itemId, bindVars, 
ConsistencyLevel.ONE);
  // Set up the next chunk, by setting the bind var to the last received key
  bindVars.set(0, ByteBuffer.wrap(result.getRows()
  .get(result.getRows().size() - 
1).getColumns().get(0).getValue()));

  // Count rows
  cnt += result.getRows().size();

  if (cnt  100)
Assert.fail(Running past the end of the table: cnt =  + cnt + , 
size() =   + result.getRows().size());

} while (result.getRows().size() = CHUNK_SIZE);

Assert.assertEquals(Wrong count, 100, cnt);

  } 
{code}


 The CQL3 binary protocol does not allow a user to bind an empty buffer to 
 signify the start of the token range
 --

 Key: CASSANDRA-5563
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5563
 Project: Cassandra
  Issue Type: Improvement
  Components: API
Affects Versions: 1.2.0
Reporter: Steven Lowenthal
Priority: Minor
 Fix For: 1.2.5


 Using CQL2 or CQL3 over thrift, one can issue a query which starts at the 
 beginning of the table by binding an empty buffer.  The same is true for CQL2 
 using calls like get_range_slice.   This is not allowed with the binary 
 protocol.  Here is working sample code for CQL3 over thrift:
 {code}
 CqlPreparedResult stmt = 
 _client.prepare_cql3_query(ByteBuffer.wrap(SELECT \ Sequence number\ from 
 \nhanes52simple\ where TOKEN (\ Sequence number\)  TOKEN(?) limit 
 15.getBytes()), Compression.NONE);
 // Bind empty buffer to get query to start at the beginning of 
 // the table
 ByteBuffer b = ByteBuffer.wrap(new byte[0]);
 bindVars.add(b);
 int cnt = 0;
 CqlResult result;
 do {
   result =  _client.execute_prepared_cql3_query(stmt.itemId, bindVars, 
 ConsistencyLevel.ONE);
   // Set up the next chunk, by setting the bind var to the last received 
 key
   bindVars.set(0, ByteBuffer.wrap(result.getRows()
   .get(result.getRows().size() - 
 1).getColumns().get(0).getValue()));
   // Count rows
   cnt += result.getRows().size();
   if (cnt  100)
 Assert.fail(Running past the end of the table: cnt =  + cnt + , 
 size() =   + result.getRows().size());
 } while (result.getRows().size() = CHUNK_SIZE);
 Assert.assertEquals(Wrong count, 100, cnt);
   } 
 {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5563) The CQL3 binary protocol does not allow a user to bind an empty buffer to signify the start of the token range

2013-05-13 Thread Steven Lowenthal (JIRA)

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

Steven Lowenthal commented on CASSANDRA-5563:
-

Code amended.   It does use token()

 The CQL3 binary protocol does not allow a user to bind an empty buffer to 
 signify the start of the token range
 --

 Key: CASSANDRA-5563
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5563
 Project: Cassandra
  Issue Type: Improvement
  Components: API
Affects Versions: 1.2.0
Reporter: Steven Lowenthal
Priority: Minor
 Fix For: 1.2.5


 Using CQL2 or CQL3 over thrift, one can issue a query which starts at the 
 beginning of the table by binding an empty buffer.  The same is true for CQL2 
 using calls like get_range_slice.   This is not allowed with the binary 
 protocol.  Here is working sample code for CQL3 over thrift:
 {code}
 CqlPreparedResult stmt = 
 _client.prepare_cql3_query(ByteBuffer.wrap(SELECT \ Sequence number\ from 
 \nhanes52simple\ where TOKEN (\ Sequence number\)  TOKEN(?) limit 
 15.getBytes()), Compression.NONE);
 // Bind empty buffer to get query to start at the beginning of 
 // the table
 ByteBuffer b = ByteBuffer.wrap(new byte[0]);
 bindVars.add(b);
 int cnt = 0;
 CqlResult result;
 do {
   result =  _client.execute_prepared_cql3_query(stmt.itemId, bindVars, 
 ConsistencyLevel.ONE);
   // Set up the next chunk, by setting the bind var to the last received 
 key
   bindVars.set(0, ByteBuffer.wrap(result.getRows()
   .get(result.getRows().size() - 
 1).getColumns().get(0).getValue()));
   // Count rows
   cnt += result.getRows().size();
   if (cnt  100)
 Assert.fail(Running past the end of the table: cnt =  + cnt + , 
 size() =   + result.getRows().size());
 } while (result.getRows().size() = CHUNK_SIZE);
 Assert.assertEquals(Wrong count, 100, cnt);
   } 
 {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-5563) The CQL3 binary protocol does not allow a user to bind an empty buffer to signify the start of the token range

2013-05-13 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-5563:
--

  Assignee: Sylvain Lebresne
Issue Type: Bug  (was: Improvement)

 The CQL3 binary protocol does not allow a user to bind an empty buffer to 
 signify the start of the token range
 --

 Key: CASSANDRA-5563
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5563
 Project: Cassandra
  Issue Type: Bug
  Components: API
Affects Versions: 1.2.0
Reporter: Steven Lowenthal
Assignee: Sylvain Lebresne
Priority: Minor
 Fix For: 1.2.5


 Using CQL2 or CQL3 over thrift, one can issue a query which starts at the 
 beginning of the table by binding an empty buffer.  The same is true for CQL2 
 using calls like get_range_slice.   This is not allowed with the binary 
 protocol.  Here is working sample code for CQL3 over thrift:
 {code}
 CqlPreparedResult stmt = 
 _client.prepare_cql3_query(ByteBuffer.wrap(SELECT \ Sequence number\ from 
 \nhanes52simple\ where TOKEN (\ Sequence number\)  TOKEN(?) limit 
 15.getBytes()), Compression.NONE);
 // Bind empty buffer to get query to start at the beginning of 
 // the table
 ByteBuffer b = ByteBuffer.wrap(new byte[0]);
 bindVars.add(b);
 int cnt = 0;
 CqlResult result;
 do {
   result =  _client.execute_prepared_cql3_query(stmt.itemId, bindVars, 
 ConsistencyLevel.ONE);
   // Set up the next chunk, by setting the bind var to the last received 
 key
   bindVars.set(0, ByteBuffer.wrap(result.getRows()
   .get(result.getRows().size() - 
 1).getColumns().get(0).getValue()));
   // Count rows
   cnt += result.getRows().size();
   if (cnt  100)
 Assert.fail(Running past the end of the table: cnt =  + cnt + , 
 size() =   + result.getRows().size());
 } while (result.getRows().size() = CHUNK_SIZE);
 Assert.assertEquals(Wrong count, 100, cnt);
   } 
 {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Created] (CASSANDRA-5564) fix memorySize bugs

2013-05-13 Thread Jonathan Ellis (JIRA)
Jonathan Ellis created CASSANDRA-5564:
-

 Summary: fix memorySize bugs
 Key: CASSANDRA-5564
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5564
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.5
Reporter: Jonathan Ellis
Assignee: Carl Yeksigian
 Fix For: 1.2.5




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Resolved] (CASSANDRA-4860) Estimated Row Cache Entry size incorrect (always 24?)

2013-05-13 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis resolved CASSANDRA-4860.
---

Resolution: Fixed

Moved to CASSANDRA-5564

 Estimated Row Cache Entry size incorrect (always 24?)
 -

 Key: CASSANDRA-4860
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4860
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.0, 1.2.3, 2.0
Reporter: Chris Burroughs
Assignee: Vijay
 Fix For: 1.2.0 beta 3

 Attachments: 0001-4860-v2.patch, 0001-4860-v3.patch, 
 0001-CASSANDRA-4860-for-11.patch, 0001-CASSANDRA-4860.patch, 
 4860-fix-row-index-entry.patch, 4860-perf-test.zip, 4860-tests.patch, 
 trunk-4860-revert.patch


 After running for several hours the RowCacheSize was suspicious low (ie 70 
 something MB)  I used  CASSANDRA-4859 to measure the size and number of 
 entries on a node:
 In [3]: 1560504./65021
 Out[3]: 24.0
 In [4]: 2149464./89561
 Out[4]: 24.0
 In [6]: 7216096./300785
 Out[6]: 23.990877204647838
 That's RowCacheSize/RowCacheNumEntires  .  Just to prove I don't have crazy 
 small rows the mean size of the row *keys* in the saved cache is 67 and 
 Compacted row mean size: 355.  No jamm errors in the log
 Config notes:
 row_cache_provider: ConcurrentLinkedHashCacheProvider
 row_cache_size_in_mb: 2048
 Version info:
  * C*: 1.1.6
  * centos 2.6.32-220.13.1.el6.x86_64
  * java 6u31 Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01, mixed mode)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-5564) fix memorySize bugs

2013-05-13 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-5564:
--

Attachment: 5564.txt

It looks like getFieldSize and getArraySize are only meant to calculate 
*shallow* sizes.  Deep sizes must be added in separately.  Fixes attached, 
based on Carl's fix at the bottom of CASSANDRA-4860.

 fix memorySize bugs
 ---

 Key: CASSANDRA-5564
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5564
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.5
Reporter: Jonathan Ellis
Assignee: Carl Yeksigian
 Fix For: 1.2.5

 Attachments: 5564.txt




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-5564) fix memorySize bugs

2013-05-13 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-5564:
--

Attachment: (was: 5564.txt)

 fix memorySize bugs
 ---

 Key: CASSANDRA-5564
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5564
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.5
Reporter: Jonathan Ellis
Assignee: Carl Yeksigian
 Fix For: 1.2.5

 Attachments: 5564.txt




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-5564) fix memorySize bugs

2013-05-13 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-5564:
--

Attachment: 5564.txt

 fix memorySize bugs
 ---

 Key: CASSANDRA-5564
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5564
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.5
Reporter: Jonathan Ellis
Assignee: Carl Yeksigian
 Fix For: 1.2.5

 Attachments: 5564.txt




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-5564) fix memorySize bugs

2013-05-13 Thread Carl Yeksigian (JIRA)

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

Carl Yeksigian updated CASSANDRA-5564:
--

Attachment: 5564-v2.patch

This seems to improve the readability of the memory size overall.

I thought that the ObjectSizes class could use some comments.

Also, adding comments so that it is easier to figure out where each of the 
additions is coming from. Also switched to using the TypeSizes instead of just 
adding seeming arbitrary numbers (plus adds a little self documentation since 
the field name is included).

There was also another small bug in the RowIndexEntry; it was adding a 
reference to the size of position. There is only a single long in the class 
other than a static. This wouldn't significantly overallocate, but just seemed 
like it should be fixed.

 fix memorySize bugs
 ---

 Key: CASSANDRA-5564
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5564
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.5
Reporter: Jonathan Ellis
Assignee: Carl Yeksigian
 Fix For: 1.2.5

 Attachments: 5564.txt, 5564-v2.patch




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5563) The CQL3 binary protocol does not allow a user to bind an empty buffer to signify the start of the token range

2013-05-13 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-5563:
--

Steven is suggesting making token() function accept null (and native proto 
supports binding null) to make paging through rows possible in CQL3 using one 
single prepared query.

 The CQL3 binary protocol does not allow a user to bind an empty buffer to 
 signify the start of the token range
 --

 Key: CASSANDRA-5563
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5563
 Project: Cassandra
  Issue Type: Bug
  Components: API
Affects Versions: 1.2.0
Reporter: Steven Lowenthal
Assignee: Sylvain Lebresne
Priority: Minor
 Fix For: 1.2.5


 Using CQL2 or CQL3 over thrift, one can issue a query which starts at the 
 beginning of the table by binding an empty buffer.  The same is true for CQL2 
 using calls like get_range_slice.   This is not allowed with the binary 
 protocol.  Here is working sample code for CQL3 over thrift:
 {code}
 CqlPreparedResult stmt = 
 _client.prepare_cql3_query(ByteBuffer.wrap(SELECT \ Sequence number\ from 
 \nhanes52simple\ where TOKEN (\ Sequence number\)  TOKEN(?) limit 
 15.getBytes()), Compression.NONE);
 // Bind empty buffer to get query to start at the beginning of 
 // the table
 ByteBuffer b = ByteBuffer.wrap(new byte[0]);
 bindVars.add(b);
 int cnt = 0;
 CqlResult result;
 do {
   result =  _client.execute_prepared_cql3_query(stmt.itemId, bindVars, 
 ConsistencyLevel.ONE);
   // Set up the next chunk, by setting the bind var to the last received 
 key
   bindVars.set(0, ByteBuffer.wrap(result.getRows()
   .get(result.getRows().size() - 
 1).getColumns().get(0).getValue()));
   // Count rows
   cnt += result.getRows().size();
   if (cnt  100)
 Assert.fail(Running past the end of the table: cnt =  + cnt + , 
 size() =   + result.getRows().size());
 } while (result.getRows().size() = CHUNK_SIZE);
 Assert.assertEquals(Wrong count, 100, cnt);
   } 
 {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[1/4] git commit: Ensure that submitBackground enqueues at least one task patch by Oleg Anastasyev; reviewed by jbellis for CASSANDRA-5554

2013-05-13 Thread jbellis
Updated Branches:
  refs/heads/cassandra-1.2 3b41d21d9 - fe10ba7df
  refs/heads/trunk 740e344c7 - 1aa55abb0


Ensure that submitBackground enqueues at least one task
patch by Oleg Anastasyev; reviewed by jbellis for CASSANDRA-5554


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

Branch: refs/heads/trunk
Commit: 3b41d21d9b997530e48511e1d09ea904e8937bf0
Parents: 5692797
Author: Jonathan Ellis jbel...@apache.org
Authored: Mon May 13 11:51:56 2013 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Mon May 13 13:45:10 2013 -0500

--
 CHANGES.txt|1 +
 .../cassandra/db/compaction/CompactionManager.java |   23 ---
 2 files changed, 13 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/3b41d21d/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 844fe3d..740d8e3 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.2.5
+ * Ensure that submitBackground enqueues at least one task (CASSANDRA-5554)
  * fix 2i updates with identical values and timestamps (CASSANDRA-5540)
  * fix compaction throttling bursty-ness (CASSANDRA-4316)
  * reduce memory consumption of IndexSummary (CASSANDRA-5506)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3b41d21d/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
--
diff --git a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java 
b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
index 96c3011..7ebbc7c 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
@@ -149,8 +149,8 @@ public class CompactionManager implements 
CompactionManagerMBean
 
 /**
  * Call this whenever a compaction might be needed on the given 
columnfamily.
- * It's okay to over-call (within reason) since the compactions are 
single-threaded,
- * and if a call is unnecessary, it will just be no-oped in the bucketing 
phase.
+ * It's okay to over-call (within reason) if a call is unnecessary, it will
+ * turn into a no-op in the bucketing/candidate-scan phase.
  */
 public ListFuture? submitBackground(final ColumnFamilyStore cfs)
 {
@@ -158,21 +158,23 @@ public class CompactionManager implements 
CompactionManagerMBean
 if (count  0  executor.getActiveCount() = 
executor.getMaximumPoolSize())
 {
 logger.debug(Background compaction is still running for {}.{} ({} 
remaining). Skipping,
- new Object[] {cfs.table.name, cfs.columnFamily, 
count});
+ cfs.table.name, cfs.columnFamily, count);
 return Collections.emptyList();
 }
 
 logger.debug(Scheduling a background task check for {}.{} with {},
- new Object[] {cfs.table.name,
-   cfs.columnFamily,
-   
cfs.getCompactionStrategy().getClass().getSimpleName()});
+ cfs.table.name,
+ cfs.columnFamily,
+ cfs.getCompactionStrategy().getClass().getSimpleName());
 ListFuture? futures = new ArrayListFuture?();
-// if we have room for more compactions, then fill up executor
-while (executor.getActiveCount() + futures.size()  
executor.getMaximumPoolSize())
-{
+
+// we must schedule it at least once, otherwise compaction will stop 
for a CF until next flush
+do {
 futures.add(executor.submit(new BackgroundCompactionTask(cfs)));
 compactingCF.add(cfs);
-}
+// if we have room for more compactions, then fill up executor
+} while (executor.getActiveCount() + futures.size()  
executor.getMaximumPoolSize());
+
 return futures;
 }
 
@@ -590,7 +592,6 @@ public class CompactionManager implements 
CompactionManagerMBean
 throw new IOException(disk full);
 
 SSTableScanner scanner = 
sstable.getDirectScanner(getRateLimiter());
-long rowsRead = 0;
 ListIColumn indexedColumnsInRow = null;
 
 CleanupInfo ci = new CleanupInfo(sstable, scanner);



[2/4] git commit: fix memorySize bugs and cleanup patch by Carl Yeksigian and jbellis for CASSANDRA-5564

2013-05-13 Thread jbellis
fix memorySize bugs and cleanup
patch by Carl Yeksigian and jbellis for CASSANDRA-5564


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

Branch: refs/heads/trunk
Commit: fe10ba7df361c80d17a11aeed68d8b1c39ec1ae9
Parents: 3b41d21
Author: Jonathan Ellis jbel...@apache.org
Authored: Mon May 13 16:28:48 2013 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Mon May 13 16:28:48 2013 -0500

--
 .../org/apache/cassandra/cache/KeyCacheKey.java|7 ++-
 .../org/apache/cassandra/cache/RowCacheKey.java|7 ++-
 .../apache/cassandra/cache/RowCacheSentinel.java   |3 +-
 .../org/apache/cassandra/db/RowIndexEntry.java |   18 +--
 .../apache/cassandra/io/sstable/IndexHelper.java   |9 +++-
 .../org/apache/cassandra/utils/ObjectSizes.java|   38 ---
 6 files changed, 62 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/fe10ba7d/src/java/org/apache/cassandra/cache/KeyCacheKey.java
--
diff --git a/src/java/org/apache/cassandra/cache/KeyCacheKey.java 
b/src/java/org/apache/cassandra/cache/KeyCacheKey.java
index 9741c7f..3b2077c 100644
--- a/src/java/org/apache/cassandra/cache/KeyCacheKey.java
+++ b/src/java/org/apache/cassandra/cache/KeyCacheKey.java
@@ -52,8 +52,11 @@ public class KeyCacheKey implements CacheKey
 
 public long memorySize()
 {
-long fields = ObjectSizes.getReferenceSize() + 
ObjectSizes.getSizeWithRef(key);
-return ObjectSizes.getFieldSize(fields);
+return ObjectSizes.getFieldSize(// desc
+ObjectSizes.getReferenceSize() +
+// key
+ObjectSizes.getReferenceSize())
+   + ObjectSizes.getArraySize(key);
 }
 
 @Override

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fe10ba7d/src/java/org/apache/cassandra/cache/RowCacheKey.java
--
diff --git a/src/java/org/apache/cassandra/cache/RowCacheKey.java 
b/src/java/org/apache/cassandra/cache/RowCacheKey.java
index d7dab35..33e2065 100644
--- a/src/java/org/apache/cassandra/cache/RowCacheKey.java
+++ b/src/java/org/apache/cassandra/cache/RowCacheKey.java
@@ -52,8 +52,11 @@ public class RowCacheKey implements CacheKey, 
ComparableRowCacheKey
 
 public long memorySize()
 {
-long fields = ObjectSizes.getReferenceSize() + 
ObjectSizes.getSizeWithRef(key);
-return ObjectSizes.getFieldSize(fields);
+return ObjectSizes.getFieldSize(// cfId
+ObjectSizes.getReferenceSize() +
+// key
+ObjectSizes.getReferenceSize())
+   + ObjectSizes.getArraySize(key);
 }
 
 @Override

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fe10ba7d/src/java/org/apache/cassandra/cache/RowCacheSentinel.java
--
diff --git a/src/java/org/apache/cassandra/cache/RowCacheSentinel.java 
b/src/java/org/apache/cassandra/cache/RowCacheSentinel.java
index d7da6ce..9a014dc 100644
--- a/src/java/org/apache/cassandra/cache/RowCacheSentinel.java
+++ b/src/java/org/apache/cassandra/cache/RowCacheSentinel.java
@@ -19,6 +19,7 @@ package org.apache.cassandra.cache;
 
 import java.util.concurrent.atomic.AtomicLong;
 
+import org.apache.cassandra.db.TypeSizes;
 import org.apache.cassandra.utils.ObjectSizes;
 
 import com.google.common.base.Objects;
@@ -60,6 +61,6 @@ public class RowCacheSentinel implements IRowCacheEntry
 public long memorySize()
 {
 // Only long reference.
-return ObjectSizes.getFieldSize(8);
+return ObjectSizes.getFieldSize(TypeSizes.NATIVE.sizeof(sentinelId));
 }
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fe10ba7d/src/java/org/apache/cassandra/db/RowIndexEntry.java
--
diff --git a/src/java/org/apache/cassandra/db/RowIndexEntry.java 
b/src/java/org/apache/cassandra/db/RowIndexEntry.java
index c53e52f..b3904d4 100644
--- a/src/java/org/apache/cassandra/db/RowIndexEntry.java
+++ b/src/java/org/apache/cassandra/db/RowIndexEntry.java
@@ -88,8 +88,7 @@ public class RowIndexEntry implements IMeasurableMemory
 
 public long memorySize()
 {
-long fields = TypeSizes.NATIVE.sizeof(position) + 
ObjectSizes.getReferenceSize(); 
-return ObjectSizes.getFieldSize(fields);
+

[4/4] git commit: merge from 1.2

2013-05-13 Thread jbellis
merge from 1.2


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

Branch: refs/heads/trunk
Commit: 1aa55abb0ccd359446c394dae428111cde1b037a
Parents: 740e344 fe10ba7
Author: Jonathan Ellis jbel...@apache.org
Authored: Mon May 13 16:30:03 2013 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Mon May 13 16:30:03 2013 -0500

--
 .../org/apache/cassandra/cache/KeyCacheKey.java|7 ++-
 .../org/apache/cassandra/cache/RowCacheKey.java|7 ++-
 .../apache/cassandra/cache/RowCacheSentinel.java   |3 +-
 .../org/apache/cassandra/db/RowIndexEntry.java |   18 +--
 .../apache/cassandra/io/sstable/IndexHelper.java   |9 +++-
 .../org/apache/cassandra/utils/ObjectSizes.java|   38 ---
 6 files changed, 62 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1aa55abb/src/java/org/apache/cassandra/db/RowIndexEntry.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/1aa55abb/src/java/org/apache/cassandra/io/sstable/IndexHelper.java
--



[3/4] git commit: fix memorySize bugs and cleanup patch by Carl Yeksigian and jbellis for CASSANDRA-5564

2013-05-13 Thread jbellis
fix memorySize bugs and cleanup
patch by Carl Yeksigian and jbellis for CASSANDRA-5564


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

Branch: refs/heads/cassandra-1.2
Commit: fe10ba7df361c80d17a11aeed68d8b1c39ec1ae9
Parents: 3b41d21
Author: Jonathan Ellis jbel...@apache.org
Authored: Mon May 13 16:28:48 2013 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Mon May 13 16:28:48 2013 -0500

--
 .../org/apache/cassandra/cache/KeyCacheKey.java|7 ++-
 .../org/apache/cassandra/cache/RowCacheKey.java|7 ++-
 .../apache/cassandra/cache/RowCacheSentinel.java   |3 +-
 .../org/apache/cassandra/db/RowIndexEntry.java |   18 +--
 .../apache/cassandra/io/sstable/IndexHelper.java   |9 +++-
 .../org/apache/cassandra/utils/ObjectSizes.java|   38 ---
 6 files changed, 62 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/fe10ba7d/src/java/org/apache/cassandra/cache/KeyCacheKey.java
--
diff --git a/src/java/org/apache/cassandra/cache/KeyCacheKey.java 
b/src/java/org/apache/cassandra/cache/KeyCacheKey.java
index 9741c7f..3b2077c 100644
--- a/src/java/org/apache/cassandra/cache/KeyCacheKey.java
+++ b/src/java/org/apache/cassandra/cache/KeyCacheKey.java
@@ -52,8 +52,11 @@ public class KeyCacheKey implements CacheKey
 
 public long memorySize()
 {
-long fields = ObjectSizes.getReferenceSize() + 
ObjectSizes.getSizeWithRef(key);
-return ObjectSizes.getFieldSize(fields);
+return ObjectSizes.getFieldSize(// desc
+ObjectSizes.getReferenceSize() +
+// key
+ObjectSizes.getReferenceSize())
+   + ObjectSizes.getArraySize(key);
 }
 
 @Override

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fe10ba7d/src/java/org/apache/cassandra/cache/RowCacheKey.java
--
diff --git a/src/java/org/apache/cassandra/cache/RowCacheKey.java 
b/src/java/org/apache/cassandra/cache/RowCacheKey.java
index d7dab35..33e2065 100644
--- a/src/java/org/apache/cassandra/cache/RowCacheKey.java
+++ b/src/java/org/apache/cassandra/cache/RowCacheKey.java
@@ -52,8 +52,11 @@ public class RowCacheKey implements CacheKey, 
ComparableRowCacheKey
 
 public long memorySize()
 {
-long fields = ObjectSizes.getReferenceSize() + 
ObjectSizes.getSizeWithRef(key);
-return ObjectSizes.getFieldSize(fields);
+return ObjectSizes.getFieldSize(// cfId
+ObjectSizes.getReferenceSize() +
+// key
+ObjectSizes.getReferenceSize())
+   + ObjectSizes.getArraySize(key);
 }
 
 @Override

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fe10ba7d/src/java/org/apache/cassandra/cache/RowCacheSentinel.java
--
diff --git a/src/java/org/apache/cassandra/cache/RowCacheSentinel.java 
b/src/java/org/apache/cassandra/cache/RowCacheSentinel.java
index d7da6ce..9a014dc 100644
--- a/src/java/org/apache/cassandra/cache/RowCacheSentinel.java
+++ b/src/java/org/apache/cassandra/cache/RowCacheSentinel.java
@@ -19,6 +19,7 @@ package org.apache.cassandra.cache;
 
 import java.util.concurrent.atomic.AtomicLong;
 
+import org.apache.cassandra.db.TypeSizes;
 import org.apache.cassandra.utils.ObjectSizes;
 
 import com.google.common.base.Objects;
@@ -60,6 +61,6 @@ public class RowCacheSentinel implements IRowCacheEntry
 public long memorySize()
 {
 // Only long reference.
-return ObjectSizes.getFieldSize(8);
+return ObjectSizes.getFieldSize(TypeSizes.NATIVE.sizeof(sentinelId));
 }
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fe10ba7d/src/java/org/apache/cassandra/db/RowIndexEntry.java
--
diff --git a/src/java/org/apache/cassandra/db/RowIndexEntry.java 
b/src/java/org/apache/cassandra/db/RowIndexEntry.java
index c53e52f..b3904d4 100644
--- a/src/java/org/apache/cassandra/db/RowIndexEntry.java
+++ b/src/java/org/apache/cassandra/db/RowIndexEntry.java
@@ -88,8 +88,7 @@ public class RowIndexEntry implements IMeasurableMemory
 
 public long memorySize()
 {
-long fields = TypeSizes.NATIVE.sizeof(position) + 
ObjectSizes.getReferenceSize(); 
-return ObjectSizes.getFieldSize(fields);
+  

[jira] [Commented] (CASSANDRA-5564) fix memorySize bugs

2013-05-13 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-5564:
---

Committed, w/ one final change to IndexedEntry to include the size of its 
superclass

 fix memorySize bugs
 ---

 Key: CASSANDRA-5564
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5564
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.5
Reporter: Jonathan Ellis
Assignee: Carl Yeksigian
 Fix For: 1.2.5

 Attachments: 5564.txt, 5564-v2.patch




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Created] (CASSANDRA-5565) Peer entry drop from system table silently when bootstrapping a node with an existing IP.

2013-05-13 Thread Rick Branson (JIRA)
Rick Branson created CASSANDRA-5565:
---

 Summary: Peer entry drop from system table silently when 
bootstrapping a node with an existing IP.
 Key: CASSANDRA-5565
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5565
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.2.4
Reporter: Rick Branson


It looks like CASSANDRA-5167 introduced a bit of a regression. I needed to 
rebuild the data on a malfunctioning node by rebootstrapping it. I did this by 
cleaning the host and restarting Cassandra. My plan was to remove the old 
hostID once it had successfully bootstrapped. 

No errors were encountered, but the old host ID of the node before the wipe was 
completely dropped from the peers table because they had the same IP address, 
and therefore the data ranges were moved around. This resulted in a large 
number of CL.ONE reads coming back empty.

There might be a better approach to this rebootstrap process, but it seems like 
it's dangerous to just drop the peer from the table, especially without any 
kind of log message.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-5565) Peer entry drops from system table silently when bootstrapping a node with an existing IP.

2013-05-13 Thread Rick Branson (JIRA)

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

Rick Branson updated CASSANDRA-5565:


Summary: Peer entry drops from system table silently when bootstrapping a 
node with an existing IP.  (was: Peer entry drop from system table silently 
when bootstrapping a node with an existing IP.)

 Peer entry drops from system table silently when bootstrapping a node with an 
 existing IP.
 --

 Key: CASSANDRA-5565
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5565
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.2.4
Reporter: Rick Branson

 It looks like CASSANDRA-5167 introduced a bit of a regression. I needed to 
 rebuild the data on a malfunctioning node by rebootstrapping it. I did this 
 by cleaning the host and restarting Cassandra. My plan was to remove the old 
 hostID once it had successfully bootstrapped. 
 No errors were encountered, but the old host ID of the node before the wipe 
 was completely dropped from the peers table because they had the same IP 
 address, and therefore the data ranges were moved around. This resulted in a 
 large number of CL.ONE reads coming back empty.
 There might be a better approach to this rebootstrap process, but it seems 
 like it's dangerous to just drop the peer from the table, especially without 
 any kind of log message.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


git commit: presize collections

2013-05-13 Thread dbrosius
Updated Branches:
  refs/heads/trunk 1aa55abb0 - 1bd013983


presize collections


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

Branch: refs/heads/trunk
Commit: 1bd0139836b99e171c465e312c9681a3e9fb96b3
Parents: 1aa55ab
Author: Dave Brosius dbros...@apache.org
Authored: Mon May 13 18:35:54 2013 -0400
Committer: Dave Brosius dbros...@apache.org
Committed: Mon May 13 18:35:54 2013 -0400

--
 src/java/org/apache/cassandra/db/Table.java|2 +-
 .../db/compaction/AbstractCompactionStrategy.java  |2 +-
 .../cassandra/db/index/SecondaryIndexManager.java  |2 +-
 .../org/apache/cassandra/dht/BootStrapper.java |2 +-
 .../apache/cassandra/hadoop/BulkRecordWriter.java  |2 +-
 .../cassandra/hadoop/ColumnFamilyRecordReader.java |2 +-
 .../cassandra/io/util/MmappedSegmentedFile.java|3 ++-
 .../apache/cassandra/service/StorageService.java   |2 +-
 8 files changed, 9 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1bd01398/src/java/org/apache/cassandra/db/Table.java
--
diff --git a/src/java/org/apache/cassandra/db/Table.java 
b/src/java/org/apache/cassandra/db/Table.java
index 32920e7..cd7d9b6 100644
--- a/src/java/org/apache/cassandra/db/Table.java
+++ b/src/java/org/apache/cassandra/db/Table.java
@@ -421,7 +421,7 @@ public class Table
 
 public ListFuture? flush()
 {
-ListFuture? futures = new ArrayListFuture?();
+ListFuture? futures = new 
ArrayListFuture?(columnFamilyStores.size());
 for (UUID cfId : columnFamilyStores.keySet())
 futures.add(columnFamilyStores.get(cfId).forceFlush());
 return futures;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/1bd01398/src/java/org/apache/cassandra/db/compaction/AbstractCompactionStrategy.java
--
diff --git 
a/src/java/org/apache/cassandra/db/compaction/AbstractCompactionStrategy.java 
b/src/java/org/apache/cassandra/db/compaction/AbstractCompactionStrategy.java
index d719ad2..3db2469 100644
--- 
a/src/java/org/apache/cassandra/db/compaction/AbstractCompactionStrategy.java
+++ 
b/src/java/org/apache/cassandra/db/compaction/AbstractCompactionStrategy.java
@@ -260,7 +260,7 @@ public abstract class AbstractCompactionStrategy
 }
 // first, calculate estimated keys that do not overlap
 long keys = sstable.estimatedKeys();
-SetRangeToken ranges = new HashSetRangeToken();
+SetRangeToken ranges = new 
HashSetRangeToken(overlaps.size());
 for (SSTableReader overlap : overlaps)
 ranges.add(new RangeToken(overlap.first.token, 
overlap.last.token, overlap.partitioner));
 long remainingKeys = keys - sstable.estimatedKeysForRanges(ranges);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/1bd01398/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
--
diff --git a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java 
b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
index 0bf455a..af370d5 100644
--- a/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
+++ b/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
@@ -115,7 +115,7 @@ public class SecondaryIndexManager
 
 public SetString allIndexesNames()
 {
-SetString names = new HashSetString();
+SetString names = new HashSetString(indexesByColumn.size());
 for (SecondaryIndex index : indexesByColumn.values())
 names.add(index.getIndexName());
 return names;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/1bd01398/src/java/org/apache/cassandra/dht/BootStrapper.java
--
diff --git a/src/java/org/apache/cassandra/dht/BootStrapper.java 
b/src/java/org/apache/cassandra/dht/BootStrapper.java
index f354b08..654a83f 100644
--- a/src/java/org/apache/cassandra/dht/BootStrapper.java
+++ b/src/java/org/apache/cassandra/dht/BootStrapper.java
@@ -89,7 +89,7 @@ public class BootStrapper
 if (initialTokens.size()  0)
 {
 logger.debug(tokens manually specified as {},  initialTokens);
-ListToken tokens = new ArrayListToken();
+ListToken tokens = new ArrayListToken(initialTokens.size());
 for (String tokenString : initialTokens)
 {
 Token token = 

[jira] [Commented] (CASSANDRA-5322) Make dtest logging more granular

2013-05-13 Thread Alex Zarutin (JIRA)

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

Alex Zarutin commented on CASSANDRA-5322:
-

Hey Ryan and Brandon,

Well, I did not realize that we are talking about getting more logging data of 
the cassandra product, not cassandra-dtest.

So, abstracting from ccm tool and nosetest harness - we can deploy the cluster 
manually as well as run the tests as pure python code (if needed), we need to 
be able to turn on/off logging for the single cassandra class (or multiple 
cassandra classes) on the  fly: enable logging of the class X.java - run 
particular test_.py - disable logging of the class X.java. is it 
correct?

If so, I suggest a little bit different approach regarding the implementation:

yes, we have (should have) number of the log4j-server.properties files with 
different combination of the classes enabled for the logging and/or a simple 
tool that allows us to generate log4j-server.properties file based in the input 
parameter (class name for the extensive logging)
we need to update log4j-server.properties with configuration 
monitorInterval=30, actually wrap existing content of 
log4j-server.properties by configuration monitorInterval=30  
/configuration. Logger log4j has the ability to automatically detect changes 
to the configuration file and reconfigure itself. If the monitorInterval 
attribute is specified on the configuration element and is set to a non-zero 
value then the file will be checked the next time a log event is evaluated 
and/or logged and the monitorInterval has elapsed since the last check. See the 
following for the details: 
http://logging.apache.org/log4j/2.x/manual/configuration.html#AutomaticReconfiguration
 . However, I have never tried this myself.
so, we startup cassandra with configuration monitorInterval=30 in the 
log4j, update log4j-server.properties with the proper log4j configuration file 
(with enabled logging of class ), wait for 30 seconds (minimum is 5 
seconds) to wait until it is reloaded, run the cassandra-dtest(s), change 
log4j-server.properties back, wait another 30 seconds, and run another 
cassandra-dtest(s) or leave the cluster.
and yes, this functionality can be build-in into ccm tool


Of course, this reload functionality is going to be used in cassandra 
testing mode only. Instance running Cassandra product as well as running 
Cassandra under stress tests, should use log4j configuration w/o configuration 
monitorInterval=30, since there is a huge impact, that is not tested.

 Make dtest logging more granular 
 -

 Key: CASSANDRA-5322
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5322
 Project: Cassandra
  Issue Type: Test
Reporter: Ryan McGuire
Assignee: Alex Zarutin

 From Brandon: We need a way (might need to go in ccm, I haven't looked) to 
 just set one class to DEBUG or TRACE, like we'd do in 
 conf/log4-server.properties but with an env var preferably, so I can control 
 it via buildbot, since it's better at reproducing some issues than I am 
 sometimes, but I don't want to run the full hammer debug all the time. Also, 
 a way to set Tester.allow_log_errors to false via an env var, since sometimes 
 there's an error there that takes a while to fix but is cosmetic, and in the 
 meantime I want to catch new failures so we don't fall behind.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5322) Make dtest logging more granular

2013-05-13 Thread Alex Zarutin (JIRA)

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

Alex Zarutin commented on CASSANDRA-5322:
-

From Ryan:

Dtests create and destroy the entire cluster before/after each test, I don't 
believe we currently have a need to swap testing configurations during the 
lifetime of a cassandra process, only that we need to control it before it's 
started.

So, I think you've stated the task appropriately, except I would change we 
need to be able to turn on/off logging for the single cassandra class (or 
multiple cassandra classes) on the  fly to we need to be able to turn on/off 
logging for cassandra classes programattically before cassandra starts

 Make dtest logging more granular 
 -

 Key: CASSANDRA-5322
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5322
 Project: Cassandra
  Issue Type: Test
Reporter: Ryan McGuire
Assignee: Alex Zarutin

 From Brandon: We need a way (might need to go in ccm, I haven't looked) to 
 just set one class to DEBUG or TRACE, like we'd do in 
 conf/log4-server.properties but with an env var preferably, so I can control 
 it via buildbot, since it's better at reproducing some issues than I am 
 sometimes, but I don't want to run the full hammer debug all the time. Also, 
 a way to set Tester.allow_log_errors to false via an env var, since sometimes 
 there's an error there that takes a while to fix but is cosmetic, and in the 
 meantime I want to catch new failures so we don't fall behind.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-5322) Make dtest logging more granular

2013-05-13 Thread Alex Zarutin (JIRA)

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

Alex Zarutin commented on CASSANDRA-5322:
-

From Brandon Williams:
I agree.  Also adding that much wait time for log4j to read updates is 
untenable given that we're already over an hour to run the full suite.   

 Make dtest logging more granular 
 -

 Key: CASSANDRA-5322
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5322
 Project: Cassandra
  Issue Type: Test
Reporter: Ryan McGuire
Assignee: Alex Zarutin

 From Brandon: We need a way (might need to go in ccm, I haven't looked) to 
 just set one class to DEBUG or TRACE, like we'd do in 
 conf/log4-server.properties but with an env var preferably, so I can control 
 it via buildbot, since it's better at reproducing some issues than I am 
 sometimes, but I don't want to run the full hammer debug all the time. Also, 
 a way to set Tester.allow_log_errors to false via an env var, since sometimes 
 there's an error there that takes a while to fix but is cosmetic, and in the 
 meantime I want to catch new failures so we don't fall behind.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


git commit: remove unused local 'builder' var

2013-05-13 Thread dbrosius
Updated Branches:
  refs/heads/trunk 1bd013983 - e76ce2161


remove unused local 'builder' var


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

Branch: refs/heads/trunk
Commit: e76ce2161e9213ce16b5b8a2f8c559e3d7f2db2c
Parents: 1bd0139
Author: Dave Brosius dbros...@apache.org
Authored: Mon May 13 19:13:28 2013 -0400
Committer: Dave Brosius dbros...@apache.org
Committed: Mon May 13 19:13:28 2013 -0400

--
 .../db/index/composites/CompositesSearcher.java|1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e76ce216/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java
--
diff --git 
a/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java 
b/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java
index e24078e..e16d94d 100644
--- a/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java
+++ b/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java
@@ -95,7 +95,6 @@ public class CompositesSearcher extends SecondaryIndexSearcher
 final CompositeType baseComparator = 
(CompositeType)baseCfs.getComparator();
 final CompositeType indexComparator = 
(CompositeType)index.getIndexCfs().getComparator();
 
-CompositeType.Builder builder = null;
 final ByteBuffer startPrefix = makePrefix(index, startKey, filter, 
true);
 final ByteBuffer endPrefix = makePrefix(index, endKey, filter, false);
 



git commit: remove unused field BOOTSTRAP_TIMEOUT

2013-05-13 Thread dbrosius
Updated Branches:
  refs/heads/trunk e76ce2161 - 10cc4e0c3


remove unused field BOOTSTRAP_TIMEOUT


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

Branch: refs/heads/trunk
Commit: 10cc4e0c37190b92ed80a04cdb59a664f8cfe2e8
Parents: e76ce21
Author: Dave Brosius dbros...@apache.org
Authored: Mon May 13 19:25:44 2013 -0400
Committer: Dave Brosius dbros...@apache.org
Committed: Mon May 13 19:25:44 2013 -0400

--
 .../org/apache/cassandra/dht/BootStrapper.java |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/10cc4e0c/src/java/org/apache/cassandra/dht/BootStrapper.java
--
diff --git a/src/java/org/apache/cassandra/dht/BootStrapper.java 
b/src/java/org/apache/cassandra/dht/BootStrapper.java
index 654a83f..28615cf 100644
--- a/src/java/org/apache/cassandra/dht/BootStrapper.java
+++ b/src/java/org/apache/cassandra/dht/BootStrapper.java
@@ -47,7 +47,6 @@ public class BootStrapper
 /* token of the node being bootstrapped. */
 protected final CollectionToken tokens;
 protected final TokenMetadata tokenMetadata;
-private static final long BOOTSTRAP_TIMEOUT = 3; // default bootstrap 
timeout of 30s
 
 public BootStrapper(InetAddress address, CollectionToken tokens, 
TokenMetadata tmd)
 {



[jira] [Reopened] (CASSANDRA-5523) Prevent repair among the nodes of different version

2013-05-13 Thread Yuki Morishita (JIRA)

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

Yuki Morishita reopened CASSANDRA-5523:
---


The fix was unreliable because every time connection is closed, protocol 
version for that connection is also reset (set to null), leading to not able to 
repair randomly.
Reverted from 1.2 branch and trunk for now.

 Prevent repair among the nodes of different version
 ---

 Key: CASSANDRA-5523
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5523
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.4
Reporter: Yuki Morishita
Assignee: Yuki Morishita
Priority: Minor
  Labels: repair
 Fix For: 1.2.5

 Attachments: 5523-1.2.txt


 Since streaming file to the node of different version is not allowed, and in 
 fact it would be the cause of repair hang, there is no point to allow 
 repairing among the nodes of different versions.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[1/3] git commit: revert CASSANDRA-5523

2013-05-13 Thread yukim
Updated Branches:
  refs/heads/cassandra-1.2 fe10ba7df - 11b0cfbe7
  refs/heads/trunk 10cc4e0c3 - 174103386


revert CASSANDRA-5523


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

Branch: refs/heads/cassandra-1.2
Commit: 11b0cfbe71aca834b4e60a5262dfb5ee1d945baf
Parents: fe10ba7
Author: Yuki Morishita yu...@apache.org
Authored: Mon May 13 20:53:57 2013 -0500
Committer: Yuki Morishita yu...@apache.org
Committed: Mon May 13 20:53:57 2013 -0500

--
 CHANGES.txt|1 -
 .../cassandra/service/AntiEntropyService.java  |9 +++--
 2 files changed, 3 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/11b0cfbe/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 740d8e3..df13e6a 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -17,7 +17,6 @@
  * Fix repair -snapshot not working (CASSANDRA-5512)
  * Set isRunning flag later in binary protocol server (CASSANDRA-5467)
  * Fix use of CQL3 functions with descending clustering order (CASSANDRA-5472)
- * Prevent repair when protocol version does not match (CASSANDRA-5523)
  * Disallow renaming columns one at a time for thrift table in CQL3
(CASSANDRA-5531)
  * cqlsh: add CLUSTERING ORDER BY support to DESCRIBE (CASSANDRA-5528)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/11b0cfbe/src/java/org/apache/cassandra/service/AntiEntropyService.java
--
diff --git a/src/java/org/apache/cassandra/service/AntiEntropyService.java 
b/src/java/org/apache/cassandra/service/AntiEntropyService.java
index f41089e..eafab67 100644
--- a/src/java/org/apache/cassandra/service/AntiEntropyService.java
+++ b/src/java/org/apache/cassandra/service/AntiEntropyService.java
@@ -668,13 +668,10 @@ public class AntiEntropyService
 throw new IOException(message);
 }
 
-// All endpoints should be on the same protocol version
-if (!MessagingService.instance().knowsVersion(endpoint) || 
MessagingService.instance().getVersion(endpoint) != 
MessagingService.current_version)
+if (MessagingService.instance().getVersion(endpoint)  
MessagingService.VERSION_11  isSequential)
 {
-String message = Cannot repair among different protocol 
versions;
-differencingDone.signalAll();
-logger.error(String.format([repair #%s] , getName()) + 
message);
-throw new IOException(message);
+logger.info(String.format([repair #%s] Cannot repair 
using snapshots as node %s is pre-1.1, getName(), endpoint));
+return;
 }
 }
 



[2/3] git commit: revert CASSANDRA-5523

2013-05-13 Thread yukim
revert CASSANDRA-5523


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

Branch: refs/heads/trunk
Commit: 11b0cfbe71aca834b4e60a5262dfb5ee1d945baf
Parents: fe10ba7
Author: Yuki Morishita yu...@apache.org
Authored: Mon May 13 20:53:57 2013 -0500
Committer: Yuki Morishita yu...@apache.org
Committed: Mon May 13 20:53:57 2013 -0500

--
 CHANGES.txt|1 -
 .../cassandra/service/AntiEntropyService.java  |9 +++--
 2 files changed, 3 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/11b0cfbe/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 740d8e3..df13e6a 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -17,7 +17,6 @@
  * Fix repair -snapshot not working (CASSANDRA-5512)
  * Set isRunning flag later in binary protocol server (CASSANDRA-5467)
  * Fix use of CQL3 functions with descending clustering order (CASSANDRA-5472)
- * Prevent repair when protocol version does not match (CASSANDRA-5523)
  * Disallow renaming columns one at a time for thrift table in CQL3
(CASSANDRA-5531)
  * cqlsh: add CLUSTERING ORDER BY support to DESCRIBE (CASSANDRA-5528)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/11b0cfbe/src/java/org/apache/cassandra/service/AntiEntropyService.java
--
diff --git a/src/java/org/apache/cassandra/service/AntiEntropyService.java 
b/src/java/org/apache/cassandra/service/AntiEntropyService.java
index f41089e..eafab67 100644
--- a/src/java/org/apache/cassandra/service/AntiEntropyService.java
+++ b/src/java/org/apache/cassandra/service/AntiEntropyService.java
@@ -668,13 +668,10 @@ public class AntiEntropyService
 throw new IOException(message);
 }
 
-// All endpoints should be on the same protocol version
-if (!MessagingService.instance().knowsVersion(endpoint) || 
MessagingService.instance().getVersion(endpoint) != 
MessagingService.current_version)
+if (MessagingService.instance().getVersion(endpoint)  
MessagingService.VERSION_11  isSequential)
 {
-String message = Cannot repair among different protocol 
versions;
-differencingDone.signalAll();
-logger.error(String.format([repair #%s] , getName()) + 
message);
-throw new IOException(message);
+logger.info(String.format([repair #%s] Cannot repair 
using snapshots as node %s is pre-1.1, getName(), endpoint));
+return;
 }
 }
 



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

2013-05-13 Thread yukim
Merge branch 'cassandra-1.2' into trunk


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

Branch: refs/heads/trunk
Commit: 174103386cceefb403ce9b689473508d1ea50160
Parents: 10cc4e0 11b0cfb
Author: Yuki Morishita yu...@apache.org
Authored: Mon May 13 21:00:21 2013 -0500
Committer: Yuki Morishita yu...@apache.org
Committed: Mon May 13 21:00:21 2013 -0500

--
 CHANGES.txt|1 -
 .../cassandra/service/ActiveRepairService.java |9 -
 2 files changed, 0 insertions(+), 10 deletions(-)
--


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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/17410338/src/java/org/apache/cassandra/service/ActiveRepairService.java
--
diff --cc src/java/org/apache/cassandra/service/ActiveRepairService.java
index 1752911,000..b692ab0
mode 100644,00..100644
--- a/src/java/org/apache/cassandra/service/ActiveRepairService.java
+++ b/src/java/org/apache/cassandra/service/ActiveRepairService.java
@@@ -1,1144 -1,0 +1,1135 @@@
 +/*
 + * Licensed to the Apache Software Foundation (ASF) under one
 + * or more contributor license agreements.  See the NOTICE file
 + * distributed with this work for additional information
 + * regarding copyright ownership.  The ASF licenses this file
 + * to you under the Apache License, Version 2.0 (the
 + * License); you may not use this file except in compliance
 + * with the License.  You may obtain a copy of the License at
 + *
 + * http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an AS IS BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.
 + */
 +package org.apache.cassandra.service;
 +
 +import java.io.*;
 +import java.net.InetAddress;
 +import java.security.MessageDigest;
 +import java.util.*;
 +import java.util.concurrent.*;
 +import java.util.concurrent.atomic.AtomicBoolean;
 +import java.util.concurrent.locks.Condition;
 +
 +import com.google.common.base.Objects;
 +import com.google.common.collect.Sets;
 +
 +import org.slf4j.Logger;
 +import org.slf4j.LoggerFactory;
 +
 +import org.apache.cassandra.concurrent.JMXConfigurableThreadPoolExecutor;
 +import org.apache.cassandra.concurrent.NamedThreadFactory;
 +import org.apache.cassandra.concurrent.Stage;
 +import org.apache.cassandra.concurrent.StageManager;
 +import org.apache.cassandra.config.DatabaseDescriptor;
 +import org.apache.cassandra.db.*;
 +import org.apache.cassandra.db.compaction.AbstractCompactedRow;
 +import org.apache.cassandra.db.compaction.CompactionManager;
 +import org.apache.cassandra.dht.AbstractBounds;
 +import org.apache.cassandra.dht.Range;
 +import org.apache.cassandra.dht.Token;
 +import org.apache.cassandra.gms.*;
 +import org.apache.cassandra.io.IVersionedSerializer;
 +import org.apache.cassandra.locator.TokenMetadata;
 +import org.apache.cassandra.net.*;
 +import org.apache.cassandra.streaming.StreamingRepairTask;
 +import org.apache.cassandra.utils.*;
 +
 +/**
 + * ActiveRepairService encapsulates validating (hashing) individual column 
families,
 + * exchanging MerkleTrees with remote nodes via a tree request/response 
conversation,
 + * and then triggering repairs for disagreeing ranges.
 + *
 + * The node where repair was invoked acts as the 'initiator,' where valid 
trees are sent after generation
 + * and where the local and remote tree will rendezvous in rendezvous().
 + * Once the trees rendezvous, a Differencer is executed and the service can 
trigger repairs
 + * for disagreeing ranges.
 + *
 + * Tree comparison and repair triggering occur in the single threaded 
Stage.ANTI_ENTROPY.
 + *
 + * The steps taken to enact a repair are as follows:
 + * 1. A repair is requested via JMX/nodetool:
 + *   * The initiator sends TreeRequest messages to all neighbors of the 
target node: when a node
 + * receives a TreeRequest, it will perform a validation (read-only) 
compaction to immediately validate
 + * the column family.  This is performed on the CompactionManager 
ExecutorService.
 + * 2. The validation process builds the merkle tree by:
 + *   * Calling Validator.prepare(), which samples the column family to 
determine key distribution,
 + *   * Calling Validator.add() in order for rows in repair range in the 

git commit: remove unused serializedSize field

2013-05-13 Thread dbrosius
Updated Branches:
  refs/heads/trunk 174103386 - 4adb583c2


remove unused serializedSize field


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

Branch: refs/heads/trunk
Commit: 4adb583c207b83b3b57725ba3d1ccd862ff5c087
Parents: 1741033
Author: Dave Brosius dbros...@apache.org
Authored: Mon May 13 21:59:07 2013 -0400
Committer: Dave Brosius dbros...@apache.org
Committed: Mon May 13 22:05:27 2013 -0400

--
 .../db/compaction/LazilyCompactedRow.java  |8 
 1 files changed, 0 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/4adb583c/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
--
diff --git 
a/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java 
b/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
index c3f246f..a94db88 100644
--- a/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
+++ b/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
@@ -25,8 +25,6 @@ import java.util.List;
 
 import com.google.common.base.Predicates;
 import com.google.common.collect.Iterators;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import org.apache.cassandra.db.*;
 import org.apache.cassandra.db.columniterator.OnDiskAtomIterator;
@@ -36,7 +34,6 @@ import org.apache.cassandra.io.sstable.ColumnStats;
 import org.apache.cassandra.io.sstable.SSTable;
 import org.apache.cassandra.io.sstable.SSTableWriter;
 import org.apache.cassandra.io.util.DataOutputBuffer;
-import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.cassandra.utils.MergeIterator;
 import org.apache.cassandra.utils.StreamingHistogram;
 
@@ -49,8 +46,6 @@ import org.apache.cassandra.utils.StreamingHistogram;
  */
 public class LazilyCompactedRow extends AbstractCompactedRow implements 
IterableOnDiskAtom
 {
-private static Logger logger = 
LoggerFactory.getLogger(LazilyCompactedRow.class);
-
 private final List? extends OnDiskAtomIterator rows;
 private final CompactionController controller;
 private final boolean shouldPurge;
@@ -190,7 +185,6 @@ public class LazilyCompactedRow extends 
AbstractCompactedRow implements Iterable
 // tombstone reference; will be reconciled w/ column during getReduced
 RangeTombstone tombstone;
 
-long serializedSize = 4; // int for column count
 int columns = 0;
 long minTimestampSeen = Long.MAX_VALUE;
 long maxTimestampSeen = Long.MIN_VALUE;
@@ -229,7 +223,6 @@ public class LazilyCompactedRow extends 
AbstractCompactedRow implements Iterable
 }
 else
 {
-serializedSize += t.serializedSizeForSSTable();
 return t;
 }
 }
@@ -250,7 +243,6 @@ public class LazilyCompactedRow extends 
AbstractCompactedRow implements Iterable
 if (indexBuilder.tombstoneTracker().isDeleted(reduced))
 return null;
 
-serializedSize += reduced.serializedSizeForSSTable();
 columns++;
 minTimestampSeen = Math.min(minTimestampSeen, 
reduced.minTimestamp());
 maxTimestampSeen = Math.max(maxTimestampSeen, 
reduced.maxTimestamp());