git commit: Fix nodetool netstats

2014-05-21 Thread marcuse
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 a42b4e584 - 7abd76e45


Fix nodetool netstats

Patch by marcuse; reviewed by JoshuaMcKenzie for CASSANDRA-7270


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

Branch: refs/heads/cassandra-2.1
Commit: 7abd76e456edc2bf8a98d8c190315154c48e741c
Parents: a42b4e5
Author: Marcus Eriksson marc...@apache.org
Authored: Wed May 21 08:11:58 2014 +0200
Committer: Marcus Eriksson marc...@apache.org
Committed: Wed May 21 08:11:58 2014 +0200

--
 CHANGES.txt |  1 +
 .../streaming/management/SessionInfoCompositeData.java  | 12 
 2 files changed, 9 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7abd76e4/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index e7e7c7f..12de385 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -17,6 +17,7 @@
  * Limit user types to the keyspace they are defined in (CASSANDRA-6643)
  * Add validate method to CollectionType (CASSANDRA-7208)
  * New serialization format for UDT values (CASSANDRA-7209)
+ * Fix nodetool netstats (CASSANDRA-7270)
 Merged from 2.0:
  * Always reallocate buffers in HSHA (CASSANDRA-6285)
  * (Hadoop) support authentication in CqlRecordReader (CASSANDRA-7221)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7abd76e4/src/java/org/apache/cassandra/streaming/management/SessionInfoCompositeData.java
--
diff --git 
a/src/java/org/apache/cassandra/streaming/management/SessionInfoCompositeData.java
 
b/src/java/org/apache/cassandra/streaming/management/SessionInfoCompositeData.java
index 8618cca..bef6682 100644
--- 
a/src/java/org/apache/cassandra/streaming/management/SessionInfoCompositeData.java
+++ 
b/src/java/org/apache/cassandra/streaming/management/SessionInfoCompositeData.java
@@ -40,14 +40,16 @@ public class SessionInfoCompositeData
 sendingSummaries,
 state,
 receivingFiles,
-sendingFiles};
+sendingFiles,
+sessionIndex};
 private static final String[] ITEM_DESCS = new String[]{Plan ID,
 Session peer,
 Summaries of 
receiving data,
 Summaries of 
sending data,
 Current session 
state,
 Receiving files,
-Sending files};
+Sending files,
+Session index};
 private static final OpenType?[] ITEM_TYPES;
 
 public static final CompositeType COMPOSITE_TYPE;
@@ -60,7 +62,8 @@ public class SessionInfoCompositeData
 
ArrayType.getArrayType(StreamSummaryCompositeData.COMPOSITE_TYPE),
 SimpleType.STRING,
 
ArrayType.getArrayType(ProgressInfoCompositeData.COMPOSITE_TYPE),
-
ArrayType.getArrayType(ProgressInfoCompositeData.COMPOSITE_TYPE)};
+
ArrayType.getArrayType(ProgressInfoCompositeData.COMPOSITE_TYPE),
+SimpleType.INTEGER};
 COMPOSITE_TYPE = new CompositeType(SessionInfo.class.getName(),
SessionInfo,
ITEM_NAMES,
@@ -97,6 +100,7 @@ public class SessionInfoCompositeData
 };
 valueMap.put(ITEM_NAMES[5], 
toArrayOfCompositeData(sessionInfo.getReceivingFiles(), fromProgressInfo));
 valueMap.put(ITEM_NAMES[6], 
toArrayOfCompositeData(sessionInfo.getSendingFiles(), fromProgressInfo));
+valueMap.put(ITEM_NAMES[7], sessionInfo.sessionIndex);
 try
 {
 return new CompositeDataSupport(COMPOSITE_TYPE, valueMap);
@@ -129,7 +133,7 @@ public class SessionInfoCompositeData
 }
 };
  

[1/2] git commit: Fix nodetool netstats

2014-05-21 Thread marcuse
Repository: cassandra
Updated Branches:
  refs/heads/trunk c89c37802 - 68ea4895e


Fix nodetool netstats

Patch by marcuse; reviewed by JoshuaMcKenzie for CASSANDRA-7270


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

Branch: refs/heads/trunk
Commit: 7abd76e456edc2bf8a98d8c190315154c48e741c
Parents: a42b4e5
Author: Marcus Eriksson marc...@apache.org
Authored: Wed May 21 08:11:58 2014 +0200
Committer: Marcus Eriksson marc...@apache.org
Committed: Wed May 21 08:11:58 2014 +0200

--
 CHANGES.txt |  1 +
 .../streaming/management/SessionInfoCompositeData.java  | 12 
 2 files changed, 9 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7abd76e4/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index e7e7c7f..12de385 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -17,6 +17,7 @@
  * Limit user types to the keyspace they are defined in (CASSANDRA-6643)
  * Add validate method to CollectionType (CASSANDRA-7208)
  * New serialization format for UDT values (CASSANDRA-7209)
+ * Fix nodetool netstats (CASSANDRA-7270)
 Merged from 2.0:
  * Always reallocate buffers in HSHA (CASSANDRA-6285)
  * (Hadoop) support authentication in CqlRecordReader (CASSANDRA-7221)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7abd76e4/src/java/org/apache/cassandra/streaming/management/SessionInfoCompositeData.java
--
diff --git 
a/src/java/org/apache/cassandra/streaming/management/SessionInfoCompositeData.java
 
b/src/java/org/apache/cassandra/streaming/management/SessionInfoCompositeData.java
index 8618cca..bef6682 100644
--- 
a/src/java/org/apache/cassandra/streaming/management/SessionInfoCompositeData.java
+++ 
b/src/java/org/apache/cassandra/streaming/management/SessionInfoCompositeData.java
@@ -40,14 +40,16 @@ public class SessionInfoCompositeData
 sendingSummaries,
 state,
 receivingFiles,
-sendingFiles};
+sendingFiles,
+sessionIndex};
 private static final String[] ITEM_DESCS = new String[]{Plan ID,
 Session peer,
 Summaries of 
receiving data,
 Summaries of 
sending data,
 Current session 
state,
 Receiving files,
-Sending files};
+Sending files,
+Session index};
 private static final OpenType?[] ITEM_TYPES;
 
 public static final CompositeType COMPOSITE_TYPE;
@@ -60,7 +62,8 @@ public class SessionInfoCompositeData
 
ArrayType.getArrayType(StreamSummaryCompositeData.COMPOSITE_TYPE),
 SimpleType.STRING,
 
ArrayType.getArrayType(ProgressInfoCompositeData.COMPOSITE_TYPE),
-
ArrayType.getArrayType(ProgressInfoCompositeData.COMPOSITE_TYPE)};
+
ArrayType.getArrayType(ProgressInfoCompositeData.COMPOSITE_TYPE),
+SimpleType.INTEGER};
 COMPOSITE_TYPE = new CompositeType(SessionInfo.class.getName(),
SessionInfo,
ITEM_NAMES,
@@ -97,6 +100,7 @@ public class SessionInfoCompositeData
 };
 valueMap.put(ITEM_NAMES[5], 
toArrayOfCompositeData(sessionInfo.getReceivingFiles(), fromProgressInfo));
 valueMap.put(ITEM_NAMES[6], 
toArrayOfCompositeData(sessionInfo.getSendingFiles(), fromProgressInfo));
+valueMap.put(ITEM_NAMES[7], sessionInfo.sessionIndex);
 try
 {
 return new CompositeDataSupport(COMPOSITE_TYPE, valueMap);
@@ -129,7 +133,7 @@ public class SessionInfoCompositeData
 }
 };
 

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

2014-05-21 Thread marcuse
Merge branch 'cassandra-2.1' into trunk


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

Branch: refs/heads/trunk
Commit: 68ea4895ea0c78d5f8029cfb262c61c6f18efe95
Parents: c89c378 7abd76e
Author: Marcus Eriksson marc...@apache.org
Authored: Wed May 21 08:13:46 2014 +0200
Committer: Marcus Eriksson marc...@apache.org
Committed: Wed May 21 08:13:46 2014 +0200

--
 CHANGES.txt |  1 +
 .../streaming/management/SessionInfoCompositeData.java  | 12 
 2 files changed, 9 insertions(+), 4 deletions(-)
--


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



[jira] [Created] (CASSANDRA-7278) NPE in StorageProxy.java:1920

2014-05-21 Thread Duncan Sands (JIRA)
Duncan Sands created CASSANDRA-7278:
---

 Summary: NPE in StorageProxy.java:1920
 Key: CASSANDRA-7278
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7278
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: Cassandra 2.07, x86-64 ubuntu 12.04
Reporter: Duncan Sands
Priority: Minor
 Attachments: sl

Got this this morning under heavy load:

ERROR [ReadStage:128] 2014-05-21 07:59:03,274 CassandraDaemon.java (line 198) 
Exception in thread Thread[ReadStage:128,5,main]
java.lang.RuntimeException: java.lang.NullPointerException
at 
org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1920)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.NullPointerException
at 
org.apache.cassandra.io.util.RandomAccessReader.getTotalBufferSize(RandomAccessReader.java:157)
at 
org.apache.cassandra.io.compress.CompressedRandomAccessReader.getTotalBufferSize(CompressedRandomAccessReader.java:159)
at 
org.apache.cassandra.service.FileCacheService.get(FileCacheService.java:96)
at 
org.apache.cassandra.io.util.PoolingSegmentedFile.getSegment(PoolingSegmentedFile.java:36)
at 
org.apache.cassandra.io.sstable.SSTableReader.getFileDataInput(SSTableReader.java:1195)
at 
org.apache.cassandra.db.columniterator.SimpleSliceReader.init(SimpleSliceReader.java:57)
at 
org.apache.cassandra.db.columniterator.SSTableSliceIterator.createReader(SSTableSliceIterator.java:65)
at 
org.apache.cassandra.db.columniterator.SSTableSliceIterator.init(SSTableSliceIterator.java:42)
at 
org.apache.cassandra.db.filter.SliceQueryFilter.getSSTableColumnIterator(SliceQueryFilter.java:167)
at 
org.apache.cassandra.db.filter.QueryFilter.getSSTableColumnIterator(QueryFilter.java:62)
at 
org.apache.cassandra.db.CollationController.collectAllData(CollationController.java:250)
at 
org.apache.cassandra.db.CollationController.getTopLevelColumns(CollationController.java:53)
at 
org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(ColumnFamilyStore.java:1540)
at 
org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1369)
at org.apache.cassandra.db.Keyspace.getRow(Keyspace.java:327)
at 
org.apache.cassandra.db.SliceFromReadCommand.getRow(SliceFromReadCommand.java:65)
at 
org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:1352)
at 
org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1916)
... 3 more


There had just been a 20 second GC pause, and the system was dropping messages 
like mad, see attached log snippet.



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


[jira] [Commented] (CASSANDRA-6525) Cannot select data which using WHERE

2014-05-21 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-6525:
-

bq. Truncates don't reset the SSTable generation counter

Fair enough (though it would still feel cleaner to invalidate the key cache 
entries, even if it don't result in a bug). But anyway, +1 on the patch.

 Cannot select data which using WHERE
 --

 Key: CASSANDRA-6525
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6525
 Project: Cassandra
  Issue Type: Bug
 Environment: Linux RHEL5
 RAM: 1GB
 Cassandra 2.0.3
 CQL spec 3.1.1
 Thrift protocol 19.38.0
Reporter: Silence Chow
Assignee: Tyler Hobbs
 Fix For: 2.0.8

 Attachments: 6525-2.0.txt, 6981_test.py


 I am developing a system on my single machine using VMware Player with 1GB 
 Ram and 1Gb HHD. When I select all data, I didn't have any problems. But when 
 I using WHERE and it has just below 10 records. I have got this error in 
 system log:
 {noformat}
 ERROR [ReadStage:41] 2013-12-25 18:52:11,913 CassandraDaemon.java (line 187) 
 Exception in thread Thread[ReadStage:41,5,main]
 java.io.IOError: java.io.EOFException
 at org.apache.cassandra.db.Column$1.computeNext(Column.java:79)
 at org.apache.cassandra.db.Column$1.computeNext(Column.java:64)
 at 
 com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
 at 
 com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
 at 
 org.apache.cassandra.db.columniterator.SimpleSliceReader.computeNext(SimpleSliceReader.java:88)
 at 
 org.apache.cassandra.db.columniterator.SimpleSliceReader.computeNext(SimpleSliceReader.java:37)
 at 
 com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
 at 
 com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
 at 
 org.apache.cassandra.db.columniterator.SSTableSliceIterator.hasNext(SSTableSliceIterator.java:82)
 at 
 org.apache.cassandra.db.filter.QueryFilter$2.getNext(QueryFilter.java:157)
 at 
 org.apache.cassandra.db.filter.QueryFilter$2.hasNext(QueryFilter.java:140)
 at 
 org.apache.cassandra.utils.MergeIterator$Candidate.advance(MergeIterator.java:144)
 at 
 org.apache.cassandra.utils.MergeIterator$ManyToOne.init(MergeIterator.java:87)
 at org.apache.cassandra.utils.MergeIterator.get(MergeIterator.java:46)
 at 
 org.apache.cassandra.db.filter.QueryFilter.collateColumns(QueryFilter.java:120)
 at 
 org.apache.cassandra.db.filter.QueryFilter.collateOnDiskAtom(QueryFilter.java:80)
 at 
 org.apache.cassandra.db.filter.QueryFilter.collateOnDiskAtom(QueryFilter.java:72)
 at 
 org.apache.cassandra.db.CollationController.collectAllData(CollationController.java:297)
 at 
 org.apache.cassandra.db.CollationController.getTopLevelColumns(CollationController.java:53)
 at 
 org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(ColumnFamilyStore.java:1487)
 at 
 org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1306)
 at org.apache.cassandra.db.Keyspace.getRow(Keyspace.java:332)
 at 
 org.apache.cassandra.db.SliceFromReadCommand.getRow(SliceFromReadCommand.java:65)
 at 
 org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:1401)
 at 
 org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1936)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
 at java.lang.Thread.run(Unknown Source)
 Caused by: java.io.EOFException
 at java.io.RandomAccessFile.readFully(Unknown Source)
 at java.io.RandomAccessFile.readFully(Unknown Source)
 at 
 org.apache.cassandra.io.util.RandomAccessReader.readBytes(RandomAccessReader.java:348)
 at 
 org.apache.cassandra.utils.ByteBufferUtil.read(ByteBufferUtil.java:392)
 at 
 org.apache.cassandra.utils.ByteBufferUtil.readWithShortLength(ByteBufferUtil.java:371)
 at 
 org.apache.cassandra.db.OnDiskAtom$Serializer.deserializeFromSSTable(OnDiskAtom.java:74)
 at org.apache.cassandra.db.Column$1.computeNext(Column.java:75)
 ... 27 more
 {noformat}
 E.g.
 {{SELECT * FROM table;}}
 Its fine.
 {{SELECT * FROM table WHERE field = 'N';}}
 field is the partition key.
 Its said Request did not complete within rpc_timeout. in cqlsh



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


[jira] [Updated] (CASSANDRA-7201) Regression: ColumnFamilyStoreTest, NativeCellTest, SSTableMetadataTest unit tests on 2.1

2014-05-21 Thread Benedict (JIRA)

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

Benedict updated CASSANDRA-7201:


Attachment: 7201.2.txt

Looks like we use non-byte methods on ByteBuffer for name as well (rarely, 
which is why I didn't spot it). I've modified AstractNativeCell to return 
Java-native byte order ByteBuffers for all calls to value() and get(int) 
(retrieving cell name)

 Regression: ColumnFamilyStoreTest, NativeCellTest, SSTableMetadataTest unit 
 tests on 2.1
 

 Key: CASSANDRA-7201
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7201
 Project: Cassandra
  Issue Type: Test
  Components: Tests
Reporter: Michael Shuler
Assignee: Benedict
  Labels: qa-resolved
 Fix For: 2.1 rc1

 Attachments: 7201.2.txt, 7201.txt


 http://cassci.datastax.com/job/cassandra-2.1_utest/252/testReport/
 {noformat}
 REGRESSION:  
 org.apache.cassandra.db.ColumnFamilyStoreTest.testSliceByNamesCommandOnUUIDTypeSCF
 Error Message:
 null
 Stack Trace:
 java.lang.NullPointerException
 at 
 org.apache.cassandra.db.ColumnFamilyStoreTest.testSliceByNamesCommandOnUUIDTypeSCF(ColumnFamilyStoreTest.java:992)
 REGRESSION:  org.apache.cassandra.db.NativeCellTest.testCells
 Error Message:
 null
 Stack Trace:
 java.lang.IllegalArgumentException
 at java.nio.Buffer.position(Buffer.java:236)
 at 
 org.apache.cassandra.db.context.CounterContext.updateDigest(CounterContext.java:659)
 at 
 org.apache.cassandra.db.NativeCounterCell.updateDigest(NativeCounterCell.java:139)
 at org.apache.cassandra.db.NativeCellTest.test(NativeCellTest.java:148)
 at 
 org.apache.cassandra.db.NativeCellTest.testCells(NativeCellTest.java:132)
 REGRESSION:  
 org.apache.cassandra.io.sstable.SSTableMetadataTest.testLegacyCounterShardTracking
 Error Message:
 null
 Stack Trace:
 junit.framework.AssertionFailedError: 
 at 
 org.apache.cassandra.io.sstable.SSTableMetadataTest.testLegacyCounterShardTracking(SSTableMetadataTest.java:306)
 {noformat}
 All 3 tests bisect to:
 {noformat}
 commit 1ac72f637cdfc9876d2d121302061e46ac104bf8
 Author: Jonathan Ellis jbel...@apache.org
 Date:   Thu May 8 16:44:35 2014 -0500
 prefer MemoryUtil.getByteBuffer to JNA Native.getDirectByteBuffer; 
 specify native endian on the former
 patch by bes; reviewed by jbellis for CASSANDRA-6575
 {noformat}



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


[jira] [Commented] (CASSANDRA-6146) CQL-native stress

2014-05-21 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-6146:
-

bq.  Create your tables with cqlsh -f, then run stress which can introspect 
what you just created.

I actually like the idea of having the schema in the profile file because that 
way we can ship with a bunch of reasonable and self contained stress 
scenario/profile. If the schema is not in the profile file, then we'd have to 
create some additional script file for each scenario that basically does the 
'cqlsh -f' of whatever table we use for the profile. Possible, but having it 
all self contained in one file is just more convenient.

That said, I can agree with stress not reinventing schema management, but I 
don't think it has to. I'd also make the definitions optional as Jake 
suggested. I'd typically change slightly the profile to always include the 
keyspace and table name, so:
{noformat}
keyspace: stresscql
keyspace_definition: CREATE KEYSPACE stresscql WITH replication = {'class': 
'SimpleStrategy', 'replication_factor': 1};

table: typestest
table_definition:  CREATE TABLE typestest ...
{noformat}
That way the *_definition parts can be optional and the stress tool don't have 
to parse the create statements to figure out the keyspace and table name.

Unrelated bikeshedding: I'd rename '-schema' to '-profile'.

 CQL-native stress
 -

 Key: CASSANDRA-6146
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6146
 Project: Cassandra
  Issue Type: New Feature
  Components: Tools
Reporter: Jonathan Ellis
Assignee: T Jake Luciani
 Fix For: 2.1 rc1

 Attachments: 6146.txt


 The existing CQL support in stress is not worth discussing.  We need to 
 start over, and we might as well kill two birds with one stone and move to 
 the native protocol while we're at it.



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


[jira] [Commented] (CASSANDRA-6146) CQL-native stress

2014-05-21 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-6146:
-

bq. Okay, but why not define them by asking the cluster?

I'm not sure how you would do this? Just knowing the data types isn't enough to 
do anything other than a very generic profile. That said, either making the CQL 
to generate the tables optional, or generating it ourselves from the column 
spec if it doesn't exist, seems appropriate. I think perhaps the Keyspace 
should be left to the user to create, as the replication settings etc. are 
cluster dependent, not profile dependent.

Note this is all pre-review; I've only briefly looked at the code, but I don't 
want to miss the bike shedding.

 CQL-native stress
 -

 Key: CASSANDRA-6146
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6146
 Project: Cassandra
  Issue Type: New Feature
  Components: Tools
Reporter: Jonathan Ellis
Assignee: T Jake Luciani
 Fix For: 2.1 rc1

 Attachments: 6146.txt


 The existing CQL support in stress is not worth discussing.  We need to 
 start over, and we might as well kill two birds with one stone and move to 
 the native protocol while we're at it.



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


[jira] [Commented] (CASSANDRA-6357) Flush memtables to separate directory

2014-05-21 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-6357:
-

LGTM, +1

 Flush memtables to separate directory
 -

 Key: CASSANDRA-6357
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6357
 Project: Cassandra
  Issue Type: New Feature
  Components: Core
Reporter: Patrick McFadin
Assignee: Jonathan Ellis
Priority: Minor
  Labels: performance
 Fix For: 2.1 rc1

 Attachments: 6357-revert-v2.txt, 6357-revert-v3.txt, 6357-revert.txt, 
 6357-v2.txt, 6357.txt, c6357-2.1-stress-write-adj-ops-sec.png, 
 c6357-2.1-stress-write-latency-99th.png, 
 c6357-2.1-stress-write-latency-median.png, 
 c6357-stress-write-latency-99th-1.png


 Flush writers are a critical element for keeping a node healthy. When several 
 compactions run on systems with low performing data directories, IO becomes a 
 premium. Once the disk subsystem is saturated, write IO is blocked which will 
 cause flush writer threads to backup. Since memtables are large blocks of 
 memory in the JVM, too much blocking can cause excessive GC over time 
 degrading performance. In the worst case causing an OOM.
 Since compaction is running on the data directories. My proposal is to create 
 a separate directory for flushing memtables. Potentially we can use the same 
 methodology of keeping the commit log separate and minimize disk contention 
 against the critical function of the flushwriter. 



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


[jira] [Updated] (CASSANDRA-7084) o.a.c.db.RecoveryManagerTest.testNothingToRecover Unit Test Flaps in 2.0

2014-05-21 Thread Benedict (JIRA)

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

Benedict updated CASSANDRA-7084:


Attachment: 7084.2.txt

Attached updated patch with nit fixed

 o.a.c.db.RecoveryManagerTest.testNothingToRecover Unit Test Flaps in 2.0
 

 Key: CASSANDRA-7084
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7084
 Project: Cassandra
  Issue Type: Test
  Components: Tests
Reporter: Michael Shuler
Assignee: Benedict
Priority: Minor
  Labels: qa-resolved
 Fix For: 2.0.8

 Attachments: 7084.2.txt, 7084.txt


 Example:
   http://cassci.datastax.com/job/cassandra-2.0_utest/326/
 (this test appears to pass consistently in 1.2 and 2.1 with a quick glance - 
 will test out the other branches more thoroughly and bisect)
 {noformat}
 REGRESSION:  org.apache.cassandra.db.RecoveryManagerTest.testNothingToRecover
 Error Message:
 java.io.FileNotFoundException: 
 /var/lib/jenkins/jobs/cassandra-2.0_test/workspace/build/test/cassandra/commitlog/CommitLog-3-1398354429966.log
  (No such file or directory)
 Stack Trace:
 java.lang.RuntimeException: java.io.FileNotFoundException: 
 /var/lib/jenkins/jobs/cassandra-2.0_test/workspace/build/test/cassandra/commitlog/CommitLog-3-1398354429966.log
  (No such file or directory)
   at 
 org.apache.cassandra.io.util.RandomAccessReader.open(RandomAccessReader.java:102)
   at 
 org.apache.cassandra.io.util.RandomAccessReader.open(RandomAccessReader.java:90)
   at 
 org.apache.cassandra.db.commitlog.CommitLogReplayer.recover(CommitLogReplayer.java:186)
   at 
 org.apache.cassandra.db.commitlog.CommitLogReplayer.recover(CommitLogReplayer.java:95)
   at 
 org.apache.cassandra.db.commitlog.CommitLog.recover(CommitLog.java:151)
   at 
 org.apache.cassandra.db.commitlog.CommitLog.recover(CommitLog.java:131)
   at 
 org.apache.cassandra.db.RecoveryManagerTest.testNothingToRecover(RecoveryManagerTest.java:42)
 Caused by: java.io.FileNotFoundException: 
 /var/lib/jenkins/jobs/cassandra-2.0_test/workspace/build/test/cassandra/commitlog/CommitLog-3-1398354429966.log
  (No such file or directory)
   at java.io.RandomAccessFile.open(Native Method)
   at java.io.RandomAccessFile.init(RandomAccessFile.java:241)
   at 
 org.apache.cassandra.io.util.RandomAccessReader.init(RandomAccessReader.java:58)
   at 
 org.apache.cassandra.io.util.RandomAccessReader.open(RandomAccessReader.java:98)
 {noformat}



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


[jira] [Commented] (CASSANDRA-6357) Flush memtables to separate directory

2014-05-21 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-6357:
-

Whoops, +1'd the wrong ticket. Directories.getSnapshotManifestFile() references 
the old getDirectoryForCompactedSSTables(). Also, the yaml docs for the commit 
log are probably not worth reverting, as they're better now



 Flush memtables to separate directory
 -

 Key: CASSANDRA-6357
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6357
 Project: Cassandra
  Issue Type: New Feature
  Components: Core
Reporter: Patrick McFadin
Assignee: Jonathan Ellis
Priority: Minor
  Labels: performance
 Fix For: 2.1 rc1

 Attachments: 6357-revert-v2.txt, 6357-revert-v3.txt, 6357-revert.txt, 
 6357-v2.txt, 6357.txt, c6357-2.1-stress-write-adj-ops-sec.png, 
 c6357-2.1-stress-write-latency-99th.png, 
 c6357-2.1-stress-write-latency-median.png, 
 c6357-stress-write-latency-99th-1.png


 Flush writers are a critical element for keeping a node healthy. When several 
 compactions run on systems with low performing data directories, IO becomes a 
 premium. Once the disk subsystem is saturated, write IO is blocked which will 
 cause flush writer threads to backup. Since memtables are large blocks of 
 memory in the JVM, too much blocking can cause excessive GC over time 
 degrading performance. In the worst case causing an OOM.
 Since compaction is running on the data directories. My proposal is to create 
 a separate directory for flushing memtables. Potentially we can use the same 
 methodology of keeping the commit log separate and minimize disk contention 
 against the critical function of the flushwriter. 



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


[jira] [Issue Comment Deleted] (CASSANDRA-6357) Flush memtables to separate directory

2014-05-21 Thread Benedict (JIRA)

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

Benedict updated CASSANDRA-6357:


Comment: was deleted

(was: LGTM, +1)

 Flush memtables to separate directory
 -

 Key: CASSANDRA-6357
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6357
 Project: Cassandra
  Issue Type: New Feature
  Components: Core
Reporter: Patrick McFadin
Assignee: Jonathan Ellis
Priority: Minor
  Labels: performance
 Fix For: 2.1 rc1

 Attachments: 6357-revert-v2.txt, 6357-revert-v3.txt, 6357-revert.txt, 
 6357-v2.txt, 6357.txt, c6357-2.1-stress-write-adj-ops-sec.png, 
 c6357-2.1-stress-write-latency-99th.png, 
 c6357-2.1-stress-write-latency-median.png, 
 c6357-stress-write-latency-99th-1.png


 Flush writers are a critical element for keeping a node healthy. When several 
 compactions run on systems with low performing data directories, IO becomes a 
 premium. Once the disk subsystem is saturated, write IO is blocked which will 
 cause flush writer threads to backup. Since memtables are large blocks of 
 memory in the JVM, too much blocking can cause excessive GC over time 
 degrading performance. In the worst case causing an OOM.
 Since compaction is running on the data directories. My proposal is to create 
 a separate directory for flushing memtables. Potentially we can use the same 
 methodology of keeping the commit log separate and minimize disk contention 
 against the critical function of the flushwriter. 



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


[jira] [Commented] (CASSANDRA-7139) Default concurrent_compactors is probably too high

2014-05-21 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-7139:
-

LGTM, +1

 Default concurrent_compactors is probably too high
 --

 Key: CASSANDRA-7139
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7139
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Benedict
Assignee: Jonathan Ellis
Priority: Minor
 Fix For: 2.1 rc1

 Attachments: 7139.txt


 The default number of concurrent compactors is probably too high for modern 
 hardware with spinning disks for storage: A modern blade can easily have 24+ 
 Cores, which would result in a default of 24 concurrent compactions. This not 
 only increases random IO, it also keeps around a lot of obsoleted files for 
 an unnecessarily long time, as each compaction keeps references to any 
 possibly overlapping files that it isn't itself compacting - but these can 
 have been obsoleted part way through by compactions that finished earlier. If 
 you factor in the default compaction throughput rate of 16Mb/s, anything but 
 a single default concurrent_compactor makes very little sense, as a single 
 thread should always be able to handle 16Mb/s, will cause less interference 
 with other processes, and permits obsoleted files to be immediately removed.
 See [http://imgur.com/HDqhxFp] for a graph demonstrating the result of making 
 this change on a box with 24-cores and 8Tb of storage (first spike is default 
 settings)



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


git commit: Fix 2ndary index queries with DESC clustering order

2014-05-21 Thread slebresne
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 786396eaf - 20e058b2b


Fix 2ndary index queries with DESC clustering order

patch by slebresne; reviewed by thobbs for CASSANDRA-6950


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

Branch: refs/heads/cassandra-2.0
Commit: 20e058b2bd0ae452966afa7f548bd305e2f742c4
Parents: 786396e
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed May 21 11:29:42 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed May 21 11:29:42 2014 +0200

--
 CHANGES.txt |  1 +
 .../cql3/statements/SelectStatement.java| 21 +++-
 2 files changed, 21 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/20e058b2/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index df3741e..bd0031e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -46,6 +46,7 @@
  * reduce garbage on codec flag deserialization (CASSANDRA-7244) 
  * Proper null handle for IF with map element access (CASSANDRA-7155)
  * Improve compaction visibility (CASSANDRA-7242)
+ * Fix 2ndary index queries with DESC clustering order (CASSANDRA-6950)
 Merged from 1.2:
  * Add Cloudstack snitch (CASSANDRA-7147)
  * Update system.peers correctly when relocating tokens (CASSANDRA-7126)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/20e058b2/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
--
diff --git a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java 
b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
index 2468eb9..6b4309f 100644
--- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
@@ -927,7 +927,14 @@ public class SelectStatement implements CQLStatement, 
MeasurableForPreparedCache
 throw new 
InvalidRequestException(String.format(Unsupported null value for indexed 
column %s, name));
 if (value.remaining()  0x)
 throw new InvalidRequestException(Index 
expression values may not be larger than 64K);
-expressions.add(new IndexExpression(name.name.key, 
slice.getIndexOperator(b), value));
+
+IndexOperator op = slice.getIndexOperator(b);
+// If the underlying comparator for name is reversed, 
we need to reverse the IndexOperator: user operation
+// always refer to the forward sorting even if the 
clustering order is reversed, but the 2ndary code does
+// use the underlying comparator as is.
+if (name.type instanceof ReversedType)
+op = reverse(op);
+expressions.add(new IndexExpression(name.name.key, op, 
value));
 }
 }
 }
@@ -949,6 +956,18 @@ public class SelectStatement implements CQLStatement, 
MeasurableForPreparedCache
 return expressions;
 }
 
+private static IndexOperator reverse(IndexOperator op)
+{
+switch (op)
+{
+case LT:  return IndexOperator.GT;
+case LTE: return IndexOperator.GTE;
+case GT:  return IndexOperator.LT;
+case GTE: return IndexOperator.LTE;
+default: return op;
+}
+}
+
 private ResultSet process(ListRow rows, ListByteBuffer variables, int 
limit, long now) throws InvalidRequestException
 {
 Selection.ResultSetBuilder result = selection.resultSetBuilder(now);



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

2014-05-21 Thread slebresne
Merge branch 'cassandra-2.0' into cassandra-2.1

Conflicts:
CHANGES.txt
src/java/org/apache/cassandra/cql3/statements/SelectStatement.java


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

Branch: refs/heads/cassandra-2.1
Commit: 94f25ce15923e9a790a01a8210e141606f9091a4
Parents: 7abd76e 20e058b
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed May 21 11:36:18 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed May 21 11:36:18 2014 +0200

--
 CHANGES.txt |  1 +
 .../cql3/statements/SelectStatement.java| 20 +++-
 2 files changed, 20 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/94f25ce1/CHANGES.txt
--
diff --cc CHANGES.txt
index 12de385,bd0031e..0b8be6e
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -57,6 -28,25 +57,7 @@@ Merged from 2.0
   * Re-add parameter columns to tracing session (CASSANDRA-6942)
   * Fix writetime/ttl functions for static columns (CASSANDRA-7081)
   * Suggest CTRL-C or semicolon after three blank lines in cqlsh 
(CASSANDRA-7142)
 - * (Hadoop) support authentication in CqlRecordReader (CASSANDRA-7221)
 - * (Hadoop) Close java driver Cluster in CQLRR.close (CASSANDRA-7228)
 - * Fix potential SlabAllocator yield-starvation (CASSANDRA-7133)
 - * Warn when 'USING TIMESTAMP' is used on a CAS BATCH (CASSANDRA-7067)
 - * Starting threads in OutboundTcpConnectionPool constructor causes race 
conditions (CASSANDRA-7177)
 - * return all cpu values from BackgroundActivityMonitor.readAndCompute 
(CASSANDRA-7183)
 - * fix c* launch issues on Russian os's due to output of linux 'free' cmd 
(CASSANDRA-6162)
 - * Fix disabling autocompaction (CASSANDRA-7187)
 - * Fix potential NumberFormatException when deserializing IntegerType 
(CASSANDRA-7088)
 - * cqlsh can't tab-complete disabling compaction (CASSANDRA-7185)
 - * cqlsh: Accept and execute CQL statement(s) from command-line parameter 
(CASSANDRA-7172)
 - * Fix IllegalStateException in CqlPagingRecordReader (CASSANDRA-7198)
 - * Fix the InvertedIndex trigger example (CASSANDRA-7211)
 - * Add --resolve-ip option to 'nodetool ring' (CASSANDRA-7210)
 - * Fix duplicated error messages on directory creation error at startup 
(CASSANDRA-5818)
 - * reduce garbage on codec flag deserialization (CASSANDRA-7244) 
 - * Proper null handle for IF with map element access (CASSANDRA-7155)
 - * Improve compaction visibility (CASSANDRA-7242)
+  * Fix 2ndary index queries with DESC clustering order (CASSANDRA-6950)
  Merged from 1.2:
   * Add Cloudstack snitch (CASSANDRA-7147)
   * Update system.peers correctly when relocating tokens (CASSANDRA-7126)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/94f25ce1/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
--
diff --cc src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
index 55ce6f9,6b4309f..ca990a4
--- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
@@@ -927,8 -922,19 +927,14 @@@ public class SelectStatement implement
  {
  if (slice.hasBound(b))
  {
 -ByteBuffer value = slice.bound(b, variables);
 -if (value == null)
 -throw new 
InvalidRequestException(String.format(Unsupported null value for indexed 
column %s, name));
 -if (value.remaining()  0x)
 -throw new InvalidRequestException(Index 
expression values may not be larger than 64K);
 -
 +ByteBuffer value = validateIndexedValue(def, 
slice.bound(b, options));
- expressions.add(new IndexExpression(def.name.bytes, 
slice.getIndexOperator(b), value));
+ IndexOperator op = slice.getIndexOperator(b);
+ // If the underlying comparator for name is reversed, 
we need to reverse the IndexOperator: user operation
+ // always refer to the forward sorting even if the 
clustering order is reversed, but the 2ndary code does
+ // use the underlying comparator as is.
+ if (name.type instanceof ReversedType)
+ op = reverse(op);
 -expressions.add(new IndexExpression(name.name.key, 
op, value));
++

[1/2] git commit: Fix 2ndary index queries with DESC clustering order

2014-05-21 Thread slebresne
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 7abd76e45 - 94f25ce15


Fix 2ndary index queries with DESC clustering order

patch by slebresne; reviewed by thobbs for CASSANDRA-6950


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

Branch: refs/heads/cassandra-2.1
Commit: 20e058b2bd0ae452966afa7f548bd305e2f742c4
Parents: 786396e
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed May 21 11:29:42 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed May 21 11:29:42 2014 +0200

--
 CHANGES.txt |  1 +
 .../cql3/statements/SelectStatement.java| 21 +++-
 2 files changed, 21 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/20e058b2/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index df3741e..bd0031e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -46,6 +46,7 @@
  * reduce garbage on codec flag deserialization (CASSANDRA-7244) 
  * Proper null handle for IF with map element access (CASSANDRA-7155)
  * Improve compaction visibility (CASSANDRA-7242)
+ * Fix 2ndary index queries with DESC clustering order (CASSANDRA-6950)
 Merged from 1.2:
  * Add Cloudstack snitch (CASSANDRA-7147)
  * Update system.peers correctly when relocating tokens (CASSANDRA-7126)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/20e058b2/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
--
diff --git a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java 
b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
index 2468eb9..6b4309f 100644
--- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
@@ -927,7 +927,14 @@ public class SelectStatement implements CQLStatement, 
MeasurableForPreparedCache
 throw new 
InvalidRequestException(String.format(Unsupported null value for indexed 
column %s, name));
 if (value.remaining()  0x)
 throw new InvalidRequestException(Index 
expression values may not be larger than 64K);
-expressions.add(new IndexExpression(name.name.key, 
slice.getIndexOperator(b), value));
+
+IndexOperator op = slice.getIndexOperator(b);
+// If the underlying comparator for name is reversed, 
we need to reverse the IndexOperator: user operation
+// always refer to the forward sorting even if the 
clustering order is reversed, but the 2ndary code does
+// use the underlying comparator as is.
+if (name.type instanceof ReversedType)
+op = reverse(op);
+expressions.add(new IndexExpression(name.name.key, op, 
value));
 }
 }
 }
@@ -949,6 +956,18 @@ public class SelectStatement implements CQLStatement, 
MeasurableForPreparedCache
 return expressions;
 }
 
+private static IndexOperator reverse(IndexOperator op)
+{
+switch (op)
+{
+case LT:  return IndexOperator.GT;
+case LTE: return IndexOperator.GTE;
+case GT:  return IndexOperator.LT;
+case GTE: return IndexOperator.LTE;
+default: return op;
+}
+}
+
 private ResultSet process(ListRow rows, ListByteBuffer variables, int 
limit, long now) throws InvalidRequestException
 {
 Selection.ResultSetBuilder result = selection.resultSetBuilder(now);



[jira] [Commented] (CASSANDRA-7274) Better display table organization on desc table via primary key list

2014-05-21 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-7274:
--

Wouldn't this create a composite partition key of size 1?

 Better display table organization on desc table via primary key list
 

 Key: CASSANDRA-7274
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7274
 Project: Cassandra
  Issue Type: Improvement
Reporter: G Gordon Worley III

 In cqlsh, the desc table command does not make it sufficiently clear which 
 columns are part of the row key and which are clustering keys.
 A simple change to the primary key list, though, would make it easier to tell.
 Consider the following table definition:
 {code}
 create table my_table {
   first_column text,
   second_column text,
   third_column text,
   primary key (first_column, second_column, third_column)
 }
 {code}
 This table has a row key of first_column and clustering keys of 
 second_column, third_column. But if the user intended for the table to have 
 all three in the row key, the correct definition would be:
 {code}
 create table my_table {
   first_column text,
   second_column text,
   third_column text,
   primary key ((first_column, second_column, third_column))
 }
 {code}
 But this is a sufficiently subtle difference that the first may be mistaken 
 for the second or vice-versa.
 My suggested solution is to always wrap the row key in parentheses. This is 
 already supported by create table syntax, so it's just a matter of changing 
 desc table to display the create table statement with the primary key always 
 in parentheses, like so:
 {code}
 create table my_table {
   first_column text,
   second_column text,
   third_column text,
   primary key ((first_column), second_column, third_column)
 }
 {code}



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


[jira] [Commented] (CASSANDRA-6950) Secondary index query fails with tc range query when ordered by DESC

2014-05-21 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-6950:
-

bq.  Fix it in the logical place, and then break on the thrift side, to 
preserve the current behavior?

We could, but really, I didn't meant to imply that the way the attached patch 
fixes it is illogical per-se. I think it's fine and simple. So, because I want 
to release 2.0.8 and we should have this in, committed the attached patch based 
on Tyler +1. We can bikeshed later if needs be.

 Secondary index query fails with tc range query when ordered by DESC
 

 Key: CASSANDRA-6950
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6950
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: RHEL 6.3 virtual guest, 
 apache-cassandra-2.0.6-SNAPSHOT-src.tar.gz from build #284 (also tried with 
 2.0.5 with CASSANDRA- patch custom-applied with same result).
Reporter: Andre Campeau
Assignee: Sylvain Lebresne
 Fix For: 2.0.8

 Attachments: 6950-pycassa-repro.py, 6950.txt


 create table test4 ( name text, lname text, tc bigint, record text, 
 PRIMARY KEY ((name, lname), tc)) WITH CLUSTERING ORDER BY (tc DESC) AND 
 compaction={'class': 'LeveledCompactionStrategy'};
 create index test4_index ON test4(lname);
 Populate it with some data and non-zero tc values, then try:
 select * from test4 where lname='blah' and tc0 allow filtering;
 And, (0 rows) returned, even though there are rows which should be found.
 When I create the table using CLUSTERING ORDER BY (tc ASC), the above query 
 works. Rows are correctly returned based on the range check.
 Tried various combinations but with descending order on tc nothing works.



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


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

2014-05-21 Thread slebresne
Merge branch 'cassandra-2.1' into trunk


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

Branch: refs/heads/trunk
Commit: a519c0a6d711e3f62526c653797f1aa67806252d
Parents: 68ea489 82be86a
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed May 21 11:42:51 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed May 21 11:42:51 2014 +0200

--
 CHANGES.txt |  1 +
 .../cql3/statements/SelectStatement.java| 20 +++-
 2 files changed, 20 insertions(+), 1 deletion(-)
--


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



[1/4] git commit: Fix 2ndary index queries with DESC clustering order

2014-05-21 Thread slebresne
Repository: cassandra
Updated Branches:
  refs/heads/trunk 68ea4895e - a519c0a6d


Fix 2ndary index queries with DESC clustering order

patch by slebresne; reviewed by thobbs for CASSANDRA-6950


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

Branch: refs/heads/trunk
Commit: 20e058b2bd0ae452966afa7f548bd305e2f742c4
Parents: 786396e
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed May 21 11:29:42 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed May 21 11:29:42 2014 +0200

--
 CHANGES.txt |  1 +
 .../cql3/statements/SelectStatement.java| 21 +++-
 2 files changed, 21 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/20e058b2/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index df3741e..bd0031e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -46,6 +46,7 @@
  * reduce garbage on codec flag deserialization (CASSANDRA-7244) 
  * Proper null handle for IF with map element access (CASSANDRA-7155)
  * Improve compaction visibility (CASSANDRA-7242)
+ * Fix 2ndary index queries with DESC clustering order (CASSANDRA-6950)
 Merged from 1.2:
  * Add Cloudstack snitch (CASSANDRA-7147)
  * Update system.peers correctly when relocating tokens (CASSANDRA-7126)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/20e058b2/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
--
diff --git a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java 
b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
index 2468eb9..6b4309f 100644
--- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
@@ -927,7 +927,14 @@ public class SelectStatement implements CQLStatement, 
MeasurableForPreparedCache
 throw new 
InvalidRequestException(String.format(Unsupported null value for indexed 
column %s, name));
 if (value.remaining()  0x)
 throw new InvalidRequestException(Index 
expression values may not be larger than 64K);
-expressions.add(new IndexExpression(name.name.key, 
slice.getIndexOperator(b), value));
+
+IndexOperator op = slice.getIndexOperator(b);
+// If the underlying comparator for name is reversed, 
we need to reverse the IndexOperator: user operation
+// always refer to the forward sorting even if the 
clustering order is reversed, but the 2ndary code does
+// use the underlying comparator as is.
+if (name.type instanceof ReversedType)
+op = reverse(op);
+expressions.add(new IndexExpression(name.name.key, op, 
value));
 }
 }
 }
@@ -949,6 +956,18 @@ public class SelectStatement implements CQLStatement, 
MeasurableForPreparedCache
 return expressions;
 }
 
+private static IndexOperator reverse(IndexOperator op)
+{
+switch (op)
+{
+case LT:  return IndexOperator.GT;
+case LTE: return IndexOperator.GTE;
+case GT:  return IndexOperator.LT;
+case GTE: return IndexOperator.LTE;
+default: return op;
+}
+}
+
 private ResultSet process(ListRow rows, ListByteBuffer variables, int 
limit, long now) throws InvalidRequestException
 {
 Selection.ResultSetBuilder result = selection.resultSetBuilder(now);



git commit: Fix merge

2014-05-21 Thread slebresne
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 94f25ce15 - 82be86a56


Fix merge


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

Branch: refs/heads/cassandra-2.1
Commit: 82be86a5681a947333a675d7f3a72a202c0049ca
Parents: 94f25ce
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed May 21 11:42:32 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed May 21 11:42:32 2014 +0200

--
 .../cassandra/cql3/statements/SelectStatement.java| 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/82be86a5/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
--
diff --git a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java 
b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
index ca990a4..b212147 100644
--- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
@@ -928,11 +928,11 @@ public class SelectStatement implements CQLStatement, 
MeasurableForPreparedCache
 if (slice.hasBound(b))
 {
 ByteBuffer value = validateIndexedValue(def, 
slice.bound(b, options));
-IndexOperator op = slice.getIndexOperator(b);
+IndexExpression.Operator op = 
slice.getIndexOperator(b);
 // If the underlying comparator for name is reversed, 
we need to reverse the IndexOperator: user operation
 // always refer to the forward sorting even if the 
clustering order is reversed, but the 2ndary code does
 // use the underlying comparator as is.
-if (name.type instanceof ReversedType)
+if (def.type instanceof ReversedType)
 op = reverse(op);
 expressions.add(new IndexExpression(def.name.bytes, 
op, value));
 }
@@ -1004,14 +1004,14 @@ public class SelectStatement implements CQLStatement, 
MeasurableForPreparedCache
 };
 }
 
-private static IndexOperator reverse(IndexOperator op)
+private static IndexExpression.Operator reverse(IndexExpression.Operator 
op)
 {
 switch (op)
 {
-case LT:  return IndexOperator.GT;
-case LTE: return IndexOperator.GTE;
-case GT:  return IndexOperator.LT;
-case GTE: return IndexOperator.LTE;
+case LT:  return IndexExpression.Operator.GT;
+case LTE: return IndexExpression.Operator.GTE;
+case GT:  return IndexExpression.Operator.LT;
+case GTE: return IndexExpression.Operator.LTE;
 default: return op;
 }
 }



[3/4] git commit: Fix merge

2014-05-21 Thread slebresne
Fix merge


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

Branch: refs/heads/trunk
Commit: 82be86a5681a947333a675d7f3a72a202c0049ca
Parents: 94f25ce
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed May 21 11:42:32 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed May 21 11:42:32 2014 +0200

--
 .../cassandra/cql3/statements/SelectStatement.java| 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/82be86a5/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
--
diff --git a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java 
b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
index ca990a4..b212147 100644
--- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
@@ -928,11 +928,11 @@ public class SelectStatement implements CQLStatement, 
MeasurableForPreparedCache
 if (slice.hasBound(b))
 {
 ByteBuffer value = validateIndexedValue(def, 
slice.bound(b, options));
-IndexOperator op = slice.getIndexOperator(b);
+IndexExpression.Operator op = 
slice.getIndexOperator(b);
 // If the underlying comparator for name is reversed, 
we need to reverse the IndexOperator: user operation
 // always refer to the forward sorting even if the 
clustering order is reversed, but the 2ndary code does
 // use the underlying comparator as is.
-if (name.type instanceof ReversedType)
+if (def.type instanceof ReversedType)
 op = reverse(op);
 expressions.add(new IndexExpression(def.name.bytes, 
op, value));
 }
@@ -1004,14 +1004,14 @@ public class SelectStatement implements CQLStatement, 
MeasurableForPreparedCache
 };
 }
 
-private static IndexOperator reverse(IndexOperator op)
+private static IndexExpression.Operator reverse(IndexExpression.Operator 
op)
 {
 switch (op)
 {
-case LT:  return IndexOperator.GT;
-case LTE: return IndexOperator.GTE;
-case GT:  return IndexOperator.LT;
-case GTE: return IndexOperator.LTE;
+case LT:  return IndexExpression.Operator.GT;
+case LTE: return IndexExpression.Operator.GTE;
+case GT:  return IndexExpression.Operator.LT;
+case GTE: return IndexExpression.Operator.LTE;
 default: return op;
 }
 }



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

2014-05-21 Thread slebresne
Merge branch 'cassandra-2.0' into cassandra-2.1

Conflicts:
CHANGES.txt
src/java/org/apache/cassandra/cql3/statements/SelectStatement.java


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

Branch: refs/heads/trunk
Commit: 94f25ce15923e9a790a01a8210e141606f9091a4
Parents: 7abd76e 20e058b
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed May 21 11:36:18 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed May 21 11:36:18 2014 +0200

--
 CHANGES.txt |  1 +
 .../cql3/statements/SelectStatement.java| 20 +++-
 2 files changed, 20 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/94f25ce1/CHANGES.txt
--
diff --cc CHANGES.txt
index 12de385,bd0031e..0b8be6e
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -57,6 -28,25 +57,7 @@@ Merged from 2.0
   * Re-add parameter columns to tracing session (CASSANDRA-6942)
   * Fix writetime/ttl functions for static columns (CASSANDRA-7081)
   * Suggest CTRL-C or semicolon after three blank lines in cqlsh 
(CASSANDRA-7142)
 - * (Hadoop) support authentication in CqlRecordReader (CASSANDRA-7221)
 - * (Hadoop) Close java driver Cluster in CQLRR.close (CASSANDRA-7228)
 - * Fix potential SlabAllocator yield-starvation (CASSANDRA-7133)
 - * Warn when 'USING TIMESTAMP' is used on a CAS BATCH (CASSANDRA-7067)
 - * Starting threads in OutboundTcpConnectionPool constructor causes race 
conditions (CASSANDRA-7177)
 - * return all cpu values from BackgroundActivityMonitor.readAndCompute 
(CASSANDRA-7183)
 - * fix c* launch issues on Russian os's due to output of linux 'free' cmd 
(CASSANDRA-6162)
 - * Fix disabling autocompaction (CASSANDRA-7187)
 - * Fix potential NumberFormatException when deserializing IntegerType 
(CASSANDRA-7088)
 - * cqlsh can't tab-complete disabling compaction (CASSANDRA-7185)
 - * cqlsh: Accept and execute CQL statement(s) from command-line parameter 
(CASSANDRA-7172)
 - * Fix IllegalStateException in CqlPagingRecordReader (CASSANDRA-7198)
 - * Fix the InvertedIndex trigger example (CASSANDRA-7211)
 - * Add --resolve-ip option to 'nodetool ring' (CASSANDRA-7210)
 - * Fix duplicated error messages on directory creation error at startup 
(CASSANDRA-5818)
 - * reduce garbage on codec flag deserialization (CASSANDRA-7244) 
 - * Proper null handle for IF with map element access (CASSANDRA-7155)
 - * Improve compaction visibility (CASSANDRA-7242)
+  * Fix 2ndary index queries with DESC clustering order (CASSANDRA-6950)
  Merged from 1.2:
   * Add Cloudstack snitch (CASSANDRA-7147)
   * Update system.peers correctly when relocating tokens (CASSANDRA-7126)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/94f25ce1/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
--
diff --cc src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
index 55ce6f9,6b4309f..ca990a4
--- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
@@@ -927,8 -922,19 +927,14 @@@ public class SelectStatement implement
  {
  if (slice.hasBound(b))
  {
 -ByteBuffer value = slice.bound(b, variables);
 -if (value == null)
 -throw new 
InvalidRequestException(String.format(Unsupported null value for indexed 
column %s, name));
 -if (value.remaining()  0x)
 -throw new InvalidRequestException(Index 
expression values may not be larger than 64K);
 -
 +ByteBuffer value = validateIndexedValue(def, 
slice.bound(b, options));
- expressions.add(new IndexExpression(def.name.bytes, 
slice.getIndexOperator(b), value));
+ IndexOperator op = slice.getIndexOperator(b);
+ // If the underlying comparator for name is reversed, 
we need to reverse the IndexOperator: user operation
+ // always refer to the forward sorting even if the 
clustering order is reversed, but the 2ndary code does
+ // use the underlying comparator as is.
+ if (name.type instanceof ReversedType)
+ op = reverse(op);
 -expressions.add(new IndexExpression(name.name.key, 
op, value));
++

[1/2] git commit: Invalidate key cache on table drop

2014-05-21 Thread slebresne
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 20e058b2b - 484d28169


Invalidate key cache on table drop

patch by thobbs; reviewed by slebresne for CASSANDRA-6525


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

Branch: refs/heads/cassandra-2.0
Commit: ca213ccdc029e74f548115dfbb61c65d221e5e42
Parents: 20e058b
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed May 21 11:44:50 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed May 21 11:44:50 2014 +0200

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ca213ccd/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index bd0031e..432d688 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -47,6 +47,7 @@
  * Proper null handle for IF with map element access (CASSANDRA-7155)
  * Improve compaction visibility (CASSANDRA-7242)
  * Fix 2ndary index queries with DESC clustering order (CASSANDRA-6950)
+ * Invalid key cache entries on DROP (CASSANDRA-6525)
 Merged from 1.2:
  * Add Cloudstack snitch (CASSANDRA-7147)
  * Update system.peers correctly when relocating tokens (CASSANDRA-7126)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ca213ccd/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
--
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java 
b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 3fac640..709935a 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -37,6 +37,7 @@ import org.cliffc.high_scale_lib.NonBlockingHashMap;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import org.apache.cassandra.cache.KeyCacheKey;
 import org.apache.cassandra.cache.IRowCacheEntry;
 import org.apache.cassandra.cache.RowCacheKey;
 import org.apache.cassandra.cache.RowCacheSentinel;
@@ -339,6 +340,11 @@ public class ColumnFamilyStore implements 
ColumnFamilyStoreMBean
 for (RowCacheKey key : CacheService.instance.rowCache.getKeySet())
 if (key.cfId == metadata.cfId)
 invalidateCachedRow(key);
+
+String ksname = keyspace.getName();
+for (KeyCacheKey key : CacheService.instance.keyCache.getKeySet())
+if (key.getPathInfo().left.equals(ksname)  
key.getPathInfo().right.equals(name))
+CacheService.instance.keyCache.remove(key);
 }
 
 /**



[2/2] git commit: Fix flapping RecoveryManagerTest

2014-05-21 Thread slebresne
Fix flapping RecoveryManagerTest

patch by benedict; reviewed by jbellis for CASSANDRA-7084


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

Branch: refs/heads/cassandra-2.0
Commit: 484d2816940cd2eb22d2365fcb376dd27e059e2e
Parents: ca213cc
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed May 21 11:48:21 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed May 21 11:48:21 2014 +0200

--
 CHANGES.txt| 1 +
 .../org/apache/cassandra/db/commitlog/CommitLogAllocator.java  | 6 --
 test/unit/org/apache/cassandra/db/RecoveryManagerTest.java | 3 +++
 3 files changed, 8 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/484d2816/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 432d688..3f8e3d0 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -48,6 +48,7 @@
  * Improve compaction visibility (CASSANDRA-7242)
  * Fix 2ndary index queries with DESC clustering order (CASSANDRA-6950)
  * Invalid key cache entries on DROP (CASSANDRA-6525)
+ * Fix flapping RecoveryManagerTest (CASSANDRA-7084)
 Merged from 1.2:
  * Add Cloudstack snitch (CASSANDRA-7147)
  * Update system.peers correctly when relocating tokens (CASSANDRA-7126)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/484d2816/src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java
--
diff --git a/src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java 
b/src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java
index 3009a63..7ab062b 100644
--- a/src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java
+++ b/src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java
@@ -29,6 +29,7 @@ import java.util.concurrent.ConcurrentLinkedQueue;
 import java.util.concurrent.atomic.AtomicLong;
 
 import com.google.common.collect.Iterables;
+import com.google.common.util.concurrent.Uninterruptibles;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -36,7 +37,6 @@ import org.apache.cassandra.config.DatabaseDescriptor;
 import org.apache.cassandra.config.Schema;
 import org.apache.cassandra.db.ColumnFamilyStore;
 import org.apache.cassandra.db.Keyspace;
-import org.apache.cassandra.io.FSError;
 import org.apache.cassandra.io.util.FileUtils;
 import org.apache.cassandra.net.MessagingService;
 import org.apache.cassandra.service.StorageService;
@@ -343,9 +343,11 @@ public class CommitLogAllocator
 {
 logger.debug(Closing and clearing existing commit log segments...);
 
-while (!queue.isEmpty())
+while (StorageService.tasks.getActiveCount()  0 || !queue.isEmpty())
 Thread.yield();
 
+Uninterruptibles.sleepUninterruptibly(10, TimeUnit.MILLISECONDS);
+
 for (CommitLogSegment segment : Iterables.concat(activeSegments, 
availableSegments))
 segment.close();
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/484d2816/test/unit/org/apache/cassandra/db/RecoveryManagerTest.java
--
diff --git a/test/unit/org/apache/cassandra/db/RecoveryManagerTest.java 
b/test/unit/org/apache/cassandra/db/RecoveryManagerTest.java
index c053211..d14d184 100644
--- a/test/unit/org/apache/cassandra/db/RecoveryManagerTest.java
+++ b/test/unit/org/apache/cassandra/db/RecoveryManagerTest.java
@@ -23,9 +23,11 @@ import java.util.Date;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 
+import org.apache.cassandra.OrderedJUnit4ClassRunner;
 import org.apache.cassandra.Util;
 import org.junit.Assert;
 import org.junit.Test;
+import org.junit.runner.RunWith;
 
 import org.apache.cassandra.SchemaLoader;
 import org.apache.cassandra.db.commitlog.CommitLog;
@@ -35,6 +37,7 @@ import org.apache.cassandra.utils.ByteBufferUtil;
 import static org.apache.cassandra.Util.column;
 import static org.apache.cassandra.db.KeyspaceTest.assertColumns;
 
+@RunWith(OrderedJUnit4ClassRunner.class)
 public class RecoveryManagerTest extends SchemaLoader
 {
 @Test



[jira] [Commented] (CASSANDRA-7274) Better display table organization on desc table via primary key list

2014-05-21 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-7274:
--

bq. Wouldn't this create a composite partition key of size 1?

It wouldn't, so not against it on principle.

 Better display table organization on desc table via primary key list
 

 Key: CASSANDRA-7274
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7274
 Project: Cassandra
  Issue Type: Improvement
Reporter: G Gordon Worley III

 In cqlsh, the desc table command does not make it sufficiently clear which 
 columns are part of the row key and which are clustering keys.
 A simple change to the primary key list, though, would make it easier to tell.
 Consider the following table definition:
 {code}
 create table my_table {
   first_column text,
   second_column text,
   third_column text,
   primary key (first_column, second_column, third_column)
 }
 {code}
 This table has a row key of first_column and clustering keys of 
 second_column, third_column. But if the user intended for the table to have 
 all three in the row key, the correct definition would be:
 {code}
 create table my_table {
   first_column text,
   second_column text,
   third_column text,
   primary key ((first_column, second_column, third_column))
 }
 {code}
 But this is a sufficiently subtle difference that the first may be mistaken 
 for the second or vice-versa.
 My suggested solution is to always wrap the row key in parentheses. This is 
 already supported by create table syntax, so it's just a matter of changing 
 desc table to display the create table statement with the primary key always 
 in parentheses, like so:
 {code}
 create table my_table {
   first_column text,
   second_column text,
   third_column text,
   primary key ((first_column), second_column, third_column)
 }
 {code}



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


Git Push Summary

2014-05-21 Thread slebresne
Repository: cassandra
Updated Tags:  refs/tags/2.0.8-tentative [deleted] 006853300


Git Push Summary

2014-05-21 Thread slebresne
Repository: cassandra
Updated Tags:  refs/tags/2.0.8-tentative [created] 484d28169


buildbot success in ASF Buildbot on cassandra-2.0

2014-05-21 Thread buildbot
The Buildbot has detected a restored build on builder cassandra-2.0 while 
building cassandra.
Full details are available at:
 http://ci.apache.org/builders/cassandra-2.0/builds/22

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: portunus_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch cassandra-2.0] 
484d2816940cd2eb22d2365fcb376dd27e059e2e
Blamelist: Sylvain Lebresne sylv...@datastax.com

Build succeeded!

sincerely,
 -The Buildbot





[jira] [Commented] (CASSANDRA-2527) Add ability to snapshot data as input to hadoop jobs

2014-05-21 Thread Jeremy Hanna (JIRA)

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

Jeremy Hanna commented on CASSANDRA-2527:
-

The full contact github project that does this: 
https://github.com/fullcontact/hadoop-sstable

 Add ability to snapshot data as input to hadoop jobs
 

 Key: CASSANDRA-2527
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2527
 Project: Cassandra
  Issue Type: New Feature
Reporter: Jeremy Hanna
Assignee: Joshua McKenzie
Priority: Minor
  Labels: hadoop
 Fix For: 3.0


 It is desirable to have immutable inputs to hadoop jobs for the duration of 
 the job.  That way re-execution of individual tasks do not alter the output.  
 One way to accomplish this would be to snapshot the data that is used as 
 input to a job.



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


[jira] [Resolved] (CASSANDRA-7101) Unable to complete request: one or more nodes were unavailable.

2014-05-21 Thread Michael Shuler (JIRA)

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

Michael Shuler resolved CASSANDRA-7101.
---

Resolution: Incomplete

[~sri7gster] please, do not post random unrelated questions to a jira.. (the 
integration question would best be asked on the user@ mailing list or 
#cassandra on freenode)

Please, feel free to re-open this ticket with the steps to reproduce the 
problem in the description of the ticket, if you like.

 Unable to complete request: one or more nodes were unavailable.
 ---

 Key: CASSANDRA-7101
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7101
 Project: Cassandra
  Issue Type: Bug
  Components: Config
Reporter: srikanth
 Fix For: 2.0.9


 I setup multidata center cluster setup in cassandra. i created keysapce using 
 network topology and created a table.but i am unable to insert data into 
 tables. i am getting following error to insert data into cassandra
 Unable to complete request: one or more nodes were unavailable.
 
 Sample Code:
 For Creating Keyspace:
 CREATE KEYSPACE TestSample
WITH replication = {'class': 'NetworkTopologyStrategy', 'DC1' : 1, 
 'DC2' : 1}
 AND durable_writes = false;
 For Creating Tables:
 CREATE TABLE users (
   user_id int PRIMARY KEY,
   fname text,
   lname text
 );
 Inserting Into Tables:
 INSERT INTO users (user_id,  fname, lname)
   VALUES (1745, 'john', 'smith');



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


[jira] [Commented] (CASSANDRA-7262) During streaming: java.lang.AssertionError: Reference counter -1

2014-05-21 Thread Joshua McKenzie (JIRA)

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

Joshua McKenzie commented on CASSANDRA-7262:


You say band-aid, I say specificity.  I prefer to sync around a single resource 
if it's a concurrency problem and promote the synchronization abstraction up 
the chain if / when we run into other resources that need synchronization for 
both complexity and performance reasons (though performance in this context is 
admittedly not a big concern).

That being said - I'm fine either way.  I'll synchronize the various paths into 
closeSession while looking into the CompactionTask issue.

 During streaming: java.lang.AssertionError: Reference counter -1
 

 Key: CASSANDRA-7262
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7262
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: Cassandra 2.07, x86-64 Ubuntu 12.04.4, Oracle java 
 1.7.0_45
Reporter: Duncan Sands
Assignee: Joshua McKenzie
Priority: Minor
 Fix For: 2.0.8, 2.1 rc1

 Attachments: 7262_v1.txt, system.log.gz


 Got this assertion failure this weekend during repair:
 ERROR [STREAM-IN-/192.168.21.14] 2014-05-17 01:17:52,332 StreamSession.java 
 (line 420) [Stream #3a3ac8a2-dd50-11e3-b3c1-6bf6dccd6457] Streaming error 
 occurred
 java.lang.RuntimeException: Outgoing stream handler has been closed
 at 
 org.apache.cassandra.streaming.ConnectionHandler.sendMessage(ConnectionHandler.java:170)
 at 
 org.apache.cassandra.streaming.StreamSession.receive(StreamSession.java:483)
 at 
 org.apache.cassandra.streaming.StreamSession.messageReceived(StreamSession.java:372)
 at 
 org.apache.cassandra.streaming.ConnectionHandler$IncomingMessageHandler.run(ConnectionHandler.java:289)
 at java.lang.Thread.run(Thread.java:744)
 ERROR [STREAM-IN-/192.168.21.14] 2014-05-17 01:17:52,350 CassandraDaemon.java 
 (line 198) Exception in thread Thread[STREAM-IN-/192.168.21.14,5,RMI Runtime]
 java.lang.AssertionError: Reference counter -1 for 
 /mnt/ssd1/cassandra/data/ldn_production/historical_accounts/ldn_production-historical_accounts-jb-79827-Data.db
 at 
 org.apache.cassandra.io.sstable.SSTableReader.releaseReference(SSTableReader.java:1107)
 at 
 org.apache.cassandra.streaming.StreamTransferTask.abort(StreamTransferTask.java:80)
 at 
 org.apache.cassandra.streaming.StreamSession.closeSession(StreamSession.java:322)
 at 
 org.apache.cassandra.streaming.StreamSession.onError(StreamSession.java:425)
 at 
 org.apache.cassandra.streaming.ConnectionHandler$IncomingMessageHandler.run(ConnectionHandler.java:300)
 at java.lang.Thread.run(Thread.java:744)
 followed by a few more (the reference counter got down to -3).  Got the same 
 kind of assertion failure on one other node (in a different data centre; 
 there are 21 nodes altogether distributed over 4 data centres).
 I've attached the relevant part of the log.  It starts quite a bit before the 
 assertion failure at the first exception on this node (Cannot proceed on 
 repair because a neighbor ... is dead), and finishes a few hours afterwards 
 when the node was restarted.
 Edit: The following Reference counter assertion failures followed the 1st on 
 a different file and have a different stack trace:
 ERROR [CompactionExecutor:382] 2014-05-17 01:17:53,157 CassandraDaemon.java 
 (line 198) Exception in thread Thread[CompactionExecutor:382,1,main]
 java.lang.AssertionError: Reference counter -1 for 
 /mnt/ssd1/cassandra/data/ldn_production/historical_accounts/ldn_production-historical_accounts-jb-83888-Data.db
at 
 org.apache.cassandra.io.sstable.SSTableReader.releaseReference(SSTableReader.java:1107)
at 
 org.apache.cassandra.io.sstable.SSTableReader.releaseReferences(SSTableReader.java:1429)
at 
 org.apache.cassandra.db.compaction.CompactionController.close(CompactionController.java:207)
at 
 org.apache.cassandra.db.compaction.CompactionTask.runWith(CompactionTask.java:220)
at 
 org.apache.cassandra.io.util.DiskAwareRunnable.runMayThrow(DiskAwareRunnable.java:48)
at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
at 
 org.apache.cassandra.db.compaction.CompactionTask.executeInternal(CompactionTask.java:60)
at 
 org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(AbstractCompactionTask.java:59)
at 
 org.apache.cassandra.db.compaction.CompactionManager$BackgroundCompactionTask.run(CompactionManager.java:197)
...



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


[jira] [Commented] (CASSANDRA-3569) Failure detector downs should not break streams

2014-05-21 Thread Joshua McKenzie (JIRA)

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

Joshua McKenzie commented on CASSANDRA-3569:


Hm.  The setException inside the StreamResultFuture on the Stream failed you 
saw should have triggered the removal from both initiatedStreams and 
receivingStreams in StreamManager.  I'll poke around and see if I can replicate 
this - there's a good chance that during my testing that nodetool and the root 
repair node were closing out as I expected but I had hung repair streams 
reporting on the JMX side.

 Failure detector downs should not break streams
 ---

 Key: CASSANDRA-3569
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3569
 Project: Cassandra
  Issue Type: New Feature
Reporter: Peter Schuller
Assignee: Joshua McKenzie
 Fix For: 2.1.1

 Attachments: 3569-2.0.txt, 3569_v1.txt


 CASSANDRA-2433 introduced this behavior just to get repairs to don't sit 
 there waiting forever. In my opinion the correct fix to that problem is to 
 use TCP keep alive. Unfortunately the TCP keep alive period is insanely high 
 by default on a modern Linux, so just doing that is not entirely good either.
 But using the failure detector seems non-sensicle to me. We have a 
 communication method which is the TCP transport, that we know is used for 
 long-running processes that you don't want to incorrectly be killed for no 
 good reason, and we are using a failure detector tuned to detecting when not 
 to send real-time sensitive request to nodes in order to actively kill a 
 working connection.
 So, rather than add complexity with protocol based ping/pongs and such, I 
 propose that we simply just use TCP keep alive for streaming connections and 
 instruct operators of production clusters to tweak 
 net.ipv4.tcp_keepalive_{probes,intvl} as appropriate (or whatever equivalent 
 on their OS).
 I can submit the patch. Awaiting opinions.



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


git commit: Add missing iso8601 patterns for date strings

2014-05-21 Thread slebresne
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 484d28169 - 263563227


Add missing iso8601 patterns for date strings

patch by chander; reviewed by slebresne for CASSANDRA-6973


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

Branch: refs/heads/cassandra-2.0
Commit: 2635632270289fbbab2f3e3181f20aa98c34a879
Parents: 484d281
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed May 21 17:29:12 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed May 21 17:29:12 2014 +0200

--
 CHANGES.txt |  4 +
 .../apache/cassandra/db/marshal/DateType.java   | 41 +--
 .../cassandra/db/marshal/TimeUUIDType.java  |  6 +-
 .../cassandra/db/marshal/TimestampType.java | 43 +--
 .../apache/cassandra/db/marshal/UUIDType.java   | 38 ++
 .../serializers/TimestampSerializer.java| 68 ++---
 .../serializers/TimestampSerializerTest.java| 77 
 7 files changed, 152 insertions(+), 125 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/26356322/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 3f8e3d0..bddb1d1 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,7 @@
+2.0.9
+ * Add missing iso8601 patterns for date strings (6973)
+
+
 2.0.8
  * Always reallocate buffers in HSHA (CASSANDRA-6285)
  * (Hadoop) support authentication in CqlRecordReader (CASSANDRA-7221)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/26356322/src/java/org/apache/cassandra/db/marshal/DateType.java
--
diff --git a/src/java/org/apache/cassandra/db/marshal/DateType.java 
b/src/java/org/apache/cassandra/db/marshal/DateType.java
index 8e28bd4..0c97688 100644
--- a/src/java/org/apache/cassandra/db/marshal/DateType.java
+++ b/src/java/org/apache/cassandra/db/marshal/DateType.java
@@ -38,9 +38,6 @@ public class DateType extends AbstractTypeDate
 
 public static final DateType instance = new DateType();
 
-static final String DEFAULT_FORMAT = 
TimestampSerializer.iso8601Patterns[3];
-static final SimpleDateFormat FORMATTER = new 
SimpleDateFormat(DEFAULT_FORMAT);
-
 DateType() {} // singleton
 
 public int compare(ByteBuffer o1, ByteBuffer o2)
@@ -63,43 +60,7 @@ public class DateType extends AbstractTypeDate
   if (source.isEmpty())
   return ByteBufferUtil.EMPTY_BYTE_BUFFER;
 
-  return ByteBufferUtil.bytes(dateStringToTimestamp(source));
-}
-
-public static long dateStringToTimestamp(String source) throws 
MarshalException
-{
-  long millis;
-
-  if (source.toLowerCase().equals(now))
-  {
-  millis = System.currentTimeMillis();
-  }
-  // Milliseconds since epoch?
-  else if (source.matches(^-?\\d+$))
-  {
-  try
-  {
-  millis = Long.parseLong(source);
-  }
-  catch (NumberFormatException e)
-  {
-  throw new MarshalException(String.format(unable to make long 
(for date) from: '%s', source), e);
-  }
-  }
-  // Last chance, attempt to parse as date-time string
-  else
-  {
-  try
-  {
-  millis = DateUtils.parseDateStrictly(source, 
TimestampSerializer.iso8601Patterns).getTime();
-  }
-  catch (ParseException e1)
-  {
-  throw new MarshalException(String.format(unable to coerce '%s' 
to a  formatted date (long), source), e1);
-  }
-  }
-
-  return millis;
+  return 
ByteBufferUtil.bytes(TimestampSerializer.dateStringToTimestamp(source));
 }
 
 @Override

http://git-wip-us.apache.org/repos/asf/cassandra/blob/26356322/src/java/org/apache/cassandra/db/marshal/TimeUUIDType.java
--
diff --git a/src/java/org/apache/cassandra/db/marshal/TimeUUIDType.java 
b/src/java/org/apache/cassandra/db/marshal/TimeUUIDType.java
index 51cf47a..fa82f06 100644
--- a/src/java/org/apache/cassandra/db/marshal/TimeUUIDType.java
+++ b/src/java/org/apache/cassandra/db/marshal/TimeUUIDType.java
@@ -25,6 +25,7 @@ import org.apache.cassandra.cql3.CQL3Type;
 import org.apache.cassandra.serializers.TypeSerializer;
 import org.apache.cassandra.serializers.MarshalException;
 import org.apache.cassandra.serializers.TimeUUIDSerializer;
+import org.apache.cassandra.serializers.TimestampSerializer;
 import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.cassandra.utils.UUIDGen;
 

[jira] [Commented] (CASSANDRA-7201) Regression: ColumnFamilyStoreTest, NativeCellTest, SSTableMetadataTest unit tests on 2.1

2014-05-21 Thread Michael Shuler (JIRA)

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

Michael Shuler commented on CASSANDRA-7201:
---

7201.2.txt patch looks good to me, [~benedict] - thanks!

 Regression: ColumnFamilyStoreTest, NativeCellTest, SSTableMetadataTest unit 
 tests on 2.1
 

 Key: CASSANDRA-7201
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7201
 Project: Cassandra
  Issue Type: Test
  Components: Tests
Reporter: Michael Shuler
Assignee: Benedict
  Labels: qa-resolved
 Fix For: 2.1 rc1

 Attachments: 7201.2.txt, 7201.txt


 http://cassci.datastax.com/job/cassandra-2.1_utest/252/testReport/
 {noformat}
 REGRESSION:  
 org.apache.cassandra.db.ColumnFamilyStoreTest.testSliceByNamesCommandOnUUIDTypeSCF
 Error Message:
 null
 Stack Trace:
 java.lang.NullPointerException
 at 
 org.apache.cassandra.db.ColumnFamilyStoreTest.testSliceByNamesCommandOnUUIDTypeSCF(ColumnFamilyStoreTest.java:992)
 REGRESSION:  org.apache.cassandra.db.NativeCellTest.testCells
 Error Message:
 null
 Stack Trace:
 java.lang.IllegalArgumentException
 at java.nio.Buffer.position(Buffer.java:236)
 at 
 org.apache.cassandra.db.context.CounterContext.updateDigest(CounterContext.java:659)
 at 
 org.apache.cassandra.db.NativeCounterCell.updateDigest(NativeCounterCell.java:139)
 at org.apache.cassandra.db.NativeCellTest.test(NativeCellTest.java:148)
 at 
 org.apache.cassandra.db.NativeCellTest.testCells(NativeCellTest.java:132)
 REGRESSION:  
 org.apache.cassandra.io.sstable.SSTableMetadataTest.testLegacyCounterShardTracking
 Error Message:
 null
 Stack Trace:
 junit.framework.AssertionFailedError: 
 at 
 org.apache.cassandra.io.sstable.SSTableMetadataTest.testLegacyCounterShardTracking(SSTableMetadataTest.java:306)
 {noformat}
 All 3 tests bisect to:
 {noformat}
 commit 1ac72f637cdfc9876d2d121302061e46ac104bf8
 Author: Jonathan Ellis jbel...@apache.org
 Date:   Thu May 8 16:44:35 2014 -0500
 prefer MemoryUtil.getByteBuffer to JNA Native.getDirectByteBuffer; 
 specify native endian on the former
 patch by bes; reviewed by jbellis for CASSANDRA-6575
 {noformat}



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


[jira] [Created] (CASSANDRA-7279) MultiSliceTest.test_with_overlap* unit tests failing in trunk

2014-05-21 Thread Michael Shuler (JIRA)
Michael Shuler created CASSANDRA-7279:
-

 Summary: MultiSliceTest.test_with_overlap* unit tests failing in 
trunk
 Key: CASSANDRA-7279
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7279
 Project: Cassandra
  Issue Type: Test
  Components: Tests
Reporter: Michael Shuler
Assignee: Michael Shuler
Priority: Minor
 Fix For: 2.1 rc1


Example:
https://cassci.datastax.com/job/trunk_utest/623/testReport/org.apache.cassandra.thrift/MultiSliceTest/



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


[jira] [Updated] (CASSANDRA-6388) delay vnode selection if bootstrapping

2014-05-21 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-6388:
--

Fix Version/s: (was: 2.1 rc1)
   2.1.1

 delay vnode selection if bootstrapping
 --

 Key: CASSANDRA-6388
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6388
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Brandon Williams
 Fix For: 2.1.1


 Currently when bootstrapping with vnodes, we choose random vnodes first, then 
 bootstrap.  Now that we do a shadow gossip round to prevent booting an 
 existing address, we could delay the token selection until after the shadow 
 round in order to choose more balanced tokens.



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


[jira] [Commented] (CASSANDRA-7106) Retry multiple times before giving up on fetching splits

2014-05-21 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-7106:
---

Can you look at the new patch, [~brandon.williams]?

 Retry multiple times before giving up on fetching splits
 

 Key: CASSANDRA-7106
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7106
 Project: Cassandra
  Issue Type: Improvement
  Components: Hadoop
Reporter: Victor Igumnov
Priority: Minor
 Fix For: 2.1 rc1

 Attachments: retries-fix-iterator-bug.patch, retries-reworked.patch, 
 retry-splits.patch


 See Github for patch:
 https://github.com/victori/cassandra
 What the patch does:
 While I was evaluating Shark/Hive for analyzing Cassandra's data, I could not 
 get any of the queries to return reliably. Looking further into the issue I 
 noticed that if just a single fetch for a split fails the whole job is 
 aborted. So instead of giving up and failing out the whole job, retry 
 fetching the data a few times before completely giving up.  



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


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

2014-05-21 Thread slebresne
Merge branch 'cassandra-2.0' into cassandra-2.1

Conflicts:
CHANGES.txt
src/java/org/apache/cassandra/db/ColumnFamilyStore.java
src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java


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

Branch: refs/heads/cassandra-2.1
Commit: e024a1cc2ba9e50f1272ad76cb34582e38c256be
Parents: 82be86a 2635632
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed May 21 17:49:40 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed May 21 17:49:40 2014 +0200

--
 CHANGES.txt |  3 +
 .../apache/cassandra/db/ColumnFamilyStore.java  |  1 +
 .../apache/cassandra/db/marshal/DateType.java   | 38 +-
 .../cassandra/db/marshal/TimeUUIDType.java  |  6 +-
 .../cassandra/db/marshal/TimestampType.java | 43 +--
 .../apache/cassandra/db/marshal/UUIDType.java   | 38 ++
 .../serializers/TimestampSerializer.java| 68 ++---
 .../apache/cassandra/service/CacheService.java  | 11 +++
 .../cassandra/db/RecoveryManagerTest.java   |  3 +
 .../serializers/TimestampSerializerTest.java| 77 
 10 files changed, 166 insertions(+), 122 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e024a1cc/CHANGES.txt
--
diff --cc CHANGES.txt
index 0b8be6e,bddb1d1..209ff70
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -57,7 -32,27 +57,10 @@@ Merged from 2.0
   * Re-add parameter columns to tracing session (CASSANDRA-6942)
   * Fix writetime/ttl functions for static columns (CASSANDRA-7081)
   * Suggest CTRL-C or semicolon after three blank lines in cqlsh 
(CASSANDRA-7142)
 - * (Hadoop) support authentication in CqlRecordReader (CASSANDRA-7221)
 - * (Hadoop) Close java driver Cluster in CQLRR.close (CASSANDRA-7228)
 - * Fix potential SlabAllocator yield-starvation (CASSANDRA-7133)
 - * Warn when 'USING TIMESTAMP' is used on a CAS BATCH (CASSANDRA-7067)
 - * Starting threads in OutboundTcpConnectionPool constructor causes race 
conditions (CASSANDRA-7177)
 - * return all cpu values from BackgroundActivityMonitor.readAndCompute 
(CASSANDRA-7183)
 - * fix c* launch issues on Russian os's due to output of linux 'free' cmd 
(CASSANDRA-6162)
 - * Fix disabling autocompaction (CASSANDRA-7187)
 - * Fix potential NumberFormatException when deserializing IntegerType 
(CASSANDRA-7088)
 - * cqlsh can't tab-complete disabling compaction (CASSANDRA-7185)
 - * cqlsh: Accept and execute CQL statement(s) from command-line parameter 
(CASSANDRA-7172)
 - * Fix IllegalStateException in CqlPagingRecordReader (CASSANDRA-7198)
 - * Fix the InvertedIndex trigger example (CASSANDRA-7211)
 - * Add --resolve-ip option to 'nodetool ring' (CASSANDRA-7210)
 - * Fix duplicated error messages on directory creation error at startup 
(CASSANDRA-5818)
 - * reduce garbage on codec flag deserialization (CASSANDRA-7244) 
 - * Proper null handle for IF with map element access (CASSANDRA-7155)
 - * Improve compaction visibility (CASSANDRA-7242)
   * Fix 2ndary index queries with DESC clustering order (CASSANDRA-6950)
+  * Invalid key cache entries on DROP (CASSANDRA-6525)
+  * Fix flapping RecoveryManagerTest (CASSANDRA-7084)
++ * Add missing iso8601 patterns for date strings (6973)
  Merged from 1.2:
   * Add Cloudstack snitch (CASSANDRA-7147)
   * Update system.peers correctly when relocating tokens (CASSANDRA-7126)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e024a1cc/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
--
diff --cc src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 3786ef5,709935a..4d334e7
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@@ -372,7 -337,14 +372,8 @@@ public class ColumnFamilyStore implemen
  data.unreferenceSSTables();
  indexManager.invalidate();
  
 -for (RowCacheKey key : CacheService.instance.rowCache.getKeySet())
 -if (key.cfId == metadata.cfId)
 -invalidateCachedRow(key);
 -
 -String ksname = keyspace.getName();
 -for (KeyCacheKey key : CacheService.instance.keyCache.getKeySet())
 -if (key.getPathInfo().left.equals(ksname)  
key.getPathInfo().right.equals(name))
 -CacheService.instance.keyCache.remove(key);
 +CacheService.instance.invalidateRowCacheForCf(metadata.cfId);
++CacheService.instance.invalidateKeyCacheForCf(metadata.cfId);

[jira] [Updated] (CASSANDRA-7120) Bad paging state returned for prepared statements for last page

2014-05-21 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-7120:
--

Assignee: Sylvain Lebresne

 Bad paging state returned for prepared statements for last page
 ---

 Key: CASSANDRA-7120
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7120
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Tyler Hobbs
Assignee: Sylvain Lebresne
 Fix For: 2.1 rc1


 When executing a paged query with a prepared statement, a non-null paging 
 state is sometimes being returned for the final page, causing an endless 
 paging loop.
 Specifically, this is the schema being used:
 {noformat}
 CREATE KEYSPACE test3rf WITH replication = {'class': 'SimpleStrategy', 
 'replication_factor': '3'}';
 USE test3rf;
 CREATE TABLE test3rf.test (
 k int PRIMARY KEY,
 v int
 )
 {noformat}
 The inserts are like so:
 {noformat}
 INSERT INTO test3rf.test (k, v) VALUES (?, 0)
 {noformat}
 With values from [0, 99] used for k.
 The query is {{SELECT * FROM test3rf.test}} with a fetch size of 3.
 The final page returns the row with k=3, and the paging state is 
 {{000400420004000176007fa2}}.  This matches the paging state from 
 three pages earlier.  When executing this with a non-prepared statement, no 
 paging state is returned for this page.
 This problem doesn't happen with the 2.0 branch.



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


[2/4] git commit: Fix flapping RecoveryManagerTest

2014-05-21 Thread slebresne
Fix flapping RecoveryManagerTest

patch by benedict; reviewed by jbellis for CASSANDRA-7084


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

Branch: refs/heads/cassandra-2.1
Commit: 484d2816940cd2eb22d2365fcb376dd27e059e2e
Parents: ca213cc
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed May 21 11:48:21 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed May 21 11:48:21 2014 +0200

--
 CHANGES.txt| 1 +
 .../org/apache/cassandra/db/commitlog/CommitLogAllocator.java  | 6 --
 test/unit/org/apache/cassandra/db/RecoveryManagerTest.java | 3 +++
 3 files changed, 8 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/484d2816/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 432d688..3f8e3d0 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -48,6 +48,7 @@
  * Improve compaction visibility (CASSANDRA-7242)
  * Fix 2ndary index queries with DESC clustering order (CASSANDRA-6950)
  * Invalid key cache entries on DROP (CASSANDRA-6525)
+ * Fix flapping RecoveryManagerTest (CASSANDRA-7084)
 Merged from 1.2:
  * Add Cloudstack snitch (CASSANDRA-7147)
  * Update system.peers correctly when relocating tokens (CASSANDRA-7126)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/484d2816/src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java
--
diff --git a/src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java 
b/src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java
index 3009a63..7ab062b 100644
--- a/src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java
+++ b/src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java
@@ -29,6 +29,7 @@ import java.util.concurrent.ConcurrentLinkedQueue;
 import java.util.concurrent.atomic.AtomicLong;
 
 import com.google.common.collect.Iterables;
+import com.google.common.util.concurrent.Uninterruptibles;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -36,7 +37,6 @@ import org.apache.cassandra.config.DatabaseDescriptor;
 import org.apache.cassandra.config.Schema;
 import org.apache.cassandra.db.ColumnFamilyStore;
 import org.apache.cassandra.db.Keyspace;
-import org.apache.cassandra.io.FSError;
 import org.apache.cassandra.io.util.FileUtils;
 import org.apache.cassandra.net.MessagingService;
 import org.apache.cassandra.service.StorageService;
@@ -343,9 +343,11 @@ public class CommitLogAllocator
 {
 logger.debug(Closing and clearing existing commit log segments...);
 
-while (!queue.isEmpty())
+while (StorageService.tasks.getActiveCount()  0 || !queue.isEmpty())
 Thread.yield();
 
+Uninterruptibles.sleepUninterruptibly(10, TimeUnit.MILLISECONDS);
+
 for (CommitLogSegment segment : Iterables.concat(activeSegments, 
availableSegments))
 segment.close();
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/484d2816/test/unit/org/apache/cassandra/db/RecoveryManagerTest.java
--
diff --git a/test/unit/org/apache/cassandra/db/RecoveryManagerTest.java 
b/test/unit/org/apache/cassandra/db/RecoveryManagerTest.java
index c053211..d14d184 100644
--- a/test/unit/org/apache/cassandra/db/RecoveryManagerTest.java
+++ b/test/unit/org/apache/cassandra/db/RecoveryManagerTest.java
@@ -23,9 +23,11 @@ import java.util.Date;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 
+import org.apache.cassandra.OrderedJUnit4ClassRunner;
 import org.apache.cassandra.Util;
 import org.junit.Assert;
 import org.junit.Test;
+import org.junit.runner.RunWith;
 
 import org.apache.cassandra.SchemaLoader;
 import org.apache.cassandra.db.commitlog.CommitLog;
@@ -35,6 +37,7 @@ import org.apache.cassandra.utils.ByteBufferUtil;
 import static org.apache.cassandra.Util.column;
 import static org.apache.cassandra.db.KeyspaceTest.assertColumns;
 
+@RunWith(OrderedJUnit4ClassRunner.class)
 public class RecoveryManagerTest extends SchemaLoader
 {
 @Test



[3/4] git commit: Add missing iso8601 patterns for date strings

2014-05-21 Thread slebresne
Add missing iso8601 patterns for date strings

patch by chander; reviewed by slebresne for CASSANDRA-6973


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

Branch: refs/heads/cassandra-2.1
Commit: 2635632270289fbbab2f3e3181f20aa98c34a879
Parents: 484d281
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed May 21 17:29:12 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed May 21 17:29:12 2014 +0200

--
 CHANGES.txt |  4 +
 .../apache/cassandra/db/marshal/DateType.java   | 41 +--
 .../cassandra/db/marshal/TimeUUIDType.java  |  6 +-
 .../cassandra/db/marshal/TimestampType.java | 43 +--
 .../apache/cassandra/db/marshal/UUIDType.java   | 38 ++
 .../serializers/TimestampSerializer.java| 68 ++---
 .../serializers/TimestampSerializerTest.java| 77 
 7 files changed, 152 insertions(+), 125 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/26356322/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 3f8e3d0..bddb1d1 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,7 @@
+2.0.9
+ * Add missing iso8601 patterns for date strings (6973)
+
+
 2.0.8
  * Always reallocate buffers in HSHA (CASSANDRA-6285)
  * (Hadoop) support authentication in CqlRecordReader (CASSANDRA-7221)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/26356322/src/java/org/apache/cassandra/db/marshal/DateType.java
--
diff --git a/src/java/org/apache/cassandra/db/marshal/DateType.java 
b/src/java/org/apache/cassandra/db/marshal/DateType.java
index 8e28bd4..0c97688 100644
--- a/src/java/org/apache/cassandra/db/marshal/DateType.java
+++ b/src/java/org/apache/cassandra/db/marshal/DateType.java
@@ -38,9 +38,6 @@ public class DateType extends AbstractTypeDate
 
 public static final DateType instance = new DateType();
 
-static final String DEFAULT_FORMAT = 
TimestampSerializer.iso8601Patterns[3];
-static final SimpleDateFormat FORMATTER = new 
SimpleDateFormat(DEFAULT_FORMAT);
-
 DateType() {} // singleton
 
 public int compare(ByteBuffer o1, ByteBuffer o2)
@@ -63,43 +60,7 @@ public class DateType extends AbstractTypeDate
   if (source.isEmpty())
   return ByteBufferUtil.EMPTY_BYTE_BUFFER;
 
-  return ByteBufferUtil.bytes(dateStringToTimestamp(source));
-}
-
-public static long dateStringToTimestamp(String source) throws 
MarshalException
-{
-  long millis;
-
-  if (source.toLowerCase().equals(now))
-  {
-  millis = System.currentTimeMillis();
-  }
-  // Milliseconds since epoch?
-  else if (source.matches(^-?\\d+$))
-  {
-  try
-  {
-  millis = Long.parseLong(source);
-  }
-  catch (NumberFormatException e)
-  {
-  throw new MarshalException(String.format(unable to make long 
(for date) from: '%s', source), e);
-  }
-  }
-  // Last chance, attempt to parse as date-time string
-  else
-  {
-  try
-  {
-  millis = DateUtils.parseDateStrictly(source, 
TimestampSerializer.iso8601Patterns).getTime();
-  }
-  catch (ParseException e1)
-  {
-  throw new MarshalException(String.format(unable to coerce '%s' 
to a  formatted date (long), source), e1);
-  }
-  }
-
-  return millis;
+  return 
ByteBufferUtil.bytes(TimestampSerializer.dateStringToTimestamp(source));
 }
 
 @Override

http://git-wip-us.apache.org/repos/asf/cassandra/blob/26356322/src/java/org/apache/cassandra/db/marshal/TimeUUIDType.java
--
diff --git a/src/java/org/apache/cassandra/db/marshal/TimeUUIDType.java 
b/src/java/org/apache/cassandra/db/marshal/TimeUUIDType.java
index 51cf47a..fa82f06 100644
--- a/src/java/org/apache/cassandra/db/marshal/TimeUUIDType.java
+++ b/src/java/org/apache/cassandra/db/marshal/TimeUUIDType.java
@@ -25,6 +25,7 @@ import org.apache.cassandra.cql3.CQL3Type;
 import org.apache.cassandra.serializers.TypeSerializer;
 import org.apache.cassandra.serializers.MarshalException;
 import org.apache.cassandra.serializers.TimeUUIDSerializer;
+import org.apache.cassandra.serializers.TimestampSerializer;
 import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.cassandra.utils.UUIDGen;
 
@@ -110,9 +111,10 @@ public class TimeUUIDType extends AbstractTypeUUID
 
 if 

[1/4] git commit: Invalidate key cache on table drop

2014-05-21 Thread slebresne
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 82be86a56 - e024a1cc2


Invalidate key cache on table drop

patch by thobbs; reviewed by slebresne for CASSANDRA-6525


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

Branch: refs/heads/cassandra-2.1
Commit: ca213ccdc029e74f548115dfbb61c65d221e5e42
Parents: 20e058b
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed May 21 11:44:50 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed May 21 11:44:50 2014 +0200

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ca213ccd/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index bd0031e..432d688 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -47,6 +47,7 @@
  * Proper null handle for IF with map element access (CASSANDRA-7155)
  * Improve compaction visibility (CASSANDRA-7242)
  * Fix 2ndary index queries with DESC clustering order (CASSANDRA-6950)
+ * Invalid key cache entries on DROP (CASSANDRA-6525)
 Merged from 1.2:
  * Add Cloudstack snitch (CASSANDRA-7147)
  * Update system.peers correctly when relocating tokens (CASSANDRA-7126)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ca213ccd/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
--
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java 
b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 3fac640..709935a 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -37,6 +37,7 @@ import org.cliffc.high_scale_lib.NonBlockingHashMap;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import org.apache.cassandra.cache.KeyCacheKey;
 import org.apache.cassandra.cache.IRowCacheEntry;
 import org.apache.cassandra.cache.RowCacheKey;
 import org.apache.cassandra.cache.RowCacheSentinel;
@@ -339,6 +340,11 @@ public class ColumnFamilyStore implements 
ColumnFamilyStoreMBean
 for (RowCacheKey key : CacheService.instance.rowCache.getKeySet())
 if (key.cfId == metadata.cfId)
 invalidateCachedRow(key);
+
+String ksname = keyspace.getName();
+for (KeyCacheKey key : CacheService.instance.keyCache.getKeySet())
+if (key.getPathInfo().left.equals(ksname)  
key.getPathInfo().right.equals(name))
+CacheService.instance.keyCache.remove(key);
 }
 
 /**



[jira] [Updated] (CASSANDRA-7279) MultiSliceTest.test_with_overlap* unit tests failing in trunk

2014-05-21 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-7279:
--

Issue Type: Bug  (was: Test)

 MultiSliceTest.test_with_overlap* unit tests failing in trunk
 -

 Key: CASSANDRA-7279
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7279
 Project: Cassandra
  Issue Type: Bug
  Components: Tests
Reporter: Michael Shuler
Assignee: Michael Shuler
Priority: Minor
 Fix For: 2.1 rc1


 Example:
 https://cassci.datastax.com/job/trunk_utest/623/testReport/org.apache.cassandra.thrift/MultiSliceTest/



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


[3/5] git commit: Add missing iso8601 patterns for date strings

2014-05-21 Thread slebresne
Add missing iso8601 patterns for date strings

patch by chander; reviewed by slebresne for CASSANDRA-6973


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

Branch: refs/heads/trunk
Commit: 2635632270289fbbab2f3e3181f20aa98c34a879
Parents: 484d281
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed May 21 17:29:12 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed May 21 17:29:12 2014 +0200

--
 CHANGES.txt |  4 +
 .../apache/cassandra/db/marshal/DateType.java   | 41 +--
 .../cassandra/db/marshal/TimeUUIDType.java  |  6 +-
 .../cassandra/db/marshal/TimestampType.java | 43 +--
 .../apache/cassandra/db/marshal/UUIDType.java   | 38 ++
 .../serializers/TimestampSerializer.java| 68 ++---
 .../serializers/TimestampSerializerTest.java| 77 
 7 files changed, 152 insertions(+), 125 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/26356322/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 3f8e3d0..bddb1d1 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,7 @@
+2.0.9
+ * Add missing iso8601 patterns for date strings (6973)
+
+
 2.0.8
  * Always reallocate buffers in HSHA (CASSANDRA-6285)
  * (Hadoop) support authentication in CqlRecordReader (CASSANDRA-7221)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/26356322/src/java/org/apache/cassandra/db/marshal/DateType.java
--
diff --git a/src/java/org/apache/cassandra/db/marshal/DateType.java 
b/src/java/org/apache/cassandra/db/marshal/DateType.java
index 8e28bd4..0c97688 100644
--- a/src/java/org/apache/cassandra/db/marshal/DateType.java
+++ b/src/java/org/apache/cassandra/db/marshal/DateType.java
@@ -38,9 +38,6 @@ public class DateType extends AbstractTypeDate
 
 public static final DateType instance = new DateType();
 
-static final String DEFAULT_FORMAT = 
TimestampSerializer.iso8601Patterns[3];
-static final SimpleDateFormat FORMATTER = new 
SimpleDateFormat(DEFAULT_FORMAT);
-
 DateType() {} // singleton
 
 public int compare(ByteBuffer o1, ByteBuffer o2)
@@ -63,43 +60,7 @@ public class DateType extends AbstractTypeDate
   if (source.isEmpty())
   return ByteBufferUtil.EMPTY_BYTE_BUFFER;
 
-  return ByteBufferUtil.bytes(dateStringToTimestamp(source));
-}
-
-public static long dateStringToTimestamp(String source) throws 
MarshalException
-{
-  long millis;
-
-  if (source.toLowerCase().equals(now))
-  {
-  millis = System.currentTimeMillis();
-  }
-  // Milliseconds since epoch?
-  else if (source.matches(^-?\\d+$))
-  {
-  try
-  {
-  millis = Long.parseLong(source);
-  }
-  catch (NumberFormatException e)
-  {
-  throw new MarshalException(String.format(unable to make long 
(for date) from: '%s', source), e);
-  }
-  }
-  // Last chance, attempt to parse as date-time string
-  else
-  {
-  try
-  {
-  millis = DateUtils.parseDateStrictly(source, 
TimestampSerializer.iso8601Patterns).getTime();
-  }
-  catch (ParseException e1)
-  {
-  throw new MarshalException(String.format(unable to coerce '%s' 
to a  formatted date (long), source), e1);
-  }
-  }
-
-  return millis;
+  return 
ByteBufferUtil.bytes(TimestampSerializer.dateStringToTimestamp(source));
 }
 
 @Override

http://git-wip-us.apache.org/repos/asf/cassandra/blob/26356322/src/java/org/apache/cassandra/db/marshal/TimeUUIDType.java
--
diff --git a/src/java/org/apache/cassandra/db/marshal/TimeUUIDType.java 
b/src/java/org/apache/cassandra/db/marshal/TimeUUIDType.java
index 51cf47a..fa82f06 100644
--- a/src/java/org/apache/cassandra/db/marshal/TimeUUIDType.java
+++ b/src/java/org/apache/cassandra/db/marshal/TimeUUIDType.java
@@ -25,6 +25,7 @@ import org.apache.cassandra.cql3.CQL3Type;
 import org.apache.cassandra.serializers.TypeSerializer;
 import org.apache.cassandra.serializers.MarshalException;
 import org.apache.cassandra.serializers.TimeUUIDSerializer;
+import org.apache.cassandra.serializers.TimestampSerializer;
 import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.cassandra.utils.UUIDGen;
 
@@ -110,9 +111,10 @@ public class TimeUUIDType extends AbstractTypeUUID
 
 if 

[2/5] git commit: Fix flapping RecoveryManagerTest

2014-05-21 Thread slebresne
Fix flapping RecoveryManagerTest

patch by benedict; reviewed by jbellis for CASSANDRA-7084


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

Branch: refs/heads/trunk
Commit: 484d2816940cd2eb22d2365fcb376dd27e059e2e
Parents: ca213cc
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed May 21 11:48:21 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed May 21 11:48:21 2014 +0200

--
 CHANGES.txt| 1 +
 .../org/apache/cassandra/db/commitlog/CommitLogAllocator.java  | 6 --
 test/unit/org/apache/cassandra/db/RecoveryManagerTest.java | 3 +++
 3 files changed, 8 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/484d2816/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 432d688..3f8e3d0 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -48,6 +48,7 @@
  * Improve compaction visibility (CASSANDRA-7242)
  * Fix 2ndary index queries with DESC clustering order (CASSANDRA-6950)
  * Invalid key cache entries on DROP (CASSANDRA-6525)
+ * Fix flapping RecoveryManagerTest (CASSANDRA-7084)
 Merged from 1.2:
  * Add Cloudstack snitch (CASSANDRA-7147)
  * Update system.peers correctly when relocating tokens (CASSANDRA-7126)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/484d2816/src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java
--
diff --git a/src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java 
b/src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java
index 3009a63..7ab062b 100644
--- a/src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java
+++ b/src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java
@@ -29,6 +29,7 @@ import java.util.concurrent.ConcurrentLinkedQueue;
 import java.util.concurrent.atomic.AtomicLong;
 
 import com.google.common.collect.Iterables;
+import com.google.common.util.concurrent.Uninterruptibles;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -36,7 +37,6 @@ import org.apache.cassandra.config.DatabaseDescriptor;
 import org.apache.cassandra.config.Schema;
 import org.apache.cassandra.db.ColumnFamilyStore;
 import org.apache.cassandra.db.Keyspace;
-import org.apache.cassandra.io.FSError;
 import org.apache.cassandra.io.util.FileUtils;
 import org.apache.cassandra.net.MessagingService;
 import org.apache.cassandra.service.StorageService;
@@ -343,9 +343,11 @@ public class CommitLogAllocator
 {
 logger.debug(Closing and clearing existing commit log segments...);
 
-while (!queue.isEmpty())
+while (StorageService.tasks.getActiveCount()  0 || !queue.isEmpty())
 Thread.yield();
 
+Uninterruptibles.sleepUninterruptibly(10, TimeUnit.MILLISECONDS);
+
 for (CommitLogSegment segment : Iterables.concat(activeSegments, 
availableSegments))
 segment.close();
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/484d2816/test/unit/org/apache/cassandra/db/RecoveryManagerTest.java
--
diff --git a/test/unit/org/apache/cassandra/db/RecoveryManagerTest.java 
b/test/unit/org/apache/cassandra/db/RecoveryManagerTest.java
index c053211..d14d184 100644
--- a/test/unit/org/apache/cassandra/db/RecoveryManagerTest.java
+++ b/test/unit/org/apache/cassandra/db/RecoveryManagerTest.java
@@ -23,9 +23,11 @@ import java.util.Date;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 
+import org.apache.cassandra.OrderedJUnit4ClassRunner;
 import org.apache.cassandra.Util;
 import org.junit.Assert;
 import org.junit.Test;
+import org.junit.runner.RunWith;
 
 import org.apache.cassandra.SchemaLoader;
 import org.apache.cassandra.db.commitlog.CommitLog;
@@ -35,6 +37,7 @@ import org.apache.cassandra.utils.ByteBufferUtil;
 import static org.apache.cassandra.Util.column;
 import static org.apache.cassandra.db.KeyspaceTest.assertColumns;
 
+@RunWith(OrderedJUnit4ClassRunner.class)
 public class RecoveryManagerTest extends SchemaLoader
 {
 @Test



[jira] [Commented] (CASSANDRA-6421) Add bash completion to nodetool

2014-05-21 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-6421:
---

WDYT [~mshuler]?

 Add bash completion to nodetool
 ---

 Key: CASSANDRA-6421
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6421
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Reporter: Cyril Scetbon
Assignee: Michael Shuler
Priority: Trivial
 Fix For: 2.1 rc1


 You can find the bash-completion file at 
 https://raw.github.com/cscetbon/cassandra/nodetool-completion/etc/bash_completion.d/nodetool
 it uses cqlsh to get keyspaces and namespaces and could use an environment 
 variable (not implemented) to get access which cqlsh if authentification is 
 needed. But I think that's really a good start :)



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


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

2014-05-21 Thread slebresne
Merge branch 'cassandra-2.0' into cassandra-2.1

Conflicts:
CHANGES.txt
src/java/org/apache/cassandra/db/ColumnFamilyStore.java
src/java/org/apache/cassandra/db/commitlog/CommitLogAllocator.java


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

Branch: refs/heads/trunk
Commit: e024a1cc2ba9e50f1272ad76cb34582e38c256be
Parents: 82be86a 2635632
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed May 21 17:49:40 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed May 21 17:49:40 2014 +0200

--
 CHANGES.txt |  3 +
 .../apache/cassandra/db/ColumnFamilyStore.java  |  1 +
 .../apache/cassandra/db/marshal/DateType.java   | 38 +-
 .../cassandra/db/marshal/TimeUUIDType.java  |  6 +-
 .../cassandra/db/marshal/TimestampType.java | 43 +--
 .../apache/cassandra/db/marshal/UUIDType.java   | 38 ++
 .../serializers/TimestampSerializer.java| 68 ++---
 .../apache/cassandra/service/CacheService.java  | 11 +++
 .../cassandra/db/RecoveryManagerTest.java   |  3 +
 .../serializers/TimestampSerializerTest.java| 77 
 10 files changed, 166 insertions(+), 122 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e024a1cc/CHANGES.txt
--
diff --cc CHANGES.txt
index 0b8be6e,bddb1d1..209ff70
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -57,7 -32,27 +57,10 @@@ Merged from 2.0
   * Re-add parameter columns to tracing session (CASSANDRA-6942)
   * Fix writetime/ttl functions for static columns (CASSANDRA-7081)
   * Suggest CTRL-C or semicolon after three blank lines in cqlsh 
(CASSANDRA-7142)
 - * (Hadoop) support authentication in CqlRecordReader (CASSANDRA-7221)
 - * (Hadoop) Close java driver Cluster in CQLRR.close (CASSANDRA-7228)
 - * Fix potential SlabAllocator yield-starvation (CASSANDRA-7133)
 - * Warn when 'USING TIMESTAMP' is used on a CAS BATCH (CASSANDRA-7067)
 - * Starting threads in OutboundTcpConnectionPool constructor causes race 
conditions (CASSANDRA-7177)
 - * return all cpu values from BackgroundActivityMonitor.readAndCompute 
(CASSANDRA-7183)
 - * fix c* launch issues on Russian os's due to output of linux 'free' cmd 
(CASSANDRA-6162)
 - * Fix disabling autocompaction (CASSANDRA-7187)
 - * Fix potential NumberFormatException when deserializing IntegerType 
(CASSANDRA-7088)
 - * cqlsh can't tab-complete disabling compaction (CASSANDRA-7185)
 - * cqlsh: Accept and execute CQL statement(s) from command-line parameter 
(CASSANDRA-7172)
 - * Fix IllegalStateException in CqlPagingRecordReader (CASSANDRA-7198)
 - * Fix the InvertedIndex trigger example (CASSANDRA-7211)
 - * Add --resolve-ip option to 'nodetool ring' (CASSANDRA-7210)
 - * Fix duplicated error messages on directory creation error at startup 
(CASSANDRA-5818)
 - * reduce garbage on codec flag deserialization (CASSANDRA-7244) 
 - * Proper null handle for IF with map element access (CASSANDRA-7155)
 - * Improve compaction visibility (CASSANDRA-7242)
   * Fix 2ndary index queries with DESC clustering order (CASSANDRA-6950)
+  * Invalid key cache entries on DROP (CASSANDRA-6525)
+  * Fix flapping RecoveryManagerTest (CASSANDRA-7084)
++ * Add missing iso8601 patterns for date strings (6973)
  Merged from 1.2:
   * Add Cloudstack snitch (CASSANDRA-7147)
   * Update system.peers correctly when relocating tokens (CASSANDRA-7126)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e024a1cc/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
--
diff --cc src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 3786ef5,709935a..4d334e7
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@@ -372,7 -337,14 +372,8 @@@ public class ColumnFamilyStore implemen
  data.unreferenceSSTables();
  indexManager.invalidate();
  
 -for (RowCacheKey key : CacheService.instance.rowCache.getKeySet())
 -if (key.cfId == metadata.cfId)
 -invalidateCachedRow(key);
 -
 -String ksname = keyspace.getName();
 -for (KeyCacheKey key : CacheService.instance.keyCache.getKeySet())
 -if (key.getPathInfo().left.equals(ksname)  
key.getPathInfo().right.equals(name))
 -CacheService.instance.keyCache.remove(key);
 +CacheService.instance.invalidateRowCacheForCf(metadata.cfId);
++CacheService.instance.invalidateKeyCacheForCf(metadata.cfId);
  }

[jira] [Updated] (CASSANDRA-7010) bootstrap_test simple_bootstrap_test dtest fails in 2.1

2014-05-21 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-7010:
--

Issue Type: Bug  (was: Test)

 bootstrap_test simple_bootstrap_test dtest fails in 2.1
 ---

 Key: CASSANDRA-7010
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7010
 Project: Cassandra
  Issue Type: Bug
  Components: Tests
Reporter: Michael Shuler
 Fix For: 2.1 rc1


 I patched ccm with https://github.com/pcmanus/ccm/pull/109 and got an error 
 from simple_bootstrap:
 {noformat}
 ==
 FAIL: simple_bootstrap_test (bootstrap_test.TestBootstrap)
 --
 Traceback (most recent call last):
   File /home/mshuler/git/cassandra-dtest/bootstrap_test.py, line 58, in 
 simple_bootstrap_test
 assert_almost_equal(initial_size, 2 * size1)
   File /home/mshuler/git/cassandra-dtest/assertions.py, line 26, in 
 assert_almost_equal
 assert vmin  vmax * (1.0 - error), values not within %.2f%% of the max: 
 %s % (error * 100, args)
 AssertionError: values not within 16.00% of the max: (0, 186396)
 {noformat}



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


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

2014-05-21 Thread slebresne
Merge branch 'cassandra-2.1' into trunk

Conflicts:
src/java/org/apache/cassandra/db/marshal/TimeUUIDType.java
src/java/org/apache/cassandra/db/marshal/UUIDType.java


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

Branch: refs/heads/trunk
Commit: 91741025cd81d3d62408edcac25c29ae23adb2a0
Parents: a519c0a e024a1c
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed May 21 17:54:27 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed May 21 17:54:27 2014 +0200

--
 CHANGES.txt |  3 +
 .../apache/cassandra/db/ColumnFamilyStore.java  |  1 +
 .../apache/cassandra/db/marshal/DateType.java   | 38 +-
 .../cassandra/db/marshal/TimestampType.java | 43 +--
 .../serializers/TimestampSerializer.java| 68 ++---
 .../apache/cassandra/service/CacheService.java  | 11 +++
 .../cassandra/db/RecoveryManagerTest.java   |  3 +
 .../serializers/TimestampSerializerTest.java| 77 
 8 files changed, 155 insertions(+), 89 deletions(-)
--


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



[jira] [Updated] (CASSANDRA-7201) Regression: ColumnFamilyStoreTest, NativeCellTest, SSTableMetadataTest unit tests on 2.1

2014-05-21 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-7201:
--

Issue Type: Bug  (was: Test)

 Regression: ColumnFamilyStoreTest, NativeCellTest, SSTableMetadataTest unit 
 tests on 2.1
 

 Key: CASSANDRA-7201
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7201
 Project: Cassandra
  Issue Type: Bug
  Components: Tests
Reporter: Michael Shuler
Assignee: Benedict
  Labels: qa-resolved
 Fix For: 2.1 rc1

 Attachments: 7201.2.txt, 7201.txt


 http://cassci.datastax.com/job/cassandra-2.1_utest/252/testReport/
 {noformat}
 REGRESSION:  
 org.apache.cassandra.db.ColumnFamilyStoreTest.testSliceByNamesCommandOnUUIDTypeSCF
 Error Message:
 null
 Stack Trace:
 java.lang.NullPointerException
 at 
 org.apache.cassandra.db.ColumnFamilyStoreTest.testSliceByNamesCommandOnUUIDTypeSCF(ColumnFamilyStoreTest.java:992)
 REGRESSION:  org.apache.cassandra.db.NativeCellTest.testCells
 Error Message:
 null
 Stack Trace:
 java.lang.IllegalArgumentException
 at java.nio.Buffer.position(Buffer.java:236)
 at 
 org.apache.cassandra.db.context.CounterContext.updateDigest(CounterContext.java:659)
 at 
 org.apache.cassandra.db.NativeCounterCell.updateDigest(NativeCounterCell.java:139)
 at org.apache.cassandra.db.NativeCellTest.test(NativeCellTest.java:148)
 at 
 org.apache.cassandra.db.NativeCellTest.testCells(NativeCellTest.java:132)
 REGRESSION:  
 org.apache.cassandra.io.sstable.SSTableMetadataTest.testLegacyCounterShardTracking
 Error Message:
 null
 Stack Trace:
 junit.framework.AssertionFailedError: 
 at 
 org.apache.cassandra.io.sstable.SSTableMetadataTest.testLegacyCounterShardTracking(SSTableMetadataTest.java:306)
 {noformat}
 All 3 tests bisect to:
 {noformat}
 commit 1ac72f637cdfc9876d2d121302061e46ac104bf8
 Author: Jonathan Ellis jbel...@apache.org
 Date:   Thu May 8 16:44:35 2014 -0500
 prefer MemoryUtil.getByteBuffer to JNA Native.getDirectByteBuffer; 
 specify native endian on the former
 patch by bes; reviewed by jbellis for CASSANDRA-6575
 {noformat}



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


[jira] [Created] (CASSANDRA-7280) Hadoop support not respecting cassandra.input.split.size

2014-05-21 Thread Jeremy Hanna (JIRA)
Jeremy Hanna created CASSANDRA-7280:
---

 Summary: Hadoop support not respecting cassandra.input.split.size
 Key: CASSANDRA-7280
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7280
 Project: Cassandra
  Issue Type: Bug
  Components: Hadoop
Reporter: Jeremy Hanna


Long ago (0.7), I tried to set the cassandra.input.split.size property and 
never really got it to respect that property.  However the batch size was 
useful for what I needed to affect the timeouts.

Now with the cql record reader and the native paging, users can specify queries 
potentially using allow filtering clauses.  The input split size is more 
important because the server may have to scan through many many records to get 
matching records.  If the user can effectively set the input split size, then 
that gives a hard limit on how many records it will traverse.

Currently it appears to be overriding the property, perhaps in the 
client.describe_splits_ex method on the server side.

It can be argued that users shouldn't be using allow filtering clauses in their 
cql in the first place.  However it is still a bug that the input split size is 
not honored.



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


[1/5] git commit: Invalidate key cache on table drop

2014-05-21 Thread slebresne
Repository: cassandra
Updated Branches:
  refs/heads/trunk a519c0a6d - 91741025c


Invalidate key cache on table drop

patch by thobbs; reviewed by slebresne for CASSANDRA-6525


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

Branch: refs/heads/trunk
Commit: ca213ccdc029e74f548115dfbb61c65d221e5e42
Parents: 20e058b
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Wed May 21 11:44:50 2014 +0200
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Wed May 21 11:44:50 2014 +0200

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ca213ccd/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index bd0031e..432d688 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -47,6 +47,7 @@
  * Proper null handle for IF with map element access (CASSANDRA-7155)
  * Improve compaction visibility (CASSANDRA-7242)
  * Fix 2ndary index queries with DESC clustering order (CASSANDRA-6950)
+ * Invalid key cache entries on DROP (CASSANDRA-6525)
 Merged from 1.2:
  * Add Cloudstack snitch (CASSANDRA-7147)
  * Update system.peers correctly when relocating tokens (CASSANDRA-7126)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ca213ccd/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
--
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java 
b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 3fac640..709935a 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -37,6 +37,7 @@ import org.cliffc.high_scale_lib.NonBlockingHashMap;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import org.apache.cassandra.cache.KeyCacheKey;
 import org.apache.cassandra.cache.IRowCacheEntry;
 import org.apache.cassandra.cache.RowCacheKey;
 import org.apache.cassandra.cache.RowCacheSentinel;
@@ -339,6 +340,11 @@ public class ColumnFamilyStore implements 
ColumnFamilyStoreMBean
 for (RowCacheKey key : CacheService.instance.rowCache.getKeySet())
 if (key.cfId == metadata.cfId)
 invalidateCachedRow(key);
+
+String ksname = keyspace.getName();
+for (KeyCacheKey key : CacheService.instance.keyCache.getKeySet())
+if (key.getPathInfo().left.equals(ksname)  
key.getPathInfo().right.equals(name))
+CacheService.instance.keyCache.remove(key);
 }
 
 /**



[jira] [Updated] (CASSANDRA-7279) MultiSliceTest.test_with_overlap* unit tests failing in trunk

2014-05-21 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-7279:
--

Assignee: T Jake Luciani  (was: Michael Shuler)

 MultiSliceTest.test_with_overlap* unit tests failing in trunk
 -

 Key: CASSANDRA-7279
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7279
 Project: Cassandra
  Issue Type: Bug
  Components: Tests
Reporter: Michael Shuler
Assignee: T Jake Luciani
Priority: Minor
 Fix For: 2.1 rc1


 Example:
 https://cassci.datastax.com/job/trunk_utest/623/testReport/org.apache.cassandra.thrift/MultiSliceTest/



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


[jira] [Commented] (CASSANDRA-6975) Allow usage of QueryOptions in CQLStatement.executeInternal

2014-05-21 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-6975:
-

bq. Can you commit the first commit to 2.0, too?

Can do, once it's been reviewed.

 Allow usage of QueryOptions in CQLStatement.executeInternal
 ---

 Key: CASSANDRA-6975
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6975
 Project: Cassandra
  Issue Type: Improvement
Reporter: Mikhail Stepura
Assignee: Sylvain Lebresne
Priority: Minor
 Fix For: 2.1 rc1

 Attachments: cassandra-2.1-executeInternal.patch


 The current implementations of {{CQLStatement.executeInternal}} accept only 
 {{QueryState}} as a parameter. That means it's impossible to use prepared 
 statements with variables for internal calls (you can only pass the variables 
 via {{QueryOptions}}). We also can't use the internal paging in internal 
 SELECT statements for the very same reason.
 I'm attaching the patch which implements that.
 [~slebresne] [~iamaleksey] what do you think guys?



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


[jira] [Updated] (CASSANDRA-5220) Repair improvements when using vnodes

2014-05-21 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-5220:
--

Fix Version/s: (was: 2.1 rc1)
   2.1.1

 Repair improvements when using vnodes
 -

 Key: CASSANDRA-5220
 URL: https://issues.apache.org/jira/browse/CASSANDRA-5220
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 1.2.0 beta 1
Reporter: Brandon Williams
Assignee: Yuki Morishita
  Labels: performance, repair
 Fix For: 2.1.1

 Attachments: 5220-yourkit.png, 5220-yourkit.tar.bz2


 Currently when using vnodes, repair takes much longer to complete than 
 without them.  This appears at least in part because it's using a session per 
 range and processing them sequentially.  This generates a lot of log spam 
 with vnodes, and while being gentler and lighter on hard disk deployments, 
 ssd-based deployments would often prefer that repair be as fast as possible.



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


[jira] [Updated] (CASSANDRA-6962) examine shortening path length post-5202

2014-05-21 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-6962:
--

Fix Version/s: (was: 2.1 rc1)
   3.0

 examine shortening path length post-5202
 

 Key: CASSANDRA-6962
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6962
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Brandon Williams
Assignee: Yuki Morishita
 Fix For: 3.0

 Attachments: 6962-2.1.txt


 From CASSANDRA-5202 discussion:
 {quote}
 Did we give up on this?
 Could we clean up the redundancy a little by moving the ID into the directory 
 name? e.g., ks/cf-uuid/version-generation-component.db
 I'm worried about path length, which is limited on Windows.
 Edit: to give a specific example, for KS foo Table bar we now have
 /var/lib/cassandra/flush/foo/bar-2fbb89709a6911e3b7dc4d7d4e3ca4b4/foo-bar-ka-1-Data.db
 I'm proposing
 /var/lib/cassandra/flush/foo/bar-2fbb89709a6911e3b7dc4d7d4e3ca4b4/ka-1-Data.db
 {quote}



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


[jira] [Commented] (CASSANDRA-3569) Failure detector downs should not break streams

2014-05-21 Thread Joshua McKenzie (JIRA)

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

Joshua McKenzie commented on CASSANDRA-3569:


Using the iptables method to block traffic - the sending node is clearing out 
all repair sessions as I'd expect so I'm not seeing the same thing you are on 
that side.  On the receiving side, however, it's just silently hanging on the 
repair sessions even after .  Even though we're futzing with iptables which is 
pretty artificial, netstat shows the TCP connections have been severed which 
should bubble up and remove those streams.

 Failure detector downs should not break streams
 ---

 Key: CASSANDRA-3569
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3569
 Project: Cassandra
  Issue Type: New Feature
Reporter: Peter Schuller
Assignee: Joshua McKenzie
 Fix For: 2.1.1

 Attachments: 3569-2.0.txt, 3569_v1.txt


 CASSANDRA-2433 introduced this behavior just to get repairs to don't sit 
 there waiting forever. In my opinion the correct fix to that problem is to 
 use TCP keep alive. Unfortunately the TCP keep alive period is insanely high 
 by default on a modern Linux, so just doing that is not entirely good either.
 But using the failure detector seems non-sensicle to me. We have a 
 communication method which is the TCP transport, that we know is used for 
 long-running processes that you don't want to incorrectly be killed for no 
 good reason, and we are using a failure detector tuned to detecting when not 
 to send real-time sensitive request to nodes in order to actively kill a 
 working connection.
 So, rather than add complexity with protocol based ping/pongs and such, I 
 propose that we simply just use TCP keep alive for streaming connections and 
 instruct operators of production clusters to tweak 
 net.ipv4.tcp_keepalive_{probes,intvl} as appropriate (or whatever equivalent 
 on their OS).
 I can submit the patch. Awaiting opinions.



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


[jira] [Commented] (CASSANDRA-6421) Add bash completion to nodetool

2014-05-21 Thread Michael Shuler (JIRA)

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

Michael Shuler commented on CASSANDRA-6421:
---

I pulled this in with additional package changes for 2.1 in CASSANDRA-7160 - I 
like it and have been using it locally for a while. It will be a nice feature. 
I have not gone through all the various differences between nodetool options in 
1.2, 2.0, 2.1 to see what changes might need to be made for each branch. It 
might be close enough to be helpful for most options in 2.1.

 Add bash completion to nodetool
 ---

 Key: CASSANDRA-6421
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6421
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Reporter: Cyril Scetbon
Assignee: Michael Shuler
Priority: Trivial
 Fix For: 2.1 rc1


 You can find the bash-completion file at 
 https://raw.github.com/cscetbon/cassandra/nodetool-completion/etc/bash_completion.d/nodetool
 it uses cqlsh to get keyspaces and namespaces and could use an environment 
 variable (not implemented) to get access which cqlsh if authentification is 
 needed. But I think that's really a good start :)



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


[jira] [Assigned] (CASSANDRA-7120) Bad paging state returned for prepared statements for last page

2014-05-21 Thread Tyler Hobbs (JIRA)

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

Tyler Hobbs reassigned CASSANDRA-7120:
--

Assignee: Tyler Hobbs  (was: Sylvain Lebresne)

 Bad paging state returned for prepared statements for last page
 ---

 Key: CASSANDRA-7120
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7120
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Tyler Hobbs
Assignee: Tyler Hobbs
 Fix For: 2.1 rc1


 When executing a paged query with a prepared statement, a non-null paging 
 state is sometimes being returned for the final page, causing an endless 
 paging loop.
 Specifically, this is the schema being used:
 {noformat}
 CREATE KEYSPACE test3rf WITH replication = {'class': 'SimpleStrategy', 
 'replication_factor': '3'}';
 USE test3rf;
 CREATE TABLE test3rf.test (
 k int PRIMARY KEY,
 v int
 )
 {noformat}
 The inserts are like so:
 {noformat}
 INSERT INTO test3rf.test (k, v) VALUES (?, 0)
 {noformat}
 With values from [0, 99] used for k.
 The query is {{SELECT * FROM test3rf.test}} with a fetch size of 3.
 The final page returns the row with k=3, and the paging state is 
 {{000400420004000176007fa2}}.  This matches the paging state from 
 three pages earlier.  When executing this with a non-prepared statement, no 
 paging state is returned for this page.
 This problem doesn't happen with the 2.0 branch.



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


[jira] [Assigned] (CASSANDRA-7245) Out-of-Order keys with stress + CQL3

2014-05-21 Thread T Jake Luciani (JIRA)

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

T Jake Luciani reassigned CASSANDRA-7245:
-

Assignee: T Jake Luciani

 Out-of-Order keys with stress + CQL3
 

 Key: CASSANDRA-7245
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7245
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Pavel Yaskevich
Assignee: T Jake Luciani
 Fix For: 2.1 rc1


 We have been generating data (stress with CQL3 prepared) for CASSANDRA-4718 
 and found following problem almost in every SSTable generated (~200 GB of 
 data and 821 SSTables).
 We set up they keys to be 10 bytes in size (default) and population between 1 
 and 6.
 Once I ran 'sstablekeys' on the generated SSTable files I got following 
 exceptions:
 _There is a problem with sorting of normal looking keys:_
 30303039443538353645
 30303039443745364242
 java.io.IOException: Key out of order! DecoratedKey(-217680888487824985, 
 *30303039443745364242*)  DecoratedKey(-1767746583617597213, 
 *30303039443437454333*)
 0a30303033343933
 3734441388343933
 java.io.IOException: Key out of order! DecoratedKey(5440473860101999581, 
 *3734441388343933*)  DecoratedKey(-7565486415339257200, 
 *30303033344639443137*)
 30303033354244363031
 30303033354133423742
 java.io.IOException: Key out of order! DecoratedKey(2687072396429900180, 
 *30303033354133423742*)  DecoratedKey(-7838239767410066684, 
 *30303033354145344534*)
 30303034313442354137
 3034313635363334
 java.io.IOException: Key out of order! DecoratedKey(1516003874415400462, 
 *3034313635363334*)  DecoratedKey(-9106177395653818217, 
 *3030303431444238*)
 30303035373044373435
 30303035373044334631
 java.io.IOException: Key out of order! DecoratedKey(-3645715702154616540, 
 *30303035373044334631*)  DecoratedKey(-4296696226469000945, 
 *30303035373132364138*)
 _And completely different ones:_
 30303041333745373543
 7cd045c59a90d7587d8d
 java.io.IOException: Key out of order! DecoratedKey(-3595402345023230196, 
 *7cd045c59a90d7587d8d*)  DecoratedKey(-5146766422778260690, 
 *30303041333943303232*)
 3030303332314144
 30303033323346343932
 java.io.IOException: Key out of order! DecoratedKey(7071845511166615635, 
 *30303033323346343932*)  DecoratedKey(5233296131921119414, 
 *53d83e0012287e03*)
 30303034314531374431
 3806734b256c27e41ec2
 java.io.IOException: Key out of order! DecoratedKey(-7720474642702543193, 
 *3806734b256c27e41ec2*)  DecoratedKey(-8072288379146044663, 
 *30303034314136413343*)
 _And sometimes there is no problem at all:_
 30303033353144463637
 002a31b3b31a1c2f
 5d616dd38211ebb5d6ec
 444236451388
 1388138844463744
 30303033353143394343
 It's worth to mention that we have got 22 timeout exceptions but number of 
 out-of-order keys is much larger than that.



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


[jira] [Updated] (CASSANDRA-7245) Out-of-Order keys with stress + CQL3

2014-05-21 Thread Benedict (JIRA)

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

Benedict updated CASSANDRA-7245:


Fix Version/s: 2.1 rc1

 Out-of-Order keys with stress + CQL3
 

 Key: CASSANDRA-7245
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7245
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Pavel Yaskevich
 Fix For: 2.1 rc1


 We have been generating data (stress with CQL3 prepared) for CASSANDRA-4718 
 and found following problem almost in every SSTable generated (~200 GB of 
 data and 821 SSTables).
 We set up they keys to be 10 bytes in size (default) and population between 1 
 and 6.
 Once I ran 'sstablekeys' on the generated SSTable files I got following 
 exceptions:
 _There is a problem with sorting of normal looking keys:_
 30303039443538353645
 30303039443745364242
 java.io.IOException: Key out of order! DecoratedKey(-217680888487824985, 
 *30303039443745364242*)  DecoratedKey(-1767746583617597213, 
 *30303039443437454333*)
 0a30303033343933
 3734441388343933
 java.io.IOException: Key out of order! DecoratedKey(5440473860101999581, 
 *3734441388343933*)  DecoratedKey(-7565486415339257200, 
 *30303033344639443137*)
 30303033354244363031
 30303033354133423742
 java.io.IOException: Key out of order! DecoratedKey(2687072396429900180, 
 *30303033354133423742*)  DecoratedKey(-7838239767410066684, 
 *30303033354145344534*)
 30303034313442354137
 3034313635363334
 java.io.IOException: Key out of order! DecoratedKey(1516003874415400462, 
 *3034313635363334*)  DecoratedKey(-9106177395653818217, 
 *3030303431444238*)
 30303035373044373435
 30303035373044334631
 java.io.IOException: Key out of order! DecoratedKey(-3645715702154616540, 
 *30303035373044334631*)  DecoratedKey(-4296696226469000945, 
 *30303035373132364138*)
 _And completely different ones:_
 30303041333745373543
 7cd045c59a90d7587d8d
 java.io.IOException: Key out of order! DecoratedKey(-3595402345023230196, 
 *7cd045c59a90d7587d8d*)  DecoratedKey(-5146766422778260690, 
 *30303041333943303232*)
 3030303332314144
 30303033323346343932
 java.io.IOException: Key out of order! DecoratedKey(7071845511166615635, 
 *30303033323346343932*)  DecoratedKey(5233296131921119414, 
 *53d83e0012287e03*)
 30303034314531374431
 3806734b256c27e41ec2
 java.io.IOException: Key out of order! DecoratedKey(-7720474642702543193, 
 *3806734b256c27e41ec2*)  DecoratedKey(-8072288379146044663, 
 *30303034314136413343*)
 _And sometimes there is no problem at all:_
 30303033353144463637
 002a31b3b31a1c2f
 5d616dd38211ebb5d6ec
 444236451388
 1388138844463744
 30303033353143394343
 It's worth to mention that we have got 22 timeout exceptions but number of 
 out-of-order keys is much larger than that.



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


[jira] [Commented] (CASSANDRA-6146) CQL-native stress

2014-05-21 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-6146:
---

bq. I actually like the idea of having the schema in the profile file because 
that way we can ship with a bunch of reasonable and self contained stress 
scenario/profile.

Fair.

bq. I'd typically change slightly the profile to always include the keyspace 
and table name

I like this.

 CQL-native stress
 -

 Key: CASSANDRA-6146
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6146
 Project: Cassandra
  Issue Type: New Feature
  Components: Tools
Reporter: Jonathan Ellis
Assignee: T Jake Luciani
 Fix For: 2.1 rc1

 Attachments: 6146.txt


 The existing CQL support in stress is not worth discussing.  We need to 
 start over, and we might as well kill two birds with one stone and move to 
 the native protocol while we're at it.



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


[jira] [Updated] (CASSANDRA-7245) Out-of-Order keys with stress + CQL3

2014-05-21 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-7245:
--

Assignee: Brandon Williams  (was: T Jake Luciani)

 Out-of-Order keys with stress + CQL3
 

 Key: CASSANDRA-7245
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7245
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Pavel Yaskevich
Assignee: Brandon Williams
 Fix For: 2.1 rc1


 We have been generating data (stress with CQL3 prepared) for CASSANDRA-4718 
 and found following problem almost in every SSTable generated (~200 GB of 
 data and 821 SSTables).
 We set up they keys to be 10 bytes in size (default) and population between 1 
 and 6.
 Once I ran 'sstablekeys' on the generated SSTable files I got following 
 exceptions:
 _There is a problem with sorting of normal looking keys:_
 30303039443538353645
 30303039443745364242
 java.io.IOException: Key out of order! DecoratedKey(-217680888487824985, 
 *30303039443745364242*)  DecoratedKey(-1767746583617597213, 
 *30303039443437454333*)
 0a30303033343933
 3734441388343933
 java.io.IOException: Key out of order! DecoratedKey(5440473860101999581, 
 *3734441388343933*)  DecoratedKey(-7565486415339257200, 
 *30303033344639443137*)
 30303033354244363031
 30303033354133423742
 java.io.IOException: Key out of order! DecoratedKey(2687072396429900180, 
 *30303033354133423742*)  DecoratedKey(-7838239767410066684, 
 *30303033354145344534*)
 30303034313442354137
 3034313635363334
 java.io.IOException: Key out of order! DecoratedKey(1516003874415400462, 
 *3034313635363334*)  DecoratedKey(-9106177395653818217, 
 *3030303431444238*)
 30303035373044373435
 30303035373044334631
 java.io.IOException: Key out of order! DecoratedKey(-3645715702154616540, 
 *30303035373044334631*)  DecoratedKey(-4296696226469000945, 
 *30303035373132364138*)
 _And completely different ones:_
 30303041333745373543
 7cd045c59a90d7587d8d
 java.io.IOException: Key out of order! DecoratedKey(-3595402345023230196, 
 *7cd045c59a90d7587d8d*)  DecoratedKey(-5146766422778260690, 
 *30303041333943303232*)
 3030303332314144
 30303033323346343932
 java.io.IOException: Key out of order! DecoratedKey(7071845511166615635, 
 *30303033323346343932*)  DecoratedKey(5233296131921119414, 
 *53d83e0012287e03*)
 30303034314531374431
 3806734b256c27e41ec2
 java.io.IOException: Key out of order! DecoratedKey(-7720474642702543193, 
 *3806734b256c27e41ec2*)  DecoratedKey(-8072288379146044663, 
 *30303034314136413343*)
 _And sometimes there is no problem at all:_
 30303033353144463637
 002a31b3b31a1c2f
 5d616dd38211ebb5d6ec
 444236451388
 1388138844463744
 30303033353143394343
 It's worth to mention that we have got 22 timeout exceptions but number of 
 out-of-order keys is much larger than that.



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


[jira] [Commented] (CASSANDRA-7144) CassandraDaemon RowMutation exception

2014-05-21 Thread Jason Punyon (JIRA)

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

Jason Punyon commented on CASSANDRA-7144:
-

I'm Jason and I work at Stack Overflow. We're bit by this right now on our 
2.0.6 cluster and we haven't wiped it out yet.

We got to this state on Friday after a power outage took out our entire 
datacenter (https://twitter.com/JasonPunyon/status/467290879569719296). We have 
a 3-node cluster and we interact with it using the CqlSharp library. We do our 
reads and writes at QUORUM, some of them are batches. The first symptom of the 
problem was that both read and write operations were timing out. When we dug 
in, we found that nodes 1 and 3 were throwing errors (not enough responses), 
but node 2 would execute the exact same operations fine at quorum. Nodes 1 and 
3 would execute reads fine at ONE.

We're pretty interested in getting it fixed. Is there any way we can help? 

 CassandraDaemon RowMutation exception
 -

 Key: CASSANDRA-7144
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7144
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: Ubuntu 12.04 w/ Oracle JVM, 5 nodes cluster. Nodes 2GB / 
 2 Cores in DigitalOcean.
Reporter: Maxime Lamothe-Brassard
Assignee: Tyler Hobbs

 First time reporting a bug here, apologies if I'm not posting it in the right 
 space.
 At what seems like random interval, on random nodes in random situations I 
 will get the following exception. After this the hinted handoff start timing 
 out and the node stops participating in the cluster.
 I started seeing these after switching to the Cassandra Python-Driver from 
 the Python-CQL driver.
 {noformat}
 ERROR [WRITE-/10.128.180.108] 2014-05-03 13:45:12,843 CassandraDaemon.java 
 (line 198) Exception in thread Thread[WRITE-/10.128.180.108,5,main]
 java.lang.AssertionError
   at 
 org.apache.cassandra.db.RowMutation$RowMutationSerializer.serialize(RowMutation.java:271)
   at 
 org.apache.cassandra.db.RowMutation$RowMutationSerializer.serialize(RowMutation.java:259)
   at org.apache.cassandra.net.MessageOut.serialize(MessageOut.java:120)
   at 
 org.apache.cassandra.net.OutboundTcpConnection.writeInternal(OutboundTcpConnection.java:251)
   at 
 org.apache.cassandra.net.OutboundTcpConnection.writeConnected(OutboundTcpConnection.java:203)
   at 
 org.apache.cassandra.net.OutboundTcpConnection.run(OutboundTcpConnection.java:151)
 ERROR [WRITE-/10.128.194.70] 2014-05-03 13:45:12,843 CassandraDaemon.java 
 (line 198) Exception in thread Thread[WRITE-/10.128.194.70,5,main]
 java.lang.AssertionError
   at 
 org.apache.cassandra.db.RowMutation$RowMutationSerializer.serialize(RowMutation.java:271)
   at 
 org.apache.cassandra.db.RowMutation$RowMutationSerializer.serialize(RowMutation.java:259)
   at org.apache.cassandra.net.MessageOut.serialize(MessageOut.java:120)
   at 
 org.apache.cassandra.net.OutboundTcpConnection.writeInternal(OutboundTcpConnection.java:251)
   at 
 org.apache.cassandra.net.OutboundTcpConnection.writeConnected(OutboundTcpConnection.java:203)
   at 
 org.apache.cassandra.net.OutboundTcpConnection.run(OutboundTcpConnection.java:151)
 ERROR [MutationStage:118] 2014-05-03 13:45:15,048 CassandraDaemon.java (line 
 198) Exception in thread Thread[MutationStage:118,5,main]
 java.lang.AssertionError
   at 
 org.apache.cassandra.db.RowMutation$RowMutationSerializer.serialize(RowMutation.java:271)
   at 
 org.apache.cassandra.db.RowMutation$RowMutationSerializer.serialize(RowMutation.java:259)
   at 
 org.apache.cassandra.utils.FBUtilities.serialize(FBUtilities.java:654)
   at 
 org.apache.cassandra.db.HintedHandOffManager.hintFor(HintedHandOffManager.java:137)
   at 
 org.apache.cassandra.service.StorageProxy.writeHintForMutation(StorageProxy.java:908)
   at 
 org.apache.cassandra.service.StorageProxy$6.runMayThrow(StorageProxy.java:881)
   at 
 org.apache.cassandra.service.StorageProxy$HintRunnable.run(StorageProxy.java:1981)
   at 
 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
   at java.util.concurrent.FutureTask.run(FutureTask.java:262)
   at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
   at java.lang.Thread.run(Thread.java:744)
 ERROR [MutationStage:117] 2014-05-03 13:45:15,048 CassandraDaemon.java (line 
 198) Exception in thread Thread[MutationStage:117,5,main]
 java.lang.AssertionError
   at 
 org.apache.cassandra.db.RowMutation$RowMutationSerializer.serialize(RowMutation.java:271)
   at 
 

[jira] [Assigned] (CASSANDRA-7245) Out-of-Order keys with stress + CQL3

2014-05-21 Thread T Jake Luciani (JIRA)

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

T Jake Luciani reassigned CASSANDRA-7245:
-

Assignee: T Jake Luciani  (was: Benedict)

 Out-of-Order keys with stress + CQL3
 

 Key: CASSANDRA-7245
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7245
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Pavel Yaskevich
Assignee: T Jake Luciani
 Fix For: 2.1 rc1


 We have been generating data (stress with CQL3 prepared) for CASSANDRA-4718 
 and found following problem almost in every SSTable generated (~200 GB of 
 data and 821 SSTables).
 We set up they keys to be 10 bytes in size (default) and population between 1 
 and 6.
 Once I ran 'sstablekeys' on the generated SSTable files I got following 
 exceptions:
 _There is a problem with sorting of normal looking keys:_
 30303039443538353645
 30303039443745364242
 java.io.IOException: Key out of order! DecoratedKey(-217680888487824985, 
 *30303039443745364242*)  DecoratedKey(-1767746583617597213, 
 *30303039443437454333*)
 0a30303033343933
 3734441388343933
 java.io.IOException: Key out of order! DecoratedKey(5440473860101999581, 
 *3734441388343933*)  DecoratedKey(-7565486415339257200, 
 *30303033344639443137*)
 30303033354244363031
 30303033354133423742
 java.io.IOException: Key out of order! DecoratedKey(2687072396429900180, 
 *30303033354133423742*)  DecoratedKey(-7838239767410066684, 
 *30303033354145344534*)
 30303034313442354137
 3034313635363334
 java.io.IOException: Key out of order! DecoratedKey(1516003874415400462, 
 *3034313635363334*)  DecoratedKey(-9106177395653818217, 
 *3030303431444238*)
 30303035373044373435
 30303035373044334631
 java.io.IOException: Key out of order! DecoratedKey(-3645715702154616540, 
 *30303035373044334631*)  DecoratedKey(-4296696226469000945, 
 *30303035373132364138*)
 _And completely different ones:_
 30303041333745373543
 7cd045c59a90d7587d8d
 java.io.IOException: Key out of order! DecoratedKey(-3595402345023230196, 
 *7cd045c59a90d7587d8d*)  DecoratedKey(-5146766422778260690, 
 *30303041333943303232*)
 3030303332314144
 30303033323346343932
 java.io.IOException: Key out of order! DecoratedKey(7071845511166615635, 
 *30303033323346343932*)  DecoratedKey(5233296131921119414, 
 *53d83e0012287e03*)
 30303034314531374431
 3806734b256c27e41ec2
 java.io.IOException: Key out of order! DecoratedKey(-7720474642702543193, 
 *3806734b256c27e41ec2*)  DecoratedKey(-8072288379146044663, 
 *30303034314136413343*)
 _And sometimes there is no problem at all:_
 30303033353144463637
 002a31b3b31a1c2f
 5d616dd38211ebb5d6ec
 444236451388
 1388138844463744
 30303033353143394343
 It's worth to mention that we have got 22 timeout exceptions but number of 
 out-of-order keys is much larger than that.



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


[jira] [Updated] (CASSANDRA-7245) Out-of-Order keys with stress + CQL3

2014-05-21 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-7245:
--

Assignee: Benedict  (was: Brandon Williams)

 Out-of-Order keys with stress + CQL3
 

 Key: CASSANDRA-7245
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7245
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Pavel Yaskevich
Assignee: Benedict
 Fix For: 2.1 rc1


 We have been generating data (stress with CQL3 prepared) for CASSANDRA-4718 
 and found following problem almost in every SSTable generated (~200 GB of 
 data and 821 SSTables).
 We set up they keys to be 10 bytes in size (default) and population between 1 
 and 6.
 Once I ran 'sstablekeys' on the generated SSTable files I got following 
 exceptions:
 _There is a problem with sorting of normal looking keys:_
 30303039443538353645
 30303039443745364242
 java.io.IOException: Key out of order! DecoratedKey(-217680888487824985, 
 *30303039443745364242*)  DecoratedKey(-1767746583617597213, 
 *30303039443437454333*)
 0a30303033343933
 3734441388343933
 java.io.IOException: Key out of order! DecoratedKey(5440473860101999581, 
 *3734441388343933*)  DecoratedKey(-7565486415339257200, 
 *30303033344639443137*)
 30303033354244363031
 30303033354133423742
 java.io.IOException: Key out of order! DecoratedKey(2687072396429900180, 
 *30303033354133423742*)  DecoratedKey(-7838239767410066684, 
 *30303033354145344534*)
 30303034313442354137
 3034313635363334
 java.io.IOException: Key out of order! DecoratedKey(1516003874415400462, 
 *3034313635363334*)  DecoratedKey(-9106177395653818217, 
 *3030303431444238*)
 30303035373044373435
 30303035373044334631
 java.io.IOException: Key out of order! DecoratedKey(-3645715702154616540, 
 *30303035373044334631*)  DecoratedKey(-4296696226469000945, 
 *30303035373132364138*)
 _And completely different ones:_
 30303041333745373543
 7cd045c59a90d7587d8d
 java.io.IOException: Key out of order! DecoratedKey(-3595402345023230196, 
 *7cd045c59a90d7587d8d*)  DecoratedKey(-5146766422778260690, 
 *30303041333943303232*)
 3030303332314144
 30303033323346343932
 java.io.IOException: Key out of order! DecoratedKey(7071845511166615635, 
 *30303033323346343932*)  DecoratedKey(5233296131921119414, 
 *53d83e0012287e03*)
 30303034314531374431
 3806734b256c27e41ec2
 java.io.IOException: Key out of order! DecoratedKey(-7720474642702543193, 
 *3806734b256c27e41ec2*)  DecoratedKey(-8072288379146044663, 
 *30303034314136413343*)
 _And sometimes there is no problem at all:_
 30303033353144463637
 002a31b3b31a1c2f
 5d616dd38211ebb5d6ec
 444236451388
 1388138844463744
 30303033353143394343
 It's worth to mention that we have got 22 timeout exceptions but number of 
 out-of-order keys is much larger than that.



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


[jira] [Commented] (CASSANDRA-7261) cqlsh support for new UDT format

2014-05-21 Thread Tyler Hobbs (JIRA)

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

Tyler Hobbs commented on CASSANDRA-7261:


+1

 cqlsh support for new UDT format
 

 Key: CASSANDRA-7261
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7261
 Project: Cassandra
  Issue Type: Sub-task
Reporter: Mikhail Stepura
Assignee: Mikhail Stepura
  Labels: cqlsh
 Fix For: 2.1 rc1

 Attachments: CASSANDRA-2.1-7261.patch






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


[jira] [Updated] (CASSANDRA-6216) Level Compaction should persist last compacted key per level

2014-05-21 Thread sankalp kohli (JIRA)

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

sankalp kohli updated CASSANDRA-6216:
-

Labels: compaction  (was: )

 Level Compaction should persist last compacted key per level
 

 Key: CASSANDRA-6216
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6216
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: sankalp kohli
Assignee: sankalp kohli
Priority: Minor
  Labels: compaction
 Attachments: JIRA-6216.diff


 Level compaction does not persist the last compacted key per level. This is 
 important for higher levels. 
 The sstables with higher token and in higher levels wont get a chance to 
 compact as the last compacted key will get reset after a restart.



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


[jira] [Updated] (CASSANDRA-7144) CassandraDaemon RowMutation exception

2014-05-21 Thread Jeremiah Jordan (JIRA)

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

Jeremiah Jordan updated CASSANDRA-7144:
---

Reproduced In: 2.0.7, 2.0.6

 CassandraDaemon RowMutation exception
 -

 Key: CASSANDRA-7144
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7144
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: Ubuntu 12.04 w/ Oracle JVM, 5 nodes cluster. Nodes 2GB / 
 2 Cores in DigitalOcean.
Reporter: Maxime Lamothe-Brassard
Assignee: Tyler Hobbs

 First time reporting a bug here, apologies if I'm not posting it in the right 
 space.
 At what seems like random interval, on random nodes in random situations I 
 will get the following exception. After this the hinted handoff start timing 
 out and the node stops participating in the cluster.
 I started seeing these after switching to the Cassandra Python-Driver from 
 the Python-CQL driver.
 {noformat}
 ERROR [WRITE-/10.128.180.108] 2014-05-03 13:45:12,843 CassandraDaemon.java 
 (line 198) Exception in thread Thread[WRITE-/10.128.180.108,5,main]
 java.lang.AssertionError
   at 
 org.apache.cassandra.db.RowMutation$RowMutationSerializer.serialize(RowMutation.java:271)
   at 
 org.apache.cassandra.db.RowMutation$RowMutationSerializer.serialize(RowMutation.java:259)
   at org.apache.cassandra.net.MessageOut.serialize(MessageOut.java:120)
   at 
 org.apache.cassandra.net.OutboundTcpConnection.writeInternal(OutboundTcpConnection.java:251)
   at 
 org.apache.cassandra.net.OutboundTcpConnection.writeConnected(OutboundTcpConnection.java:203)
   at 
 org.apache.cassandra.net.OutboundTcpConnection.run(OutboundTcpConnection.java:151)
 ERROR [WRITE-/10.128.194.70] 2014-05-03 13:45:12,843 CassandraDaemon.java 
 (line 198) Exception in thread Thread[WRITE-/10.128.194.70,5,main]
 java.lang.AssertionError
   at 
 org.apache.cassandra.db.RowMutation$RowMutationSerializer.serialize(RowMutation.java:271)
   at 
 org.apache.cassandra.db.RowMutation$RowMutationSerializer.serialize(RowMutation.java:259)
   at org.apache.cassandra.net.MessageOut.serialize(MessageOut.java:120)
   at 
 org.apache.cassandra.net.OutboundTcpConnection.writeInternal(OutboundTcpConnection.java:251)
   at 
 org.apache.cassandra.net.OutboundTcpConnection.writeConnected(OutboundTcpConnection.java:203)
   at 
 org.apache.cassandra.net.OutboundTcpConnection.run(OutboundTcpConnection.java:151)
 ERROR [MutationStage:118] 2014-05-03 13:45:15,048 CassandraDaemon.java (line 
 198) Exception in thread Thread[MutationStage:118,5,main]
 java.lang.AssertionError
   at 
 org.apache.cassandra.db.RowMutation$RowMutationSerializer.serialize(RowMutation.java:271)
   at 
 org.apache.cassandra.db.RowMutation$RowMutationSerializer.serialize(RowMutation.java:259)
   at 
 org.apache.cassandra.utils.FBUtilities.serialize(FBUtilities.java:654)
   at 
 org.apache.cassandra.db.HintedHandOffManager.hintFor(HintedHandOffManager.java:137)
   at 
 org.apache.cassandra.service.StorageProxy.writeHintForMutation(StorageProxy.java:908)
   at 
 org.apache.cassandra.service.StorageProxy$6.runMayThrow(StorageProxy.java:881)
   at 
 org.apache.cassandra.service.StorageProxy$HintRunnable.run(StorageProxy.java:1981)
   at 
 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
   at java.util.concurrent.FutureTask.run(FutureTask.java:262)
   at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
   at java.lang.Thread.run(Thread.java:744)
 ERROR [MutationStage:117] 2014-05-03 13:45:15,048 CassandraDaemon.java (line 
 198) Exception in thread Thread[MutationStage:117,5,main]
 java.lang.AssertionError
   at 
 org.apache.cassandra.db.RowMutation$RowMutationSerializer.serialize(RowMutation.java:271)
   at 
 org.apache.cassandra.db.RowMutation$RowMutationSerializer.serialize(RowMutation.java:259)
   at 
 org.apache.cassandra.utils.FBUtilities.serialize(FBUtilities.java:654)
   at 
 org.apache.cassandra.db.HintedHandOffManager.hintFor(HintedHandOffManager.java:137)
   at 
 org.apache.cassandra.service.StorageProxy.writeHintForMutation(StorageProxy.java:908)
   at 
 org.apache.cassandra.service.StorageProxy$6.runMayThrow(StorageProxy.java:881)
   at 
 org.apache.cassandra.service.StorageProxy$HintRunnable.run(StorageProxy.java:1981)
   at 
 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
   at java.util.concurrent.FutureTask.run(FutureTask.java:262)
   at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
   at 
 

[jira] [Created] (CASSANDRA-7281) SELECT on tuple relations are broken for mixed ASC/DESC clustering order

2014-05-21 Thread Sylvain Lebresne (JIRA)
Sylvain Lebresne created CASSANDRA-7281:
---

 Summary: SELECT on tuple relations are broken for mixed ASC/DESC 
clustering order
 Key: CASSANDRA-7281
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7281
 Project: Cassandra
  Issue Type: Bug
Reporter: Sylvain Lebresne
 Fix For: 2.0.9


As noted on 
[CASSANDRA-6875|https://issues.apache.org/jira/browse/CASSANDRA-6875?focusedCommentId=13992153page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13992153],
 the tuple notation is broken when the clustering order mixes ASC and DESC 
directives because the range of data they describe don't correspond to a single 
continuous slice internally. To copy the example from CASSANDRA-6875:
{noformat}
cqlsh:ks create table foo (a int, b int, c int, PRIMARY KEY (a, b, c)) WITH 
CLUSTERING ORDER BY (b DESC, c ASC);
cqlsh:ks INSERT INTO foo (a, b, c) VALUES (0, 2, 0);
cqlsh:ks INSERT INTO foo (a, b, c) VALUES (0, 1, 0);
cqlsh:ks INSERT INTO foo (a, b, c) VALUES (0, 1, 1);
cqlsh:ks INSERT INTO foo (a, b, c) VALUES (0, 0, 0);
cqlsh:ks SELECT * FROM foo WHERE a=0;

 a | b | c
---+---+---
 0 | 2 | 0
 0 | 1 | 0
 0 | 1 | 1
 0 | 0 | 0

(4 rows)

cqlsh:ks SELECT * FROM foo WHERE a=0 AND (b, c)  (1, 0);

 a | b | c
---+---+---
 0 | 2 | 0

(1 rows)
{noformat}
The last query should really return {{(0, 2, 0)}} and {{(0, 1, 1)}}.

For that specific example we should generate 2 internal slices, but I believe 
that with more clustering columns we may have more slices.



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


[jira] [Updated] (CASSANDRA-6357) Flush memtables to separate directory

2014-05-21 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-6357:
--

Attachment: (was: 6357-v4.txt)

 Flush memtables to separate directory
 -

 Key: CASSANDRA-6357
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6357
 Project: Cassandra
  Issue Type: New Feature
  Components: Core
Reporter: Patrick McFadin
Assignee: Jonathan Ellis
Priority: Minor
  Labels: performance
 Fix For: 2.1 rc1

 Attachments: 6357-revert-v2.txt, 6357-revert-v3.txt, 
 6357-revert-v4.txt, 6357-revert.txt, 6357-v2.txt, 6357.txt, 
 c6357-2.1-stress-write-adj-ops-sec.png, 
 c6357-2.1-stress-write-latency-99th.png, 
 c6357-2.1-stress-write-latency-median.png, 
 c6357-stress-write-latency-99th-1.png


 Flush writers are a critical element for keeping a node healthy. When several 
 compactions run on systems with low performing data directories, IO becomes a 
 premium. Once the disk subsystem is saturated, write IO is blocked which will 
 cause flush writer threads to backup. Since memtables are large blocks of 
 memory in the JVM, too much blocking can cause excessive GC over time 
 degrading performance. In the worst case causing an OOM.
 Since compaction is running on the data directories. My proposal is to create 
 a separate directory for flushing memtables. Potentially we can use the same 
 methodology of keeping the commit log separate and minimize disk contention 
 against the critical function of the flushwriter. 



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


[jira] [Commented] (CASSANDRA-7251) testDiskFailurePolicy_best_effort assertion error

2014-05-21 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-7251:
---

(committed)

 testDiskFailurePolicy_best_effort assertion error
 -

 Key: CASSANDRA-7251
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7251
 Project: Cassandra
  Issue Type: Sub-task
 Environment: win7, trunk
Reporter: Joshua McKenzie
Assignee: Joshua McKenzie
Priority: Minor
  Labels: Windows
 Fix For: 2.1 rc1

 Attachments: 7251_v1.txt


 [junit] Testsuite: org.apache.cassandra.db.DirectoriesTest
 [junit] Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 
 1.297 sec
 [junit]
 [junit] Testcase: 
 testDiskFailurePolicy_best_effort(org.apache.cassandra.db.DirectoriesTest):   
 FAILED
 [junit]
 [junit] junit.framework.AssertionFailedError:
 [junit] at 
 org.apache.cassandra.db.DirectoriesTest.testDiskFailurePolicy_best_effort(DirectoriesTest.java:207)
 [junit]
 [junit]
 [junit] Test org.apache.cassandra.db.DirectoriesTest FAILED



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


[jira] [Updated] (CASSANDRA-6357) Flush memtables to separate directory

2014-05-21 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-6357:
--

Attachment: 6357-revert-v4.txt

 Flush memtables to separate directory
 -

 Key: CASSANDRA-6357
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6357
 Project: Cassandra
  Issue Type: New Feature
  Components: Core
Reporter: Patrick McFadin
Assignee: Jonathan Ellis
Priority: Minor
  Labels: performance
 Fix For: 2.1 rc1

 Attachments: 6357-revert-v2.txt, 6357-revert-v3.txt, 
 6357-revert-v4.txt, 6357-revert.txt, 6357-v2.txt, 6357.txt, 
 c6357-2.1-stress-write-adj-ops-sec.png, 
 c6357-2.1-stress-write-latency-99th.png, 
 c6357-2.1-stress-write-latency-median.png, 
 c6357-stress-write-latency-99th-1.png


 Flush writers are a critical element for keeping a node healthy. When several 
 compactions run on systems with low performing data directories, IO becomes a 
 premium. Once the disk subsystem is saturated, write IO is blocked which will 
 cause flush writer threads to backup. Since memtables are large blocks of 
 memory in the JVM, too much blocking can cause excessive GC over time 
 degrading performance. In the worst case causing an OOM.
 Since compaction is running on the data directories. My proposal is to create 
 a separate directory for flushing memtables. Potentially we can use the same 
 methodology of keeping the commit log separate and minimize disk contention 
 against the critical function of the flushwriter. 



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


[jira] [Updated] (CASSANDRA-6357) Flush memtables to separate directory

2014-05-21 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-6357:
--

Attachment: 6357-v4.txt

v4.

 Flush memtables to separate directory
 -

 Key: CASSANDRA-6357
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6357
 Project: Cassandra
  Issue Type: New Feature
  Components: Core
Reporter: Patrick McFadin
Assignee: Jonathan Ellis
Priority: Minor
  Labels: performance
 Fix For: 2.1 rc1

 Attachments: 6357-revert-v2.txt, 6357-revert-v3.txt, 
 6357-revert-v4.txt, 6357-revert.txt, 6357-v2.txt, 6357.txt, 
 c6357-2.1-stress-write-adj-ops-sec.png, 
 c6357-2.1-stress-write-latency-99th.png, 
 c6357-2.1-stress-write-latency-median.png, 
 c6357-stress-write-latency-99th-1.png


 Flush writers are a critical element for keeping a node healthy. When several 
 compactions run on systems with low performing data directories, IO becomes a 
 premium. Once the disk subsystem is saturated, write IO is blocked which will 
 cause flush writer threads to backup. Since memtables are large blocks of 
 memory in the JVM, too much blocking can cause excessive GC over time 
 degrading performance. In the worst case causing an OOM.
 Since compaction is running on the data directories. My proposal is to create 
 a separate directory for flushing memtables. Potentially we can use the same 
 methodology of keeping the commit log separate and minimize disk contention 
 against the critical function of the flushwriter. 



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


[jira] [Commented] (CASSANDRA-6875) CQL3: select multiple CQL rows in a single partition using IN

2014-05-21 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-6875:
-

bq. As I mentioned, I've kept the same behavior for slices over mixed-asc/desc 
comparators; I'll wait for your response to decide what to do about that.

That's definitively a problem and we should fix it. I've created CASSANDRA-7281 
for that.  As far as this patch goes, as long as it preserve correct behavior 
for all-ASC or all-DESC (which I believe it does), we can leave the rest to 
CASSANDRA-7281.

The patch lgtm with 2 minor nits (and you will have to rebase it before commit 
btw):
* In buildBound, I believe we can as well check restriction[ 0], saving the 
iterator creation.
* There's an unecessary import in QueryProcessor (of VisibleForTesting)

That said, I'm still a bit uncomfortable pushing this in 2.0 given where we are 
of the 2.0 cycle. But if I'm the only one feeling this way, I suppose I can 
shut up (and so +1 minus that caveat).


 CQL3: select multiple CQL rows in a single partition using IN
 -

 Key: CASSANDRA-6875
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6875
 Project: Cassandra
  Issue Type: Bug
  Components: API
Reporter: Nicolas Favre-Felix
Assignee: Tyler Hobbs
Priority: Minor
 Fix For: 2.0.8


 In the spirit of CASSANDRA-4851 and to bring CQL to parity with Thrift, it is 
 important to support reading several distinct CQL rows from a given partition 
 using a distinct set of coordinates for these rows within the partition.
 CASSANDRA-4851 introduced a range scan over the multi-dimensional space of 
 clustering keys. We also need to support a multi-get of CQL rows, 
 potentially using the IN keyword to define a set of clustering keys to 
 fetch at once.
 (reusing the same example\:)
 Consider the following table:
 {code}
 CREATE TABLE test (
   k int,
   c1 int,
   c2 int,
   PRIMARY KEY (k, c1, c2)
 );
 {code}
 with the following data:
 {code}
  k | c1 | c2
 ---++
  0 |  0 |  0
  0 |  0 |  1
  0 |  1 |  0
  0 |  1 |  1
 {code}
 We can fetch a single row or a range of rows, but not a set of them:
 {code}
  SELECT * FROM test WHERE k = 0 AND (c1, c2) IN ((0, 0), (1,1)) ;
 Bad Request: line 1:54 missing EOF at ','
 {code}
 Supporting this syntax would return:
 {code}
  k | c1 | c2
 ---++
  0 |  0 |  0
  0 |  1 |  1
 {code}
 Being able to fetch these two CQL rows in a single read is important to 
 maintain partition-level isolation.



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


[jira] [Commented] (CASSANDRA-7194) CliTest unit test fails on Windows

2014-05-21 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-7194:
---

Doesn''t that mean we should fix CliClient to use {{%n}} as well?

 CliTest unit test fails on Windows
 --

 Key: CASSANDRA-7194
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7194
 Project: Cassandra
  Issue Type: Bug
Reporter: Joshua McKenzie
Assignee: Joshua McKenzie
Priority: Trivial
  Labels: Windows
 Fix For: 3.0

 Attachments: 7194-v2.txt, 7194_v1.patch


 looks like a newline mismatch error



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


[jira] [Commented] (CASSANDRA-7262) During streaming: java.lang.AssertionError: Reference counter -1

2014-05-21 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-7262:
---

Since there's no performance reason to avoid blocking on the close, IMO that 
approach is more likely to result in correctness overall.  (If we just make 
abort idempotent, we may be missing other bugs from code that assumes 
closeSession was atomic.)

 During streaming: java.lang.AssertionError: Reference counter -1
 

 Key: CASSANDRA-7262
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7262
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: Cassandra 2.07, x86-64 Ubuntu 12.04.4, Oracle java 
 1.7.0_45
Reporter: Duncan Sands
Assignee: Joshua McKenzie
Priority: Minor
 Fix For: 2.0.8, 2.1 rc1

 Attachments: 7262_v1.txt, system.log.gz


 Got this assertion failure this weekend during repair:
 ERROR [STREAM-IN-/192.168.21.14] 2014-05-17 01:17:52,332 StreamSession.java 
 (line 420) [Stream #3a3ac8a2-dd50-11e3-b3c1-6bf6dccd6457] Streaming error 
 occurred
 java.lang.RuntimeException: Outgoing stream handler has been closed
 at 
 org.apache.cassandra.streaming.ConnectionHandler.sendMessage(ConnectionHandler.java:170)
 at 
 org.apache.cassandra.streaming.StreamSession.receive(StreamSession.java:483)
 at 
 org.apache.cassandra.streaming.StreamSession.messageReceived(StreamSession.java:372)
 at 
 org.apache.cassandra.streaming.ConnectionHandler$IncomingMessageHandler.run(ConnectionHandler.java:289)
 at java.lang.Thread.run(Thread.java:744)
 ERROR [STREAM-IN-/192.168.21.14] 2014-05-17 01:17:52,350 CassandraDaemon.java 
 (line 198) Exception in thread Thread[STREAM-IN-/192.168.21.14,5,RMI Runtime]
 java.lang.AssertionError: Reference counter -1 for 
 /mnt/ssd1/cassandra/data/ldn_production/historical_accounts/ldn_production-historical_accounts-jb-79827-Data.db
 at 
 org.apache.cassandra.io.sstable.SSTableReader.releaseReference(SSTableReader.java:1107)
 at 
 org.apache.cassandra.streaming.StreamTransferTask.abort(StreamTransferTask.java:80)
 at 
 org.apache.cassandra.streaming.StreamSession.closeSession(StreamSession.java:322)
 at 
 org.apache.cassandra.streaming.StreamSession.onError(StreamSession.java:425)
 at 
 org.apache.cassandra.streaming.ConnectionHandler$IncomingMessageHandler.run(ConnectionHandler.java:300)
 at java.lang.Thread.run(Thread.java:744)
 followed by a few more (the reference counter got down to -3).  Got the same 
 kind of assertion failure on one other node (in a different data centre; 
 there are 21 nodes altogether distributed over 4 data centres).
 I've attached the relevant part of the log.  It starts quite a bit before the 
 assertion failure at the first exception on this node (Cannot proceed on 
 repair because a neighbor ... is dead), and finishes a few hours afterwards 
 when the node was restarted.
 Edit: The following Reference counter assertion failures followed the 1st on 
 a different file and have a different stack trace:
 ERROR [CompactionExecutor:382] 2014-05-17 01:17:53,157 CassandraDaemon.java 
 (line 198) Exception in thread Thread[CompactionExecutor:382,1,main]
 java.lang.AssertionError: Reference counter -1 for 
 /mnt/ssd1/cassandra/data/ldn_production/historical_accounts/ldn_production-historical_accounts-jb-83888-Data.db
at 
 org.apache.cassandra.io.sstable.SSTableReader.releaseReference(SSTableReader.java:1107)
at 
 org.apache.cassandra.io.sstable.SSTableReader.releaseReferences(SSTableReader.java:1429)
at 
 org.apache.cassandra.db.compaction.CompactionController.close(CompactionController.java:207)
at 
 org.apache.cassandra.db.compaction.CompactionTask.runWith(CompactionTask.java:220)
at 
 org.apache.cassandra.io.util.DiskAwareRunnable.runMayThrow(DiskAwareRunnable.java:48)
at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
at 
 org.apache.cassandra.db.compaction.CompactionTask.executeInternal(CompactionTask.java:60)
at 
 org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(AbstractCompactionTask.java:59)
at 
 org.apache.cassandra.db.compaction.CompactionManager$BackgroundCompactionTask.run(CompactionManager.java:197)
...



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


[jira] [Updated] (CASSANDRA-7106) Retry multiple times before giving up on fetching splits

2014-05-21 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-7106:
--

Reviewer: Brandon Williams

 Retry multiple times before giving up on fetching splits
 

 Key: CASSANDRA-7106
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7106
 Project: Cassandra
  Issue Type: Improvement
  Components: Hadoop
Reporter: Victor Igumnov
Priority: Minor
 Fix For: 2.1 rc1

 Attachments: retries-fix-iterator-bug.patch, retries-reworked.patch, 
 retry-splits.patch


 See Github for patch:
 https://github.com/victori/cassandra
 What the patch does:
 While I was evaluating Shark/Hive for analyzing Cassandra's data, I could not 
 get any of the queries to return reliably. Looking further into the issue I 
 noticed that if just a single fetch for a split fails the whole job is 
 aborted. So instead of giving up and failing out the whole job, retry 
 fetching the data a few times before completely giving up.  



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


[jira] [Commented] (CASSANDRA-7279) MultiSliceTest.test_with_overlap* unit tests failing in trunk

2014-05-21 Thread Michael Shuler (JIRA)

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

Michael Shuler commented on CASSANDRA-7279:
---

MultiSliceTest was added in commit 60fb923 where it passes.
{{git bisect start trunk 60fb923018a6fd2dabf04a1d4500f7b29a23a6f1}} gets me 
f31f689 as the first bad commit, which is fix problem with localCopy methods 
after CASSANDRA-6689

 MultiSliceTest.test_with_overlap* unit tests failing in trunk
 -

 Key: CASSANDRA-7279
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7279
 Project: Cassandra
  Issue Type: Bug
  Components: Tests
Reporter: Michael Shuler
Assignee: T Jake Luciani
Priority: Minor
 Fix For: 2.1 rc1


 Example:
 https://cassci.datastax.com/job/trunk_utest/623/testReport/org.apache.cassandra.thrift/MultiSliceTest/



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


[jira] [Comment Edited] (CASSANDRA-7279) MultiSliceTest.test_with_overlap* unit tests failing in trunk

2014-05-21 Thread Michael Shuler (JIRA)

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

Michael Shuler edited comment on CASSANDRA-7279 at 5/21/14 5:46 PM:


MultiSliceTest was added in commit 60fb923 where it passes.
{{git bisect start trunk 60fb923018a6fd2dabf04a1d4500f7b29a23a6f1}} gets me 
f31f689 as the first bad commit, which is the merge commit for CASSANDRA-6689


was (Author: mshuler):
MultiSliceTest was added in commit 60fb923 where it passes.
{{git bisect start trunk 60fb923018a6fd2dabf04a1d4500f7b29a23a6f1}} gets me 
f31f689 as the first bad commit, which is fix problem with localCopy methods 
after CASSANDRA-6689

 MultiSliceTest.test_with_overlap* unit tests failing in trunk
 -

 Key: CASSANDRA-7279
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7279
 Project: Cassandra
  Issue Type: Bug
  Components: Tests
Reporter: Michael Shuler
Assignee: T Jake Luciani
Priority: Minor
 Fix For: 2.1 rc1


 Example:
 https://cassci.datastax.com/job/trunk_utest/623/testReport/org.apache.cassandra.thrift/MultiSliceTest/



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


[jira] [Commented] (CASSANDRA-7194) CliTest unit test fails on Windows

2014-05-21 Thread Joshua McKenzie (JIRA)

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

Joshua McKenzie commented on CASSANDRA-7194:


If we're outputting a \n explicitly we can safely check for that in the unit 
test cross-platform.  If we're using a function that appends newLine() then we 
need %n.  There's really no need in converting this (or all, for that matter) 
\n in the code-base to %n IMO.

 CliTest unit test fails on Windows
 --

 Key: CASSANDRA-7194
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7194
 Project: Cassandra
  Issue Type: Bug
Reporter: Joshua McKenzie
Assignee: Joshua McKenzie
Priority: Trivial
  Labels: Windows
 Fix For: 3.0

 Attachments: 7194-v2.txt, 7194_v1.patch


 looks like a newline mismatch error



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


[jira] [Commented] (CASSANDRA-7262) During streaming: java.lang.AssertionError: Reference counter -1

2014-05-21 Thread Joshua McKenzie (JIRA)

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

Joshua McKenzie commented on CASSANDRA-7262:


Rather than synchronizing upstream, I'll just synchronize closeSession (which 
is likely what you were implying earlier).  Single-point of synchronization to 
communicate the atomicity of the method; I didn't like the idea of syncing the 
upstream methods to get downstream sync.

As for the exceptions in CompactionTask - the logic dealing with overlapping 
sstable computation and release is identical on trunk to 2.0.7 and I didn't 
reproduce that during any of my testing.  Going to have to chew on that for a 
bit - my gut feeling looking at the logs and code is that the CompactionTask 
assertions are unrelated to the streaming closeSession issue given the 
different files involved and time frame between the messages in the log file.

 During streaming: java.lang.AssertionError: Reference counter -1
 

 Key: CASSANDRA-7262
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7262
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: Cassandra 2.07, x86-64 Ubuntu 12.04.4, Oracle java 
 1.7.0_45
Reporter: Duncan Sands
Assignee: Joshua McKenzie
Priority: Minor
 Fix For: 2.0.8, 2.1 rc1

 Attachments: 7262_v1.txt, system.log.gz


 Got this assertion failure this weekend during repair:
 ERROR [STREAM-IN-/192.168.21.14] 2014-05-17 01:17:52,332 StreamSession.java 
 (line 420) [Stream #3a3ac8a2-dd50-11e3-b3c1-6bf6dccd6457] Streaming error 
 occurred
 java.lang.RuntimeException: Outgoing stream handler has been closed
 at 
 org.apache.cassandra.streaming.ConnectionHandler.sendMessage(ConnectionHandler.java:170)
 at 
 org.apache.cassandra.streaming.StreamSession.receive(StreamSession.java:483)
 at 
 org.apache.cassandra.streaming.StreamSession.messageReceived(StreamSession.java:372)
 at 
 org.apache.cassandra.streaming.ConnectionHandler$IncomingMessageHandler.run(ConnectionHandler.java:289)
 at java.lang.Thread.run(Thread.java:744)
 ERROR [STREAM-IN-/192.168.21.14] 2014-05-17 01:17:52,350 CassandraDaemon.java 
 (line 198) Exception in thread Thread[STREAM-IN-/192.168.21.14,5,RMI Runtime]
 java.lang.AssertionError: Reference counter -1 for 
 /mnt/ssd1/cassandra/data/ldn_production/historical_accounts/ldn_production-historical_accounts-jb-79827-Data.db
 at 
 org.apache.cassandra.io.sstable.SSTableReader.releaseReference(SSTableReader.java:1107)
 at 
 org.apache.cassandra.streaming.StreamTransferTask.abort(StreamTransferTask.java:80)
 at 
 org.apache.cassandra.streaming.StreamSession.closeSession(StreamSession.java:322)
 at 
 org.apache.cassandra.streaming.StreamSession.onError(StreamSession.java:425)
 at 
 org.apache.cassandra.streaming.ConnectionHandler$IncomingMessageHandler.run(ConnectionHandler.java:300)
 at java.lang.Thread.run(Thread.java:744)
 followed by a few more (the reference counter got down to -3).  Got the same 
 kind of assertion failure on one other node (in a different data centre; 
 there are 21 nodes altogether distributed over 4 data centres).
 I've attached the relevant part of the log.  It starts quite a bit before the 
 assertion failure at the first exception on this node (Cannot proceed on 
 repair because a neighbor ... is dead), and finishes a few hours afterwards 
 when the node was restarted.
 Edit: The following Reference counter assertion failures followed the 1st on 
 a different file and have a different stack trace:
 ERROR [CompactionExecutor:382] 2014-05-17 01:17:53,157 CassandraDaemon.java 
 (line 198) Exception in thread Thread[CompactionExecutor:382,1,main]
 java.lang.AssertionError: Reference counter -1 for 
 /mnt/ssd1/cassandra/data/ldn_production/historical_accounts/ldn_production-historical_accounts-jb-83888-Data.db
at 
 org.apache.cassandra.io.sstable.SSTableReader.releaseReference(SSTableReader.java:1107)
at 
 org.apache.cassandra.io.sstable.SSTableReader.releaseReferences(SSTableReader.java:1429)
at 
 org.apache.cassandra.db.compaction.CompactionController.close(CompactionController.java:207)
at 
 org.apache.cassandra.db.compaction.CompactionTask.runWith(CompactionTask.java:220)
at 
 org.apache.cassandra.io.util.DiskAwareRunnable.runMayThrow(DiskAwareRunnable.java:48)
at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
at 
 org.apache.cassandra.db.compaction.CompactionTask.executeInternal(CompactionTask.java:60)
at 
 org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(AbstractCompactionTask.java:59)
at 
 

[jira] [Assigned] (CASSANDRA-7010) bootstrap_test simple_bootstrap_test dtest fails in 2.1

2014-05-21 Thread Marcus Eriksson (JIRA)

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

Marcus Eriksson reassigned CASSANDRA-7010:
--

Assignee: Marcus Eriksson

 bootstrap_test simple_bootstrap_test dtest fails in 2.1
 ---

 Key: CASSANDRA-7010
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7010
 Project: Cassandra
  Issue Type: Bug
  Components: Tests
Reporter: Michael Shuler
Assignee: Marcus Eriksson
 Fix For: 2.1 rc1


 I patched ccm with https://github.com/pcmanus/ccm/pull/109 and got an error 
 from simple_bootstrap:
 {noformat}
 ==
 FAIL: simple_bootstrap_test (bootstrap_test.TestBootstrap)
 --
 Traceback (most recent call last):
   File /home/mshuler/git/cassandra-dtest/bootstrap_test.py, line 58, in 
 simple_bootstrap_test
 assert_almost_equal(initial_size, 2 * size1)
   File /home/mshuler/git/cassandra-dtest/assertions.py, line 26, in 
 assert_almost_equal
 assert vmin  vmax * (1.0 - error), values not within %.2f%% of the max: 
 %s % (error * 100, args)
 AssertionError: values not within 16.00% of the max: (0, 186396)
 {noformat}



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


[jira] [Commented] (CASSANDRA-7262) During streaming: java.lang.AssertionError: Reference counter -1

2014-05-21 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-7262:
---

SGTM.

 During streaming: java.lang.AssertionError: Reference counter -1
 

 Key: CASSANDRA-7262
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7262
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: Cassandra 2.07, x86-64 Ubuntu 12.04.4, Oracle java 
 1.7.0_45
Reporter: Duncan Sands
Assignee: Joshua McKenzie
Priority: Minor
 Fix For: 2.0.9

 Attachments: 7262_v1.txt, system.log.gz


 Got this assertion failure this weekend during repair:
 ERROR [STREAM-IN-/192.168.21.14] 2014-05-17 01:17:52,332 StreamSession.java 
 (line 420) [Stream #3a3ac8a2-dd50-11e3-b3c1-6bf6dccd6457] Streaming error 
 occurred
 java.lang.RuntimeException: Outgoing stream handler has been closed
 at 
 org.apache.cassandra.streaming.ConnectionHandler.sendMessage(ConnectionHandler.java:170)
 at 
 org.apache.cassandra.streaming.StreamSession.receive(StreamSession.java:483)
 at 
 org.apache.cassandra.streaming.StreamSession.messageReceived(StreamSession.java:372)
 at 
 org.apache.cassandra.streaming.ConnectionHandler$IncomingMessageHandler.run(ConnectionHandler.java:289)
 at java.lang.Thread.run(Thread.java:744)
 ERROR [STREAM-IN-/192.168.21.14] 2014-05-17 01:17:52,350 CassandraDaemon.java 
 (line 198) Exception in thread Thread[STREAM-IN-/192.168.21.14,5,RMI Runtime]
 java.lang.AssertionError: Reference counter -1 for 
 /mnt/ssd1/cassandra/data/ldn_production/historical_accounts/ldn_production-historical_accounts-jb-79827-Data.db
 at 
 org.apache.cassandra.io.sstable.SSTableReader.releaseReference(SSTableReader.java:1107)
 at 
 org.apache.cassandra.streaming.StreamTransferTask.abort(StreamTransferTask.java:80)
 at 
 org.apache.cassandra.streaming.StreamSession.closeSession(StreamSession.java:322)
 at 
 org.apache.cassandra.streaming.StreamSession.onError(StreamSession.java:425)
 at 
 org.apache.cassandra.streaming.ConnectionHandler$IncomingMessageHandler.run(ConnectionHandler.java:300)
 at java.lang.Thread.run(Thread.java:744)
 followed by a few more (the reference counter got down to -3).  Got the same 
 kind of assertion failure on one other node (in a different data centre; 
 there are 21 nodes altogether distributed over 4 data centres).
 I've attached the relevant part of the log.  It starts quite a bit before the 
 assertion failure at the first exception on this node (Cannot proceed on 
 repair because a neighbor ... is dead), and finishes a few hours afterwards 
 when the node was restarted.
 Edit: The following Reference counter assertion failures followed the 1st on 
 a different file and have a different stack trace:
 ERROR [CompactionExecutor:382] 2014-05-17 01:17:53,157 CassandraDaemon.java 
 (line 198) Exception in thread Thread[CompactionExecutor:382,1,main]
 java.lang.AssertionError: Reference counter -1 for 
 /mnt/ssd1/cassandra/data/ldn_production/historical_accounts/ldn_production-historical_accounts-jb-83888-Data.db
at 
 org.apache.cassandra.io.sstable.SSTableReader.releaseReference(SSTableReader.java:1107)
at 
 org.apache.cassandra.io.sstable.SSTableReader.releaseReferences(SSTableReader.java:1429)
at 
 org.apache.cassandra.db.compaction.CompactionController.close(CompactionController.java:207)
at 
 org.apache.cassandra.db.compaction.CompactionTask.runWith(CompactionTask.java:220)
at 
 org.apache.cassandra.io.util.DiskAwareRunnable.runMayThrow(DiskAwareRunnable.java:48)
at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
at 
 org.apache.cassandra.db.compaction.CompactionTask.executeInternal(CompactionTask.java:60)
at 
 org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(AbstractCompactionTask.java:59)
at 
 org.apache.cassandra.db.compaction.CompactionManager$BackgroundCompactionTask.run(CompactionManager.java:197)
...



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


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

2014-05-21 Thread jbellis
Merge branch 'cassandra-2.1' into trunk


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

Branch: refs/heads/trunk
Commit: decc30f726b4301e60aabbc2db4baab2f7c4
Parents: 9174102 e00878d
Author: Jonathan Ellis jbel...@apache.org
Authored: Wed May 21 13:11:22 2014 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Wed May 21 13:11:22 2014 -0500

--
 CHANGES.txt  | 1 +
 conf/cassandra.yaml  | 4 ++--
 src/java/org/apache/cassandra/config/Config.java | 2 +-
 src/java/org/apache/cassandra/config/DatabaseDescriptor.java | 2 +-
 4 files changed, 5 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/decc3088/CHANGES.txt
--
diff --cc CHANGES.txt
index a74207f,61ea788..7e43fdf
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,13 -1,5 +1,14 @@@
 +3.0
 + * Move sstable RandomAccessReader to nio2, which allows using the
 +   FILE_SHARE_DELETE flag on Windows (CASSANDRA-4050)
 + * Remove CQL2 (CASSANDRA-5918)
 + * Add Thrift get_multi_slice call (CASSANDRA-6757)
 + * Optimize fetching multiple cells by name (CASSANDRA-6933)
 + * Allow compilation in java 8 (CASSANDRA-7208)
 + * Make incremental repair default (CASSANDRA-7250)
 +
  2.1.0-rc1
+  * Change concurrent_compactors defaults (CASSANDRA-7139)
   * Add PowerShell Windows launch scripts (CASSANDRA-7001)
   * Make commitlog archive+restore more robust (CASSANDRA-6974)
   * Fix marking commitlogsegments clean (CASSANDRA-6959)

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



[2/3] git commit: Change concurrent_compactors defaults patch by jbellis; reviewed by bes for CASSANDRA-7139

2014-05-21 Thread jbellis
Change concurrent_compactors defaults
patch by jbellis; reviewed by bes for CASSANDRA-7139


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

Branch: refs/heads/trunk
Commit: e00878d9558d9220ef864c6dfb69293ada36e2bd
Parents: e024a1c
Author: Jonathan Ellis jbel...@apache.org
Authored: Wed May 21 13:11:16 2014 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Wed May 21 13:11:16 2014 -0500

--
 CHANGES.txt  | 1 +
 conf/cassandra.yaml  | 4 ++--
 src/java/org/apache/cassandra/config/Config.java | 2 +-
 src/java/org/apache/cassandra/config/DatabaseDescriptor.java | 2 +-
 4 files changed, 5 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e00878d9/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 209ff70..61ea788 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.0-rc1
+ * Change concurrent_compactors defaults (CASSANDRA-7139)
  * Add PowerShell Windows launch scripts (CASSANDRA-7001)
  * Make commitlog archive+restore more robust (CASSANDRA-6974)
  * Fix marking commitlogsegments clean (CASSANDRA-6959)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e00878d9/conf/cassandra.yaml
--
diff --git a/conf/cassandra.yaml b/conf/cassandra.yaml
index 6e47918..b9964ed 100644
--- a/conf/cassandra.yaml
+++ b/conf/cassandra.yaml
@@ -500,8 +500,8 @@ in_memory_compaction_limit_in_mb: 64
 # slowly or too fast, you should look at
 # compaction_throughput_mb_per_sec first.
 #
-# concurrent_compactors defaults to the number of cores.
-# Uncomment to make compaction mono-threaded, the pre-0.8 default.
+# concurrent_compactors defaults to the smaller of (number of disks,
+# number of cores), with a minimum of 2 and a maximum of 8.
 #concurrent_compactors: 1
 
 # Throttles compaction to the given total throughput across the entire

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e00878d9/src/java/org/apache/cassandra/config/Config.java
--
diff --git a/src/java/org/apache/cassandra/config/Config.java 
b/src/java/org/apache/cassandra/config/Config.java
index 97ceb7f..07d0a59 100644
--- a/src/java/org/apache/cassandra/config/Config.java
+++ b/src/java/org/apache/cassandra/config/Config.java
@@ -132,7 +132,7 @@ public class Config
 public Integer column_index_size_in_kb = 64;
 public Integer batch_size_warn_threshold_in_kb = 5;
 public Integer in_memory_compaction_limit_in_mb = 64;
-public Integer concurrent_compactors = 
FBUtilities.getAvailableProcessors();
+public Integer concurrent_compactors;
 public volatile Integer compaction_throughput_mb_per_sec = 16;
 
 public Integer max_streaming_retries = 3;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e00878d9/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
--
diff --git a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java 
b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index 7688383..c916fea 100644
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@ -453,7 +453,7 @@ public class DatabaseDescriptor
 }
 
 if (conf.concurrent_compactors == null)
-conf.concurrent_compactors = FBUtilities.getAvailableProcessors();
+conf.concurrent_compactors = Math.min(8, Math.max(2, 
Math.min(FBUtilities.getAvailableProcessors(), 
conf.data_file_directories.length)));
 
 if (conf.concurrent_compactors = 0)
 throw new ConfigurationException(concurrent_compactors should be 
strictly greater than 0);



[1/3] git commit: Change concurrent_compactors defaults patch by jbellis; reviewed by bes for CASSANDRA-7139

2014-05-21 Thread jbellis
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 e024a1cc2 - e00878d95
  refs/heads/trunk 91741025c - decc30888


Change concurrent_compactors defaults
patch by jbellis; reviewed by bes for CASSANDRA-7139


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

Branch: refs/heads/cassandra-2.1
Commit: e00878d9558d9220ef864c6dfb69293ada36e2bd
Parents: e024a1c
Author: Jonathan Ellis jbel...@apache.org
Authored: Wed May 21 13:11:16 2014 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Wed May 21 13:11:16 2014 -0500

--
 CHANGES.txt  | 1 +
 conf/cassandra.yaml  | 4 ++--
 src/java/org/apache/cassandra/config/Config.java | 2 +-
 src/java/org/apache/cassandra/config/DatabaseDescriptor.java | 2 +-
 4 files changed, 5 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e00878d9/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 209ff70..61ea788 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.0-rc1
+ * Change concurrent_compactors defaults (CASSANDRA-7139)
  * Add PowerShell Windows launch scripts (CASSANDRA-7001)
  * Make commitlog archive+restore more robust (CASSANDRA-6974)
  * Fix marking commitlogsegments clean (CASSANDRA-6959)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e00878d9/conf/cassandra.yaml
--
diff --git a/conf/cassandra.yaml b/conf/cassandra.yaml
index 6e47918..b9964ed 100644
--- a/conf/cassandra.yaml
+++ b/conf/cassandra.yaml
@@ -500,8 +500,8 @@ in_memory_compaction_limit_in_mb: 64
 # slowly or too fast, you should look at
 # compaction_throughput_mb_per_sec first.
 #
-# concurrent_compactors defaults to the number of cores.
-# Uncomment to make compaction mono-threaded, the pre-0.8 default.
+# concurrent_compactors defaults to the smaller of (number of disks,
+# number of cores), with a minimum of 2 and a maximum of 8.
 #concurrent_compactors: 1
 
 # Throttles compaction to the given total throughput across the entire

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e00878d9/src/java/org/apache/cassandra/config/Config.java
--
diff --git a/src/java/org/apache/cassandra/config/Config.java 
b/src/java/org/apache/cassandra/config/Config.java
index 97ceb7f..07d0a59 100644
--- a/src/java/org/apache/cassandra/config/Config.java
+++ b/src/java/org/apache/cassandra/config/Config.java
@@ -132,7 +132,7 @@ public class Config
 public Integer column_index_size_in_kb = 64;
 public Integer batch_size_warn_threshold_in_kb = 5;
 public Integer in_memory_compaction_limit_in_mb = 64;
-public Integer concurrent_compactors = 
FBUtilities.getAvailableProcessors();
+public Integer concurrent_compactors;
 public volatile Integer compaction_throughput_mb_per_sec = 16;
 
 public Integer max_streaming_retries = 3;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e00878d9/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
--
diff --git a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java 
b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index 7688383..c916fea 100644
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@ -453,7 +453,7 @@ public class DatabaseDescriptor
 }
 
 if (conf.concurrent_compactors == null)
-conf.concurrent_compactors = FBUtilities.getAvailableProcessors();
+conf.concurrent_compactors = Math.min(8, Math.max(2, 
Math.min(FBUtilities.getAvailableProcessors(), 
conf.data_file_directories.length)));
 
 if (conf.concurrent_compactors = 0)
 throw new ConfigurationException(concurrent_compactors should be 
strictly greater than 0);



[1/3] git commit: fix CliTest on Windows patch by Josh McKenzie; reviewed by jbellis for CASSANDRA-7194

2014-05-21 Thread jbellis
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 e00878d95 - dd6a22959
  refs/heads/trunk decc30888 - 6581abfae


fix CliTest on Windows
patch by Josh McKenzie; reviewed by jbellis for CASSANDRA-7194


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

Branch: refs/heads/cassandra-2.1
Commit: dd6a2295991be002e2fb85201b43297a105bd1a4
Parents: e00878d
Author: Jonathan Ellis jbel...@apache.org
Authored: Wed May 21 13:21:05 2014 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Wed May 21 13:21:05 2014 -0500

--
 test/unit/org/apache/cassandra/cli/CliTest.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/dd6a2295/test/unit/org/apache/cassandra/cli/CliTest.java
--
diff --git a/test/unit/org/apache/cassandra/cli/CliTest.java 
b/test/unit/org/apache/cassandra/cli/CliTest.java
index 6b7232c..5d28c70 100644
--- a/test/unit/org/apache/cassandra/cli/CliTest.java
+++ b/test/unit/org/apache/cassandra/cli/CliTest.java
@@ -253,8 +253,8 @@ public class CliTest extends SchemaLoader
 // System.out.println(Result:\n + result);
 if (statement.startsWith(show schema))
 assertEquals(errStream.toString() + processing + statement,
- \nWARNING: CQL3 tables are intentionally omitted 
from 'show schema' output.\n
- + See 
https://issues.apache.org/jira/browse/CASSANDRA-4377 for details.\n\n,
+ \nWARNING: CQL3 tables are intentionally omitted 
from 'show schema' output. + String.format(%n)
+ + See 
https://issues.apache.org/jira/browse/CASSANDRA-4377 for details.\n + 
String.format(%n),
  errStream.toString());
 else
 assertEquals(errStream.toString() +  processing  + 
statement, , errStream.toString());



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

2014-05-21 Thread jbellis
Merge branch 'cassandra-2.1' into trunk


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

Branch: refs/heads/trunk
Commit: 6581abfae5f3dc06a7a555bdc8b16fcde6f38970
Parents: decc308 dd6a229
Author: Jonathan Ellis jbel...@apache.org
Authored: Wed May 21 13:21:10 2014 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Wed May 21 13:21:10 2014 -0500

--
 test/unit/org/apache/cassandra/cli/CliTest.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--




[2/3] git commit: fix CliTest on Windows patch by Josh McKenzie; reviewed by jbellis for CASSANDRA-7194

2014-05-21 Thread jbellis
fix CliTest on Windows
patch by Josh McKenzie; reviewed by jbellis for CASSANDRA-7194


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

Branch: refs/heads/trunk
Commit: dd6a2295991be002e2fb85201b43297a105bd1a4
Parents: e00878d
Author: Jonathan Ellis jbel...@apache.org
Authored: Wed May 21 13:21:05 2014 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Wed May 21 13:21:05 2014 -0500

--
 test/unit/org/apache/cassandra/cli/CliTest.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/dd6a2295/test/unit/org/apache/cassandra/cli/CliTest.java
--
diff --git a/test/unit/org/apache/cassandra/cli/CliTest.java 
b/test/unit/org/apache/cassandra/cli/CliTest.java
index 6b7232c..5d28c70 100644
--- a/test/unit/org/apache/cassandra/cli/CliTest.java
+++ b/test/unit/org/apache/cassandra/cli/CliTest.java
@@ -253,8 +253,8 @@ public class CliTest extends SchemaLoader
 // System.out.println(Result:\n + result);
 if (statement.startsWith(show schema))
 assertEquals(errStream.toString() + processing + statement,
- \nWARNING: CQL3 tables are intentionally omitted 
from 'show schema' output.\n
- + See 
https://issues.apache.org/jira/browse/CASSANDRA-4377 for details.\n\n,
+ \nWARNING: CQL3 tables are intentionally omitted 
from 'show schema' output. + String.format(%n)
+ + See 
https://issues.apache.org/jira/browse/CASSANDRA-4377 for details.\n + 
String.format(%n),
  errStream.toString());
 else
 assertEquals(errStream.toString() +  processing  + 
statement, , errStream.toString());



[jira] [Commented] (CASSANDRA-6421) Add bash completion to nodetool

2014-05-21 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-6421:
---

Can you post your 2.1 branch?

 Add bash completion to nodetool
 ---

 Key: CASSANDRA-6421
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6421
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Reporter: Cyril Scetbon
Assignee: Michael Shuler
Priority: Trivial
 Fix For: 2.1 rc1


 You can find the bash-completion file at 
 https://raw.github.com/cscetbon/cassandra/nodetool-completion/etc/bash_completion.d/nodetool
 it uses cqlsh to get keyspaces and namespaces and could use an environment 
 variable (not implemented) to get access which cqlsh if authentification is 
 needed. But I think that's really a good start :)



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


[1/3] git commit: fix native cell ByteOrder patch by bes; reviewed by jbellis and tested by mshuler for CASSANDRA-7201

2014-05-21 Thread jbellis
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 dd6a22959 - e06d74ef5
  refs/heads/trunk 6581abfae - f9e2990d5


fix native cell ByteOrder
patch by bes; reviewed by jbellis and tested by mshuler for CASSANDRA-7201


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

Branch: refs/heads/cassandra-2.1
Commit: e06d74ef534770ff0f5d4c1b95234bb321fc1a68
Parents: dd6a229
Author: Jonathan Ellis jbel...@apache.org
Authored: Wed May 21 13:25:17 2014 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Wed May 21 13:25:17 2014 -0500

--
 src/java/org/apache/cassandra/db/AbstractNativeCell.java | 5 +++--
 src/java/org/apache/cassandra/db/NativeCounterCell.java  | 5 -
 2 files changed, 3 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e06d74ef/src/java/org/apache/cassandra/db/AbstractNativeCell.java
--
diff --git a/src/java/org/apache/cassandra/db/AbstractNativeCell.java 
b/src/java/org/apache/cassandra/db/AbstractNativeCell.java
index d21171f..f3128b8 100644
--- a/src/java/org/apache/cassandra/db/AbstractNativeCell.java
+++ b/src/java/org/apache/cassandra/db/AbstractNativeCell.java
@@ -18,6 +18,7 @@
 package org.apache.cassandra.db;
 
 import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
 import java.security.MessageDigest;
 
 import org.apache.cassandra.config.CFMetaData;
@@ -183,7 +184,7 @@ public abstract class AbstractNativeCell extends 
AbstractCell implements CellNam
 public ByteBuffer value()
 {
 long offset = valueStartOffset();
-return getByteBuffer(offset, (int) (internalSize() - (postfixSize() + 
offset)));
+return getByteBuffer(offset, (int) (internalSize() - (postfixSize() + 
offset))).order(ByteOrder.BIG_ENDIAN);
 }
 
 private int clusteringSizeDelta()
@@ -291,7 +292,7 @@ public abstract class AbstractNativeCell extends 
AbstractCell implements CellNam
 int cellNamesOffset = nameDeltaOffset(size);
 int startDelta = i == 0 ? 0 : getShort(nameDeltaOffset(i));
 int endDelta = i  size - 1 ? getShort(nameDeltaOffset(i + 1)) : 
valueStartOffset() - cellNamesOffset;
-return getByteBuffer(cellNamesOffset + startDelta, endDelta - 
startDelta);
+return getByteBuffer(cellNamesOffset + startDelta, endDelta - 
startDelta).order(ByteOrder.BIG_ENDIAN);
 }
 
 private static final ThreadLocalbyte[] BUFFER = new ThreadLocalbyte[]()

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e06d74ef/src/java/org/apache/cassandra/db/NativeCounterCell.java
--
diff --git a/src/java/org/apache/cassandra/db/NativeCounterCell.java 
b/src/java/org/apache/cassandra/db/NativeCounterCell.java
index 5eba27c..374eb23 100644
--- a/src/java/org/apache/cassandra/db/NativeCounterCell.java
+++ b/src/java/org/apache/cassandra/db/NativeCounterCell.java
@@ -68,11 +68,6 @@ public class NativeCounterCell extends NativeCell implements 
CounterCell
 return getLong(internalSize() - 8);
 }
 
-public ByteBuffer value()
-{
-return super.value().order(ByteOrder.BIG_ENDIAN);
-}
-
 @Override
 public long total()
 {



[jira] [Updated] (CASSANDRA-6146) CQL-native stress

2014-05-21 Thread T Jake Luciani (JIRA)

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

T Jake Luciani updated CASSANDRA-6146:
--

Attachment: 6146-v2.txt

v2 makes DDL optional and adds required keyspace and table fields to yaml

 CQL-native stress
 -

 Key: CASSANDRA-6146
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6146
 Project: Cassandra
  Issue Type: New Feature
  Components: Tools
Reporter: Jonathan Ellis
Assignee: T Jake Luciani
 Fix For: 2.1 rc1

 Attachments: 6146-v2.txt, 6146.txt


 The existing CQL support in stress is not worth discussing.  We need to 
 start over, and we might as well kill two birds with one stone and move to 
 the native protocol while we're at it.



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


[2/3] git commit: fix native cell ByteOrder patch by bes; reviewed by jbellis and tested by mshuler for CASSANDRA-7201

2014-05-21 Thread jbellis
fix native cell ByteOrder
patch by bes; reviewed by jbellis and tested by mshuler for CASSANDRA-7201


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

Branch: refs/heads/trunk
Commit: e06d74ef534770ff0f5d4c1b95234bb321fc1a68
Parents: dd6a229
Author: Jonathan Ellis jbel...@apache.org
Authored: Wed May 21 13:25:17 2014 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Wed May 21 13:25:17 2014 -0500

--
 src/java/org/apache/cassandra/db/AbstractNativeCell.java | 5 +++--
 src/java/org/apache/cassandra/db/NativeCounterCell.java  | 5 -
 2 files changed, 3 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e06d74ef/src/java/org/apache/cassandra/db/AbstractNativeCell.java
--
diff --git a/src/java/org/apache/cassandra/db/AbstractNativeCell.java 
b/src/java/org/apache/cassandra/db/AbstractNativeCell.java
index d21171f..f3128b8 100644
--- a/src/java/org/apache/cassandra/db/AbstractNativeCell.java
+++ b/src/java/org/apache/cassandra/db/AbstractNativeCell.java
@@ -18,6 +18,7 @@
 package org.apache.cassandra.db;
 
 import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
 import java.security.MessageDigest;
 
 import org.apache.cassandra.config.CFMetaData;
@@ -183,7 +184,7 @@ public abstract class AbstractNativeCell extends 
AbstractCell implements CellNam
 public ByteBuffer value()
 {
 long offset = valueStartOffset();
-return getByteBuffer(offset, (int) (internalSize() - (postfixSize() + 
offset)));
+return getByteBuffer(offset, (int) (internalSize() - (postfixSize() + 
offset))).order(ByteOrder.BIG_ENDIAN);
 }
 
 private int clusteringSizeDelta()
@@ -291,7 +292,7 @@ public abstract class AbstractNativeCell extends 
AbstractCell implements CellNam
 int cellNamesOffset = nameDeltaOffset(size);
 int startDelta = i == 0 ? 0 : getShort(nameDeltaOffset(i));
 int endDelta = i  size - 1 ? getShort(nameDeltaOffset(i + 1)) : 
valueStartOffset() - cellNamesOffset;
-return getByteBuffer(cellNamesOffset + startDelta, endDelta - 
startDelta);
+return getByteBuffer(cellNamesOffset + startDelta, endDelta - 
startDelta).order(ByteOrder.BIG_ENDIAN);
 }
 
 private static final ThreadLocalbyte[] BUFFER = new ThreadLocalbyte[]()

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e06d74ef/src/java/org/apache/cassandra/db/NativeCounterCell.java
--
diff --git a/src/java/org/apache/cassandra/db/NativeCounterCell.java 
b/src/java/org/apache/cassandra/db/NativeCounterCell.java
index 5eba27c..374eb23 100644
--- a/src/java/org/apache/cassandra/db/NativeCounterCell.java
+++ b/src/java/org/apache/cassandra/db/NativeCounterCell.java
@@ -68,11 +68,6 @@ public class NativeCounterCell extends NativeCell implements 
CounterCell
 return getLong(internalSize() - 8);
 }
 
-public ByteBuffer value()
-{
-return super.value().order(ByteOrder.BIG_ENDIAN);
-}
-
 @Override
 public long total()
 {



[jira] [Comment Edited] (CASSANDRA-6421) Add bash completion to nodetool

2014-05-21 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis edited comment on CASSANDRA-6421 at 5/21/14 6:23 PM:


Can you post your 2.1 branch?

Edit: actually just your rebase of bash completion, let's not mix it in with 
the 7160 refactoring.


was (Author: jbellis):
Can you post your 2.1 branch?

 Add bash completion to nodetool
 ---

 Key: CASSANDRA-6421
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6421
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Reporter: Cyril Scetbon
Assignee: Michael Shuler
Priority: Trivial
 Fix For: 2.1 rc1


 You can find the bash-completion file at 
 https://raw.github.com/cscetbon/cassandra/nodetool-completion/etc/bash_completion.d/nodetool
 it uses cqlsh to get keyspaces and namespaces and could use an environment 
 variable (not implemented) to get access which cqlsh if authentification is 
 needed. But I think that's really a good start :)



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


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

2014-05-21 Thread jbellis
Merge branch 'cassandra-2.1' into trunk


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

Branch: refs/heads/trunk
Commit: f9e2990d54894382380d7f11c8a391b82e4c6d28
Parents: 6581abf e06d74e
Author: Jonathan Ellis jbel...@apache.org
Authored: Wed May 21 13:25:25 2014 -0500
Committer: Jonathan Ellis jbel...@apache.org
Committed: Wed May 21 13:25:25 2014 -0500

--
 src/java/org/apache/cassandra/db/AbstractNativeCell.java | 5 +++--
 src/java/org/apache/cassandra/db/NativeCounterCell.java  | 5 -
 2 files changed, 3 insertions(+), 7 deletions(-)
--




[jira] [Created] (CASSANDRA-7282) Faster Memtable map

2014-05-21 Thread Benedict (JIRA)
Benedict created CASSANDRA-7282:
---

 Summary: Faster Memtable map
 Key: CASSANDRA-7282
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7282
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Benedict
 Fix For: 3.0


Currently we maintain a ConcurrentSkipLastMap of DecoratedKey - Partition in 
our memtables. Maintaining this is an O(lg(n)) operation; since the vast 
majority of users use a hash partitioner, it occurs to me we could maintain a 
hybrid skip list / hash map. The skip list would impose the order on the 
collection, but a hash index would live alongside as part of the same data 
structure, simply mapping into the skip list and permitting O(1) lookups. It 
should be possible to define the hash map to also permit O(1) inserts. Our 
decorated keys are in fact perfectly designed for this scheme.

At the same time, we can potentially improve the data locality in the skip list 
by baking the initial 64 token bits directly into the structure, and storing 
multiple values per skip list entry to improve cache performance, bringing down 
memory and constant factor cpu overheads.



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


[jira] [Commented] (CASSANDRA-7279) MultiSliceTest.test_with_overlap* unit tests failing in trunk

2014-05-21 Thread T Jake Luciani (JIRA)

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

T Jake Luciani commented on CASSANDRA-7279:
---

So this is only failing in trunk not 2.1 branch?


 MultiSliceTest.test_with_overlap* unit tests failing in trunk
 -

 Key: CASSANDRA-7279
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7279
 Project: Cassandra
  Issue Type: Bug
  Components: Tests
Reporter: Michael Shuler
Assignee: T Jake Luciani
Priority: Minor
 Fix For: 2.1 rc1


 Example:
 https://cassci.datastax.com/job/trunk_utest/623/testReport/org.apache.cassandra.thrift/MultiSliceTest/



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


[jira] [Commented] (CASSANDRA-4718) More-efficient ExecutorService for improved throughput

2014-05-21 Thread Jason Brown (JIRA)

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

Jason Brown commented on CASSANDRA-4718:


+1 on the current 4718-sep branch

FTR, [~benedict] and I have worked closely on the code for the last several 
weeks, and I've provided direct feedback to him about problems/concerns. 

 More-efficient ExecutorService for improved throughput
 --

 Key: CASSANDRA-4718
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4718
 Project: Cassandra
  Issue Type: Improvement
Reporter: Jonathan Ellis
Assignee: Benedict
Priority: Minor
  Labels: performance
 Fix For: 2.1.0

 Attachments: 4718-v1.patch, E100M_summary_key_s.svg, 
 E10M_summary_key_s.svg, E600M_summary_key_s.svg, PerThreadQueue.java, 
 austin_diskbound_read.svg, aws.svg, aws_read.svg, 
 backpressure-stress.out.txt, baq vs trunk.png, 
 belliotsmith_branches-stress.out.txt, jason_read.svg, jason_read_latency.svg, 
 jason_run1.svg, jason_run2.svg, jason_run3.svg, jason_write.svg, op costs of 
 various queues.ods, stress op rate with various queues.ods, 
 stress_2014May15.txt, stress_2014May16.txt, v1-stress.out


 Currently all our execution stages dequeue tasks one at a time.  This can 
 result in contention between producers and consumers (although we do our best 
 to minimize this by using LinkedBlockingQueue).
 One approach to mitigating this would be to make consumer threads do more 
 work in bulk instead of just one task per dequeue.  (Producer threads tend 
 to be single-task oriented by nature, so I don't see an equivalent 
 opportunity there.)
 BlockingQueue has a drainTo(collection, int) method that would be perfect for 
 this.  However, no ExecutorService in the jdk supports using drainTo, nor 
 could I google one.
 What I would like to do here is create just such a beast and wire it into (at 
 least) the write and read stages.  (Other possible candidates for such an 
 optimization, such as the CommitLog and OutboundTCPConnection, are not 
 ExecutorService-based and will need to be one-offs.)
 AbstractExecutorService may be useful.  The implementations of 
 ICommitLogExecutorService may also be useful. (Despite the name these are not 
 actual ExecutorServices, although they share the most important properties of 
 one.)



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


  1   2   >