git commit: Fix thrift validation when inserting in CQL3 tables
Updated Branches: refs/heads/cassandra-2.0.0 667ec27a2 - 7a300c2a5 Fix thrift validation when inserting in CQL3 tables Fixup for #5138 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7a300c2a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7a300c2a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7a300c2a Branch: refs/heads/cassandra-2.0.0 Commit: 7a300c2a5e84cc39d1ac7e97dbf2f16a5e0013bc Parents: 667ec27 Author: Sylvain Lebresne sylv...@datastax.com Authored: Tue Aug 20 18:40:14 2013 +0200 Committer: Sylvain Lebresne sylv...@datastax.com Committed: Wed Aug 21 09:00:08 2013 +0200 -- CHANGES.txt| 1 + src/java/org/apache/cassandra/thrift/ThriftValidation.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/7a300c2a/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index cdb2ddef..3cae204 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.0.0 + * Fix thrift validation when inserting into CQL3 tables (CASSANDRA-5138) Merged from 1.2: * Fix getBloomFilterDiskSpaceUsed for AlwaysPresentFilter (CASSANDRA-5900) * Don't announce schema version until we've loaded the changes locally http://git-wip-us.apache.org/repos/asf/cassandra/blob/7a300c2a/src/java/org/apache/cassandra/thrift/ThriftValidation.java -- diff --git a/src/java/org/apache/cassandra/thrift/ThriftValidation.java b/src/java/org/apache/cassandra/thrift/ThriftValidation.java index ec3bb00..6f6a5eb 100644 --- a/src/java/org/apache/cassandra/thrift/ThriftValidation.java +++ b/src/java/org/apache/cassandra/thrift/ThriftValidation.java @@ -242,7 +242,7 @@ public class ThriftValidation int columnIndex = composite.types.size() - (cfDef.hasCollections ? 2 : 1); ByteBuffer CQL3ColumnName = components[columnIndex]; ColumnIdentifier columnId = new ColumnIdentifier(CQL3ColumnName, composite.types.get(columnIndex)); -if (cfDef.columns.get(columnId) == null) +if (cfDef.metadata.get(columnId) == null) throw new org.apache.cassandra.exceptions.InvalidRequestException(String.format(Invalid cell for CQL3 table %s. The CQL3 column component (%s) does not correspond to a defined CQL3 column, metadata.cfName, columnId));
[2/3] git commit: Merge branch 'cassandra-2.0.0' into cassandra-2.0
Merge branch 'cassandra-2.0.0' into cassandra-2.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/2e0279f8 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/2e0279f8 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/2e0279f8 Branch: refs/heads/trunk Commit: 2e0279f89ab0c404d25e2c04882ca1892d408b92 Parents: d35c823 7a300c2 Author: Sylvain Lebresne sylv...@datastax.com Authored: Wed Aug 21 09:03:28 2013 +0200 Committer: Sylvain Lebresne sylv...@datastax.com Committed: Wed Aug 21 09:03:28 2013 +0200 -- CHANGES.txt| 1 + src/java/org/apache/cassandra/thrift/ThriftValidation.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/2e0279f8/CHANGES.txt -- diff --cc CHANGES.txt index fe5908a,3cae204..551de18 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,14 -1,5 +1,15 @@@ +2.0.1 + * Notify indexer of columns shadowed by range tombstones (CASSANDRA-5614) + * Log Merkle tree stats (CASSANDRA-2698) + * Switch from crc32 to adler32 for compressed sstable checksums (CASSANDRA-5862) + * Improve offheap memcpy performance (CASSANDRA-5884) + * Use a range aware scanner for cleanup (CASSANDRA-2524) + * Cleanup doesn't need to inspect sstables that contain only local data + (CASSANDRA-5722) + + 2.0.0 + * Fix thrift validation when inserting into CQL3 tables (CASSANDRA-5138) Merged from 1.2: * Fix getBloomFilterDiskSpaceUsed for AlwaysPresentFilter (CASSANDRA-5900) * Don't announce schema version until we've loaded the changes locally
[2/2] git commit: Merge branch 'cassandra-2.0.0' into cassandra-2.0
Merge branch 'cassandra-2.0.0' into cassandra-2.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/2e0279f8 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/2e0279f8 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/2e0279f8 Branch: refs/heads/cassandra-2.0 Commit: 2e0279f89ab0c404d25e2c04882ca1892d408b92 Parents: d35c823 7a300c2 Author: Sylvain Lebresne sylv...@datastax.com Authored: Wed Aug 21 09:03:28 2013 +0200 Committer: Sylvain Lebresne sylv...@datastax.com Committed: Wed Aug 21 09:03:28 2013 +0200 -- CHANGES.txt| 1 + src/java/org/apache/cassandra/thrift/ThriftValidation.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/2e0279f8/CHANGES.txt -- diff --cc CHANGES.txt index fe5908a,3cae204..551de18 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,14 -1,5 +1,15 @@@ +2.0.1 + * Notify indexer of columns shadowed by range tombstones (CASSANDRA-5614) + * Log Merkle tree stats (CASSANDRA-2698) + * Switch from crc32 to adler32 for compressed sstable checksums (CASSANDRA-5862) + * Improve offheap memcpy performance (CASSANDRA-5884) + * Use a range aware scanner for cleanup (CASSANDRA-2524) + * Cleanup doesn't need to inspect sstables that contain only local data + (CASSANDRA-5722) + + 2.0.0 + * Fix thrift validation when inserting into CQL3 tables (CASSANDRA-5138) Merged from 1.2: * Fix getBloomFilterDiskSpaceUsed for AlwaysPresentFilter (CASSANDRA-5900) * Don't announce schema version until we've loaded the changes locally
[3/3] git commit: Merge branch 'cassandra-2.0' into trunk
Merge branch 'cassandra-2.0' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/1bb1ffbc Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/1bb1ffbc Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/1bb1ffbc Branch: refs/heads/trunk Commit: 1bb1ffbc059ca6eccbe3fbc6b9f887e3f072d081 Parents: a380cd1 2e0279f Author: Sylvain Lebresne sylv...@datastax.com Authored: Wed Aug 21 09:03:52 2013 +0200 Committer: Sylvain Lebresne sylv...@datastax.com Committed: Wed Aug 21 09:03:52 2013 +0200 -- CHANGES.txt| 1 + src/java/org/apache/cassandra/thrift/ThriftValidation.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/1bb1ffbc/CHANGES.txt --
[1/2] git commit: Fix thrift validation when inserting in CQL3 tables
Updated Branches: refs/heads/cassandra-2.0 d35c823ca - 2e0279f89 Fix thrift validation when inserting in CQL3 tables Fixup for #5138 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7a300c2a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7a300c2a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7a300c2a Branch: refs/heads/cassandra-2.0 Commit: 7a300c2a5e84cc39d1ac7e97dbf2f16a5e0013bc Parents: 667ec27 Author: Sylvain Lebresne sylv...@datastax.com Authored: Tue Aug 20 18:40:14 2013 +0200 Committer: Sylvain Lebresne sylv...@datastax.com Committed: Wed Aug 21 09:00:08 2013 +0200 -- CHANGES.txt| 1 + src/java/org/apache/cassandra/thrift/ThriftValidation.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/7a300c2a/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index cdb2ddef..3cae204 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.0.0 + * Fix thrift validation when inserting into CQL3 tables (CASSANDRA-5138) Merged from 1.2: * Fix getBloomFilterDiskSpaceUsed for AlwaysPresentFilter (CASSANDRA-5900) * Don't announce schema version until we've loaded the changes locally http://git-wip-us.apache.org/repos/asf/cassandra/blob/7a300c2a/src/java/org/apache/cassandra/thrift/ThriftValidation.java -- diff --git a/src/java/org/apache/cassandra/thrift/ThriftValidation.java b/src/java/org/apache/cassandra/thrift/ThriftValidation.java index ec3bb00..6f6a5eb 100644 --- a/src/java/org/apache/cassandra/thrift/ThriftValidation.java +++ b/src/java/org/apache/cassandra/thrift/ThriftValidation.java @@ -242,7 +242,7 @@ public class ThriftValidation int columnIndex = composite.types.size() - (cfDef.hasCollections ? 2 : 1); ByteBuffer CQL3ColumnName = components[columnIndex]; ColumnIdentifier columnId = new ColumnIdentifier(CQL3ColumnName, composite.types.get(columnIndex)); -if (cfDef.columns.get(columnId) == null) +if (cfDef.metadata.get(columnId) == null) throw new org.apache.cassandra.exceptions.InvalidRequestException(String.format(Invalid cell for CQL3 table %s. The CQL3 column component (%s) does not correspond to a defined CQL3 column, metadata.cfName, columnId));
[1/3] git commit: Fix thrift validation when inserting in CQL3 tables
Updated Branches: refs/heads/trunk a380cd1d0 - 1bb1ffbc0 Fix thrift validation when inserting in CQL3 tables Fixup for #5138 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7a300c2a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7a300c2a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7a300c2a Branch: refs/heads/trunk Commit: 7a300c2a5e84cc39d1ac7e97dbf2f16a5e0013bc Parents: 667ec27 Author: Sylvain Lebresne sylv...@datastax.com Authored: Tue Aug 20 18:40:14 2013 +0200 Committer: Sylvain Lebresne sylv...@datastax.com Committed: Wed Aug 21 09:00:08 2013 +0200 -- CHANGES.txt| 1 + src/java/org/apache/cassandra/thrift/ThriftValidation.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/7a300c2a/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index cdb2ddef..3cae204 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.0.0 + * Fix thrift validation when inserting into CQL3 tables (CASSANDRA-5138) Merged from 1.2: * Fix getBloomFilterDiskSpaceUsed for AlwaysPresentFilter (CASSANDRA-5900) * Don't announce schema version until we've loaded the changes locally http://git-wip-us.apache.org/repos/asf/cassandra/blob/7a300c2a/src/java/org/apache/cassandra/thrift/ThriftValidation.java -- diff --git a/src/java/org/apache/cassandra/thrift/ThriftValidation.java b/src/java/org/apache/cassandra/thrift/ThriftValidation.java index ec3bb00..6f6a5eb 100644 --- a/src/java/org/apache/cassandra/thrift/ThriftValidation.java +++ b/src/java/org/apache/cassandra/thrift/ThriftValidation.java @@ -242,7 +242,7 @@ public class ThriftValidation int columnIndex = composite.types.size() - (cfDef.hasCollections ? 2 : 1); ByteBuffer CQL3ColumnName = components[columnIndex]; ColumnIdentifier columnId = new ColumnIdentifier(CQL3ColumnName, composite.types.get(columnIndex)); -if (cfDef.columns.get(columnId) == null) +if (cfDef.metadata.get(columnId) == null) throw new org.apache.cassandra.exceptions.InvalidRequestException(String.format(Invalid cell for CQL3 table %s. The CQL3 column component (%s) does not correspond to a defined CQL3 column, metadata.cfName, columnId));
[jira] [Commented] (CASSANDRA-5138) Provide a better CQL error when table data does not conform to CQL metadata.
[ https://issues.apache.org/jira/browse/CASSANDRA-5138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13745836#comment-13745836 ] Sylvain Lebresne commented on CASSANDRA-5138: - You're right, there was a typo in the initial patch, we were checking against the clustering keys at a place where we were suppose to check the non-PK columns. Anyway, I took the liberty to commit the trivial fix to 7a300c2 (and checked insertion in a table like the one above does work as expected). Provide a better CQL error when table data does not conform to CQL metadata. Key: CASSANDRA-5138 URL: https://issues.apache.org/jira/browse/CASSANDRA-5138 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.2.0 Environment: Mac OS X running 1.2 Reporter: Brian ONeill Assignee: Sylvain Lebresne Priority: Minor Fix For: 2.0 Attachments: 5138-2.txt, 5138.txt, northpole.cql When you create a table via CQL, then insert into it via Thrift. If you inadvertently leave out a component of the column name, in CQL you receive a: TSocket read 0 bytes Server-side the following exception is logged: ERROR 15:19:18,016 Error occurred during processing of message. java.lang.ArrayIndexOutOfBoundsException: 3 at org.apache.cassandra.cql3.statements.ColumnGroupMap.add(ColumnGroupMap.java:43) at org.apache.cassandra.cql3.statements.ColumnGroupMap.access$200(ColumnGroupMap.java:31) at org.apache.cassandra.cql3.statements.ColumnGroupMap$Builder.add(ColumnGroupMap.java:138) at org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:805) at org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:145) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:134) at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:61) at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:132) at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:140) at org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1686) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4074) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4062) at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32) at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34) at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:199) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) I'll submit a schema, and steps to reproduce. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-5664) Improve serialization in the native protocol
[ https://issues.apache.org/jira/browse/CASSANDRA-5664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sylvain Lebresne updated CASSANDRA-5664: Attachment: 0002-Avoid-copy-when-compressing-native-protocol-frames.txt 0001-Rewrite-encoding-methods.txt Thanks for the remarks. And while I don't disagree with those, it seems to me that they all require a bit more investigation work to see whether they are worth the trouble, and while we should certainly do this additional work at some point, I think the patches here do improve the cleanness of the current serialization code enough that I'd rather leave those to a follow up and commit this now (provided we agree that the patches are already an improvement on the status quo). So attaching rebased patches but so far they are just rebased, nothing more. But to address the observations more precisely: bq. There's quite a bit of string encoding and object serialization going on in some of the encodedSize() methods. This means that strings/objects will be encoded/serialized twice. True. For strings, while I'm far from being an expert in unicode encodings and charsets, I'm not sure how one could compute the size of the result of UTF8 encoding without doing the actual encoding. Of course, the current CBUtil.sizeOfString does an array allocation which in theory could be avoided, but I'm not aware of a method that return the size of an encoded string without encoding it (and I'm certainly not writing one manually). So I'm open to suggestions, but I doubt this is much of a bottleneck in practice (see below for more on that) so... As for object serialization (that are not strings), I'm not totally sure which ones you are referring to exactly but I don't see anything that looks like a great waste of effort. bq. byte[] allocation and copying in encode() should be possible to avoid when serializing strings by careful use of ChannelBuffer.toByteBuffer(), CharBuffer.wrap() and CharsetEncoder.encode(). You're probably right, but I believe that means assuming (correct me if I'm wrong) that the result of ChannelBuffer.toByteBuffer() *will* share content with the ChannelBuffer it is called on, which is not guaranteed by that API. And while it is true that as of this patch we only call CBUtil.writeString() on ChannelBuffer for which this will be true, it bothers me to rely on it as this could easily break in a very hard to notice way in the future. Furthermore, I'm reasonably confident that this doesn't really matter in practice (performance wise) since if you use prepared statement (which you should if you care about performance) and with the optimization of the v2 protocol of not returning metadata in the result set for said prepared statement, I don't think there's any string serialization going on in the hot path. bq. It might be worth investigating if the code duplication in encode() and encodedSize() can be eliminated It does is worth the investigation. But we already do similar code duplication for other serialization code (namely IVersionedSerializer stuffs). So given the patch is already written and since, as said above, I'm pretty convinced this does already is better than the status quo, I'd rather left such refactoring to a latter ticket that could consider cleaning up all existing serialization code (though on a personal level, that particular code duplication from IVersionedSerializer has never bothered me much in practice so I don't see fixing it a priority). Improve serialization in the native protocol Key: CASSANDRA-5664 URL: https://issues.apache.org/jira/browse/CASSANDRA-5664 Project: Cassandra Issue Type: Improvement Reporter: Sylvain Lebresne Assignee: Sylvain Lebresne Priority: Minor Fix For: 2.0 Attachments: 0001-Rewrite-encoding-methods.txt, 0002-Avoid-copy-when-compressing-native-protocol-frames.txt Message serialization in the native protocol currently make a Netty's ChannelBuffers.wrappedBuffer(). The rational was to avoid copying of the values bytes when such value are biggish. This has a cost however, especially with lots of small values, and as suggested in CASSANDRA-5422, this might well be a more common scenario for Cassandra, so let's consider directly serializing in a newly allocated buffer. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-5664) Improve serialization in the native protocol
[ https://issues.apache.org/jira/browse/CASSANDRA-5664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sylvain Lebresne updated CASSANDRA-5664: Attachment: (was: 0002-Avoid-copy-when-compressing-native-protocol-frames.txt) Improve serialization in the native protocol Key: CASSANDRA-5664 URL: https://issues.apache.org/jira/browse/CASSANDRA-5664 Project: Cassandra Issue Type: Improvement Reporter: Sylvain Lebresne Assignee: Sylvain Lebresne Priority: Minor Fix For: 2.0 Attachments: 0001-Rewrite-encoding-methods.txt, 0002-Avoid-copy-when-compressing-native-protocol-frames.txt Message serialization in the native protocol currently make a Netty's ChannelBuffers.wrappedBuffer(). The rational was to avoid copying of the values bytes when such value are biggish. This has a cost however, especially with lots of small values, and as suggested in CASSANDRA-5422, this might well be a more common scenario for Cassandra, so let's consider directly serializing in a newly allocated buffer. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-5664) Improve serialization in the native protocol
[ https://issues.apache.org/jira/browse/CASSANDRA-5664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sylvain Lebresne updated CASSANDRA-5664: Attachment: (was: 0001-Rewrite-encoding-methods.txt) Improve serialization in the native protocol Key: CASSANDRA-5664 URL: https://issues.apache.org/jira/browse/CASSANDRA-5664 Project: Cassandra Issue Type: Improvement Reporter: Sylvain Lebresne Assignee: Sylvain Lebresne Priority: Minor Fix For: 2.0 Attachments: 0001-Rewrite-encoding-methods.txt, 0002-Avoid-copy-when-compressing-native-protocol-frames.txt Message serialization in the native protocol currently make a Netty's ChannelBuffers.wrappedBuffer(). The rational was to avoid copying of the values bytes when such value are biggish. This has a cost however, especially with lots of small values, and as suggested in CASSANDRA-5422, this might well be a more common scenario for Cassandra, so let's consider directly serializing in a newly allocated buffer. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5078) save compaction merge counts in a system table
[ https://issues.apache.org/jira/browse/CASSANDRA-5078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13745895#comment-13745895 ] lantao yan commented on CASSANDRA-5078: --- i attached a new diff file between my branch and the latest trunk. the only change between the two diff files is ignoring all changes in cassandra.yaml file. btw, after applying the first diff file, what's the error? save compaction merge counts in a system table -- Key: CASSANDRA-5078 URL: https://issues.apache.org/jira/browse/CASSANDRA-5078 Project: Cassandra Issue Type: Improvement Reporter: Matthew F. Dennis Priority: Minor Labels: lhf Attachments: diff.txt we should save the compaction merge stats from CASSANDRA-4894 in the system table and probably expose them via JMX (and nodetool) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-4766) ReverseCompaction
[ https://issues.apache.org/jira/browse/CASSANDRA-4766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sylvain Lebresne updated CASSANDRA-4766: Attachment: (was: 4766.txt) ReverseCompaction - Key: CASSANDRA-4766 URL: https://issues.apache.org/jira/browse/CASSANDRA-4766 Project: Cassandra Issue Type: New Feature Reporter: Edward Capriolo Assignee: Sylvain Lebresne Priority: Minor Fix For: 1.2.9 Attachments: 4766.txt Sometimes you run into a situation where your sized tiered SSTables get to be a funky size. Maybe a repair starts this or you were forced into a compaction. In any case we should be able to anti-compact a table, since anti-compact is a bad word lets call this reverse compact. This could be done online or offline. Closely related is SSTables cound have a max size. Leveled is not right for everyone. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-4766) ReverseCompaction
[ https://issues.apache.org/jira/browse/CASSANDRA-4766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sylvain Lebresne updated CASSANDRA-4766: Attachment: 4766.txt Fair enough. Attaching rebased and fixed patch. ReverseCompaction - Key: CASSANDRA-4766 URL: https://issues.apache.org/jira/browse/CASSANDRA-4766 Project: Cassandra Issue Type: New Feature Reporter: Edward Capriolo Assignee: Sylvain Lebresne Priority: Minor Fix For: 1.2.9 Attachments: 4766.txt Sometimes you run into a situation where your sized tiered SSTables get to be a funky size. Maybe a repair starts this or you were forced into a compaction. In any case we should be able to anti-compact a table, since anti-compact is a bad word lets call this reverse compact. This could be done online or offline. Closely related is SSTables cound have a max size. Leveled is not right for everyone. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
git commit: CQL3 documentation fixes (#5878)
Updated Branches: refs/heads/cassandra-1.2 08d22df07 - 55fed339c CQL3 documentation fixes (#5878) Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/55fed339 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/55fed339 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/55fed339 Branch: refs/heads/cassandra-1.2 Commit: 55fed339cb4243634b062927cb060044aba32b59 Parents: 08d22df Author: Sylvain Lebresne sylv...@datastax.com Authored: Wed Aug 21 12:15:14 2013 +0200 Committer: Sylvain Lebresne sylv...@datastax.com Committed: Wed Aug 21 12:15:14 2013 +0200 -- doc/cql3/CQL.textile | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/55fed339/doc/cql3/CQL.textile -- diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile index 22248ef..bb9a632 100644 --- a/doc/cql3/CQL.textile +++ b/doc/cql3/CQL.textile @@ -468,8 +468,10 @@ bc(syntax).. | identifier '=' identifier '+' map-literal | identifier '[' term ']' '=' term -where-clause ::= identifier '=' term - | identifier IN '(' ( term ( ',' term )* )? ')' +where-clause ::= relation ( AND relation )* + +relation ::= identifier '=' term + | identifier IN '(' ( term ( ',' term )* )? ')' option ::= TIMESTAMP integer | TTL integer @@ -485,7 +487,7 @@ WHERE movie = 'Serenity'; UPDATE UserActions SET total = total + 2 WHERE user = B70DE1D0-9908-4AE3-BE34-5573E5B09F14 AND action = 'click'; p. -The @UPDATE@ statement writes one or more columns for a given row in a table. The @where-clause@ is used to select the row to update and must include all columns composing the @PRIMARY KEY@. Other columns values are specified through @assignment@ after the @SET@ keyword. +The @UPDATE@ statement writes one or more columns for a given row in a table. The @where-clause@ is used to select the row to update and must include all columns composing the @PRIMARY KEY@ (the @IN@ relation is only supported for the last column of the partition key). Other columns values are specified through @assignment@ after the @SET@ keyword. Note that unlike in SQL, @UPDATE@ does not check the prior existence of the row: the row is created if none existed before, and updated otherwise. Furthermore, there is no mean to know which of creation or update happened. In fact, the semantic of @INSERT@ and @UPDATE@ are identical. @@ -514,8 +516,10 @@ bc(syntax).. selection ::= identifier ( '[' term ']' )? -where-clause ::= identifier '=' term - | identifier IN '(' ( term ( ',' term )* )? ')' +where-clause ::= relation ( AND relation )* + +relation ::= identifier '=' term + | identifier IN '(' ( term ( ',' term )* )? ')' p. __Sample:__ @@ -524,7 +528,7 @@ DELETE FROM NerdMovies USING TIMESTAMP 1240003134 WHERE movie = 'Serenity'; DELETE phone FROM Users WHERE userid IN (C73DE1D3-AF08-40F3-B124-3FF3E5109F22, B70DE1D0-9908-4AE3-BE34-5573E5B09F14); p. -The @DELETE@ statement deletes columns and rows. If column names are provided directly after the @DELETE@ keyword, only those columns are deleted from the row indicated by the @where-clause@ (the @id[value]@ syntax in @selection@ is for collection, please refer to the collection section:#collections for more details). Otherwise whole rows are removed. The @where-clause@ allows to specify the key for the row(s) to delete. +The @DELETE@ statement deletes columns and rows. If column names are provided directly after the @DELETE@ keyword, only those columns are deleted from the row indicated by the @where-clause@ (the @id[value]@ syntax in @selection@ is for collection, please refer to the collection section:#collections for more details). Otherwise whole rows are removed. The @where-clause@ allows to specify the key for the row(s) to delete (the @IN@ relation is only supported for the last column of the partition key). @DELETE@ supports the @TIMESTAMP@ options with the same semantic that in the @UPDATE@:#updateStmt statement. @@ -594,11 +598,11 @@ bc(syntax).. | TTL '(' identifier ')' | function '(' (selector (',' selector)*)? ')' -where-clause ::= relation ( AND relation )* +where-clause ::= relation ( AND relation )* -relation ::= identifier (= | | | = | =) term +relation ::= identifier ('=' | '' | '' | '=' | '=') term | identifier IN '(' ( term ( ',' term)* )? ')' - | TOKEN '(' identifier ')' (= | | | = | =) (term | TOKEN '( term ')' ) + | TOKEN '(' identifier ')' ('=' | '' | '' | '=' | '=') (term | TOKEN '(' term ')' ) order-by ::= ordering ( ',' odering
[1/2] git commit: CQL3 documentation fixes (#5878)
Updated Branches: refs/heads/cassandra-2.0.0 7a300c2a5 - cd4718245 CQL3 documentation fixes (#5878) Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/55fed339 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/55fed339 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/55fed339 Branch: refs/heads/cassandra-2.0.0 Commit: 55fed339cb4243634b062927cb060044aba32b59 Parents: 08d22df Author: Sylvain Lebresne sylv...@datastax.com Authored: Wed Aug 21 12:15:14 2013 +0200 Committer: Sylvain Lebresne sylv...@datastax.com Committed: Wed Aug 21 12:15:14 2013 +0200 -- doc/cql3/CQL.textile | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/55fed339/doc/cql3/CQL.textile -- diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile index 22248ef..bb9a632 100644 --- a/doc/cql3/CQL.textile +++ b/doc/cql3/CQL.textile @@ -468,8 +468,10 @@ bc(syntax).. | identifier '=' identifier '+' map-literal | identifier '[' term ']' '=' term -where-clause ::= identifier '=' term - | identifier IN '(' ( term ( ',' term )* )? ')' +where-clause ::= relation ( AND relation )* + +relation ::= identifier '=' term + | identifier IN '(' ( term ( ',' term )* )? ')' option ::= TIMESTAMP integer | TTL integer @@ -485,7 +487,7 @@ WHERE movie = 'Serenity'; UPDATE UserActions SET total = total + 2 WHERE user = B70DE1D0-9908-4AE3-BE34-5573E5B09F14 AND action = 'click'; p. -The @UPDATE@ statement writes one or more columns for a given row in a table. The @where-clause@ is used to select the row to update and must include all columns composing the @PRIMARY KEY@. Other columns values are specified through @assignment@ after the @SET@ keyword. +The @UPDATE@ statement writes one or more columns for a given row in a table. The @where-clause@ is used to select the row to update and must include all columns composing the @PRIMARY KEY@ (the @IN@ relation is only supported for the last column of the partition key). Other columns values are specified through @assignment@ after the @SET@ keyword. Note that unlike in SQL, @UPDATE@ does not check the prior existence of the row: the row is created if none existed before, and updated otherwise. Furthermore, there is no mean to know which of creation or update happened. In fact, the semantic of @INSERT@ and @UPDATE@ are identical. @@ -514,8 +516,10 @@ bc(syntax).. selection ::= identifier ( '[' term ']' )? -where-clause ::= identifier '=' term - | identifier IN '(' ( term ( ',' term )* )? ')' +where-clause ::= relation ( AND relation )* + +relation ::= identifier '=' term + | identifier IN '(' ( term ( ',' term )* )? ')' p. __Sample:__ @@ -524,7 +528,7 @@ DELETE FROM NerdMovies USING TIMESTAMP 1240003134 WHERE movie = 'Serenity'; DELETE phone FROM Users WHERE userid IN (C73DE1D3-AF08-40F3-B124-3FF3E5109F22, B70DE1D0-9908-4AE3-BE34-5573E5B09F14); p. -The @DELETE@ statement deletes columns and rows. If column names are provided directly after the @DELETE@ keyword, only those columns are deleted from the row indicated by the @where-clause@ (the @id[value]@ syntax in @selection@ is for collection, please refer to the collection section:#collections for more details). Otherwise whole rows are removed. The @where-clause@ allows to specify the key for the row(s) to delete. +The @DELETE@ statement deletes columns and rows. If column names are provided directly after the @DELETE@ keyword, only those columns are deleted from the row indicated by the @where-clause@ (the @id[value]@ syntax in @selection@ is for collection, please refer to the collection section:#collections for more details). Otherwise whole rows are removed. The @where-clause@ allows to specify the key for the row(s) to delete (the @IN@ relation is only supported for the last column of the partition key). @DELETE@ supports the @TIMESTAMP@ options with the same semantic that in the @UPDATE@:#updateStmt statement. @@ -594,11 +598,11 @@ bc(syntax).. | TTL '(' identifier ')' | function '(' (selector (',' selector)*)? ')' -where-clause ::= relation ( AND relation )* +where-clause ::= relation ( AND relation )* -relation ::= identifier (= | | | = | =) term +relation ::= identifier ('=' | '' | '' | '=' | '=') term | identifier IN '(' ( term ( ',' term)* )? ')' - | TOKEN '(' identifier ')' (= | | | = | =) (term | TOKEN '( term ')' ) + | TOKEN '(' identifier ')' ('=' | '' | '' | '=' | '=') (term | TOKEN '(' term ')' ) order-by ::= ordering ( ','
[1/3] git commit: CQL3 documentation fixes (#5878)
Updated Branches: refs/heads/cassandra-2.0 2e0279f89 - c4f6be8c4 CQL3 documentation fixes (#5878) Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/55fed339 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/55fed339 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/55fed339 Branch: refs/heads/cassandra-2.0 Commit: 55fed339cb4243634b062927cb060044aba32b59 Parents: 08d22df Author: Sylvain Lebresne sylv...@datastax.com Authored: Wed Aug 21 12:15:14 2013 +0200 Committer: Sylvain Lebresne sylv...@datastax.com Committed: Wed Aug 21 12:15:14 2013 +0200 -- doc/cql3/CQL.textile | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/55fed339/doc/cql3/CQL.textile -- diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile index 22248ef..bb9a632 100644 --- a/doc/cql3/CQL.textile +++ b/doc/cql3/CQL.textile @@ -468,8 +468,10 @@ bc(syntax).. | identifier '=' identifier '+' map-literal | identifier '[' term ']' '=' term -where-clause ::= identifier '=' term - | identifier IN '(' ( term ( ',' term )* )? ')' +where-clause ::= relation ( AND relation )* + +relation ::= identifier '=' term + | identifier IN '(' ( term ( ',' term )* )? ')' option ::= TIMESTAMP integer | TTL integer @@ -485,7 +487,7 @@ WHERE movie = 'Serenity'; UPDATE UserActions SET total = total + 2 WHERE user = B70DE1D0-9908-4AE3-BE34-5573E5B09F14 AND action = 'click'; p. -The @UPDATE@ statement writes one or more columns for a given row in a table. The @where-clause@ is used to select the row to update and must include all columns composing the @PRIMARY KEY@. Other columns values are specified through @assignment@ after the @SET@ keyword. +The @UPDATE@ statement writes one or more columns for a given row in a table. The @where-clause@ is used to select the row to update and must include all columns composing the @PRIMARY KEY@ (the @IN@ relation is only supported for the last column of the partition key). Other columns values are specified through @assignment@ after the @SET@ keyword. Note that unlike in SQL, @UPDATE@ does not check the prior existence of the row: the row is created if none existed before, and updated otherwise. Furthermore, there is no mean to know which of creation or update happened. In fact, the semantic of @INSERT@ and @UPDATE@ are identical. @@ -514,8 +516,10 @@ bc(syntax).. selection ::= identifier ( '[' term ']' )? -where-clause ::= identifier '=' term - | identifier IN '(' ( term ( ',' term )* )? ')' +where-clause ::= relation ( AND relation )* + +relation ::= identifier '=' term + | identifier IN '(' ( term ( ',' term )* )? ')' p. __Sample:__ @@ -524,7 +528,7 @@ DELETE FROM NerdMovies USING TIMESTAMP 1240003134 WHERE movie = 'Serenity'; DELETE phone FROM Users WHERE userid IN (C73DE1D3-AF08-40F3-B124-3FF3E5109F22, B70DE1D0-9908-4AE3-BE34-5573E5B09F14); p. -The @DELETE@ statement deletes columns and rows. If column names are provided directly after the @DELETE@ keyword, only those columns are deleted from the row indicated by the @where-clause@ (the @id[value]@ syntax in @selection@ is for collection, please refer to the collection section:#collections for more details). Otherwise whole rows are removed. The @where-clause@ allows to specify the key for the row(s) to delete. +The @DELETE@ statement deletes columns and rows. If column names are provided directly after the @DELETE@ keyword, only those columns are deleted from the row indicated by the @where-clause@ (the @id[value]@ syntax in @selection@ is for collection, please refer to the collection section:#collections for more details). Otherwise whole rows are removed. The @where-clause@ allows to specify the key for the row(s) to delete (the @IN@ relation is only supported for the last column of the partition key). @DELETE@ supports the @TIMESTAMP@ options with the same semantic that in the @UPDATE@:#updateStmt statement. @@ -594,11 +598,11 @@ bc(syntax).. | TTL '(' identifier ')' | function '(' (selector (',' selector)*)? ')' -where-clause ::= relation ( AND relation )* +where-clause ::= relation ( AND relation )* -relation ::= identifier (= | | | = | =) term +relation ::= identifier ('=' | '' | '' | '=' | '=') term | identifier IN '(' ( term ( ',' term)* )? ')' - | TOKEN '(' identifier ')' (= | | | = | =) (term | TOKEN '( term ')' ) + | TOKEN '(' identifier ')' ('=' | '' | '' | '=' | '=') (term | TOKEN '(' term ')' ) order-by ::= ordering ( ',' odering
[2/2] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0.0
Merge branch 'cassandra-1.2' into cassandra-2.0.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/cd471824 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/cd471824 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/cd471824 Branch: refs/heads/cassandra-2.0.0 Commit: cd47182458623fb7b0c5b447a5f8a5eff33beac9 Parents: 7a300c2 55fed33 Author: Sylvain Lebresne sylv...@datastax.com Authored: Wed Aug 21 12:15:59 2013 +0200 Committer: Sylvain Lebresne sylv...@datastax.com Committed: Wed Aug 21 12:15:59 2013 +0200 -- doc/cql3/CQL.textile | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/cd471824/doc/cql3/CQL.textile -- diff --cc doc/cql3/CQL.textile index ba90994,bb9a632..c87b9a5 --- a/doc/cql3/CQL.textile +++ b/doc/cql3/CQL.textile @@@ -500,11 -487,9 +502,11 @@@ WHERE movie = 'Serenity' UPDATE UserActions SET total = total + 2 WHERE user = B70DE1D0-9908-4AE3-BE34-5573E5B09F14 AND action = 'click'; p. - The @UPDATE@ statement writes one or more columns for a given row in a table. The @where-clause@ is used to select the row to update and must include all columns composing the @PRIMARY KEY@. Other columns values are specified through @assignment@ after the @SET@ keyword. + The @UPDATE@ statement writes one or more columns for a given row in a table. The @where-clause@ is used to select the row to update and must include all columns composing the @PRIMARY KEY@ (the @IN@ relation is only supported for the last column of the partition key). Other columns values are specified through @assignment@ after the @SET@ keyword. -Note that unlike in SQL, @UPDATE@ does not check the prior existence of the row: the row is created if none existed before, and updated otherwise. Furthermore, there is no mean to know which of creation or update happened. In fact, the semantic of @INSERT@ and @UPDATE@ are identical. +Note that unlike in SQL, @UPDATE@ does not check the prior existence of the row by default: the row is created if none existed before, and updated otherwise. Furthermore, there is no mean to know which of creation or update happened. + +It is however possible to use the conditions on some columns through @IF@, in which case the row will not be updated unless such condition are met. But please note that using @IF@ conditions will incur a non negligible performance cost (internally, Paxos will be used) so this should be used sparingly. In an @UPDATE@ statement, all updates within the same partition key are applied atomically and in isolation.
[3/3] git commit: Merge branch 'cassandra-2.0.0' into cassandra-2.0
Merge branch 'cassandra-2.0.0' into cassandra-2.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c4f6be8c Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c4f6be8c Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c4f6be8c Branch: refs/heads/cassandra-2.0 Commit: c4f6be8c47cb1ea343f5bf2b14cf1173e57c8bcc Parents: 2e0279f cd47182 Author: Sylvain Lebresne sylv...@datastax.com Authored: Wed Aug 21 12:16:23 2013 +0200 Committer: Sylvain Lebresne sylv...@datastax.com Committed: Wed Aug 21 12:16:23 2013 +0200 -- doc/cql3/CQL.textile | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) --
[2/3] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0.0
Merge branch 'cassandra-1.2' into cassandra-2.0.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/cd471824 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/cd471824 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/cd471824 Branch: refs/heads/cassandra-2.0 Commit: cd47182458623fb7b0c5b447a5f8a5eff33beac9 Parents: 7a300c2 55fed33 Author: Sylvain Lebresne sylv...@datastax.com Authored: Wed Aug 21 12:15:59 2013 +0200 Committer: Sylvain Lebresne sylv...@datastax.com Committed: Wed Aug 21 12:15:59 2013 +0200 -- doc/cql3/CQL.textile | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/cd471824/doc/cql3/CQL.textile -- diff --cc doc/cql3/CQL.textile index ba90994,bb9a632..c87b9a5 --- a/doc/cql3/CQL.textile +++ b/doc/cql3/CQL.textile @@@ -500,11 -487,9 +502,11 @@@ WHERE movie = 'Serenity' UPDATE UserActions SET total = total + 2 WHERE user = B70DE1D0-9908-4AE3-BE34-5573E5B09F14 AND action = 'click'; p. - The @UPDATE@ statement writes one or more columns for a given row in a table. The @where-clause@ is used to select the row to update and must include all columns composing the @PRIMARY KEY@. Other columns values are specified through @assignment@ after the @SET@ keyword. + The @UPDATE@ statement writes one or more columns for a given row in a table. The @where-clause@ is used to select the row to update and must include all columns composing the @PRIMARY KEY@ (the @IN@ relation is only supported for the last column of the partition key). Other columns values are specified through @assignment@ after the @SET@ keyword. -Note that unlike in SQL, @UPDATE@ does not check the prior existence of the row: the row is created if none existed before, and updated otherwise. Furthermore, there is no mean to know which of creation or update happened. In fact, the semantic of @INSERT@ and @UPDATE@ are identical. +Note that unlike in SQL, @UPDATE@ does not check the prior existence of the row by default: the row is created if none existed before, and updated otherwise. Furthermore, there is no mean to know which of creation or update happened. + +It is however possible to use the conditions on some columns through @IF@, in which case the row will not be updated unless such condition are met. But please note that using @IF@ conditions will incur a non negligible performance cost (internally, Paxos will be used) so this should be used sparingly. In an @UPDATE@ statement, all updates within the same partition key are applied atomically and in isolation.
[4/4] git commit: Merge branch 'cassandra-2.0' into trunk
Merge branch 'cassandra-2.0' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/896e1722 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/896e1722 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/896e1722 Branch: refs/heads/trunk Commit: 896e1722da7076105ec1b533c25940616b2bd3b3 Parents: 1bb1ffb c4f6be8 Author: Sylvain Lebresne sylv...@datastax.com Authored: Wed Aug 21 12:16:37 2013 +0200 Committer: Sylvain Lebresne sylv...@datastax.com Committed: Wed Aug 21 12:16:37 2013 +0200 -- doc/cql3/CQL.textile | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) --
[2/4] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0.0
Merge branch 'cassandra-1.2' into cassandra-2.0.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/cd471824 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/cd471824 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/cd471824 Branch: refs/heads/trunk Commit: cd47182458623fb7b0c5b447a5f8a5eff33beac9 Parents: 7a300c2 55fed33 Author: Sylvain Lebresne sylv...@datastax.com Authored: Wed Aug 21 12:15:59 2013 +0200 Committer: Sylvain Lebresne sylv...@datastax.com Committed: Wed Aug 21 12:15:59 2013 +0200 -- doc/cql3/CQL.textile | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/cd471824/doc/cql3/CQL.textile -- diff --cc doc/cql3/CQL.textile index ba90994,bb9a632..c87b9a5 --- a/doc/cql3/CQL.textile +++ b/doc/cql3/CQL.textile @@@ -500,11 -487,9 +502,11 @@@ WHERE movie = 'Serenity' UPDATE UserActions SET total = total + 2 WHERE user = B70DE1D0-9908-4AE3-BE34-5573E5B09F14 AND action = 'click'; p. - The @UPDATE@ statement writes one or more columns for a given row in a table. The @where-clause@ is used to select the row to update and must include all columns composing the @PRIMARY KEY@. Other columns values are specified through @assignment@ after the @SET@ keyword. + The @UPDATE@ statement writes one or more columns for a given row in a table. The @where-clause@ is used to select the row to update and must include all columns composing the @PRIMARY KEY@ (the @IN@ relation is only supported for the last column of the partition key). Other columns values are specified through @assignment@ after the @SET@ keyword. -Note that unlike in SQL, @UPDATE@ does not check the prior existence of the row: the row is created if none existed before, and updated otherwise. Furthermore, there is no mean to know which of creation or update happened. In fact, the semantic of @INSERT@ and @UPDATE@ are identical. +Note that unlike in SQL, @UPDATE@ does not check the prior existence of the row by default: the row is created if none existed before, and updated otherwise. Furthermore, there is no mean to know which of creation or update happened. + +It is however possible to use the conditions on some columns through @IF@, in which case the row will not be updated unless such condition are met. But please note that using @IF@ conditions will incur a non negligible performance cost (internally, Paxos will be used) so this should be used sparingly. In an @UPDATE@ statement, all updates within the same partition key are applied atomically and in isolation.
[3/4] git commit: Merge branch 'cassandra-2.0.0' into cassandra-2.0
Merge branch 'cassandra-2.0.0' into cassandra-2.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c4f6be8c Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c4f6be8c Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c4f6be8c Branch: refs/heads/trunk Commit: c4f6be8c47cb1ea343f5bf2b14cf1173e57c8bcc Parents: 2e0279f cd47182 Author: Sylvain Lebresne sylv...@datastax.com Authored: Wed Aug 21 12:16:23 2013 +0200 Committer: Sylvain Lebresne sylv...@datastax.com Committed: Wed Aug 21 12:16:23 2013 +0200 -- doc/cql3/CQL.textile | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) --
[1/4] git commit: CQL3 documentation fixes (#5878)
Updated Branches: refs/heads/trunk 1bb1ffbc0 - 896e1722d CQL3 documentation fixes (#5878) Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/55fed339 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/55fed339 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/55fed339 Branch: refs/heads/trunk Commit: 55fed339cb4243634b062927cb060044aba32b59 Parents: 08d22df Author: Sylvain Lebresne sylv...@datastax.com Authored: Wed Aug 21 12:15:14 2013 +0200 Committer: Sylvain Lebresne sylv...@datastax.com Committed: Wed Aug 21 12:15:14 2013 +0200 -- doc/cql3/CQL.textile | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/55fed339/doc/cql3/CQL.textile -- diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile index 22248ef..bb9a632 100644 --- a/doc/cql3/CQL.textile +++ b/doc/cql3/CQL.textile @@ -468,8 +468,10 @@ bc(syntax).. | identifier '=' identifier '+' map-literal | identifier '[' term ']' '=' term -where-clause ::= identifier '=' term - | identifier IN '(' ( term ( ',' term )* )? ')' +where-clause ::= relation ( AND relation )* + +relation ::= identifier '=' term + | identifier IN '(' ( term ( ',' term )* )? ')' option ::= TIMESTAMP integer | TTL integer @@ -485,7 +487,7 @@ WHERE movie = 'Serenity'; UPDATE UserActions SET total = total + 2 WHERE user = B70DE1D0-9908-4AE3-BE34-5573E5B09F14 AND action = 'click'; p. -The @UPDATE@ statement writes one or more columns for a given row in a table. The @where-clause@ is used to select the row to update and must include all columns composing the @PRIMARY KEY@. Other columns values are specified through @assignment@ after the @SET@ keyword. +The @UPDATE@ statement writes one or more columns for a given row in a table. The @where-clause@ is used to select the row to update and must include all columns composing the @PRIMARY KEY@ (the @IN@ relation is only supported for the last column of the partition key). Other columns values are specified through @assignment@ after the @SET@ keyword. Note that unlike in SQL, @UPDATE@ does not check the prior existence of the row: the row is created if none existed before, and updated otherwise. Furthermore, there is no mean to know which of creation or update happened. In fact, the semantic of @INSERT@ and @UPDATE@ are identical. @@ -514,8 +516,10 @@ bc(syntax).. selection ::= identifier ( '[' term ']' )? -where-clause ::= identifier '=' term - | identifier IN '(' ( term ( ',' term )* )? ')' +where-clause ::= relation ( AND relation )* + +relation ::= identifier '=' term + | identifier IN '(' ( term ( ',' term )* )? ')' p. __Sample:__ @@ -524,7 +528,7 @@ DELETE FROM NerdMovies USING TIMESTAMP 1240003134 WHERE movie = 'Serenity'; DELETE phone FROM Users WHERE userid IN (C73DE1D3-AF08-40F3-B124-3FF3E5109F22, B70DE1D0-9908-4AE3-BE34-5573E5B09F14); p. -The @DELETE@ statement deletes columns and rows. If column names are provided directly after the @DELETE@ keyword, only those columns are deleted from the row indicated by the @where-clause@ (the @id[value]@ syntax in @selection@ is for collection, please refer to the collection section:#collections for more details). Otherwise whole rows are removed. The @where-clause@ allows to specify the key for the row(s) to delete. +The @DELETE@ statement deletes columns and rows. If column names are provided directly after the @DELETE@ keyword, only those columns are deleted from the row indicated by the @where-clause@ (the @id[value]@ syntax in @selection@ is for collection, please refer to the collection section:#collections for more details). Otherwise whole rows are removed. The @where-clause@ allows to specify the key for the row(s) to delete (the @IN@ relation is only supported for the last column of the partition key). @DELETE@ supports the @TIMESTAMP@ options with the same semantic that in the @UPDATE@:#updateStmt statement. @@ -594,11 +598,11 @@ bc(syntax).. | TTL '(' identifier ')' | function '(' (selector (',' selector)*)? ')' -where-clause ::= relation ( AND relation )* +where-clause ::= relation ( AND relation )* -relation ::= identifier (= | | | = | =) term +relation ::= identifier ('=' | '' | '' | '=' | '=') term | identifier IN '(' ( term ( ',' term)* )? ')' - | TOKEN '(' identifier ')' (= | | | = | =) (term | TOKEN '( term ')' ) + | TOKEN '(' identifier ')' ('=' | '' | '' | '=' | '=') (term | TOKEN '(' term ')' ) order-by ::= ordering ( ',' odering )* ordering ::=
[jira] [Resolved] (CASSANDRA-5878) Fix CQL3 documentation
[ https://issues.apache.org/jira/browse/CASSANDRA-5878?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sylvain Lebresne resolved CASSANDRA-5878. - Resolution: Fixed Assignee: Sylvain Lebresne Fix committed, thanks. Fix CQL3 documentation --- Key: CASSANDRA-5878 URL: https://issues.apache.org/jira/browse/CASSANDRA-5878 Project: Cassandra Issue Type: Task Environment: Cassandra 2.0rc1 Reporter: Michaël Figuière Assignee: Sylvain Lebresne Priority: Trivial A couple of fixes are required in the CQL3 documentation: *{{UPDATE}} and {{DELETE}} statements allow {{AND}} in {{WHERE}} clauses* {code} where-clause ::= identifier '=' term | identifier IN '(' ( term ( ',' term )* )? ')' {code} should be: {code} where-clause ::= relation ( AND relation )* relation ::= identifier '=' term | identifier IN '(' ( term ( ',' term)* )? ')' {code} *{{UPDATE}} and {{DELETE}} statements support {{IN}} only on the last column of the partition key* The documentation should specify this limitation in the way {{IN}} can be used. It's currently explained only in cqlsh. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4766) ReverseCompaction
[ https://issues.apache.org/jira/browse/CASSANDRA-4766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13745922#comment-13745922 ] Marcus Eriksson commented on CASSANDRA-4766: looks good to me ReverseCompaction - Key: CASSANDRA-4766 URL: https://issues.apache.org/jira/browse/CASSANDRA-4766 Project: Cassandra Issue Type: New Feature Reporter: Edward Capriolo Assignee: Sylvain Lebresne Priority: Minor Fix For: 1.2.9 Attachments: 4766.txt Sometimes you run into a situation where your sized tiered SSTables get to be a funky size. Maybe a repair starts this or you were forced into a compaction. In any case we should be able to anti-compact a table, since anti-compact is a bad word lets call this reverse compact. This could be done online or offline. Closely related is SSTables cound have a max size. Leveled is not right for everyone. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (CASSANDRA-5908) Add existing sstables to leveled manifest on startup
Marcus Eriksson created CASSANDRA-5908: -- Summary: Add existing sstables to leveled manifest on startup Key: CASSANDRA-5908 URL: https://issues.apache.org/jira/browse/CASSANDRA-5908 Project: Cassandra Issue Type: Bug Reporter: Marcus Eriksson Assignee: Marcus Eriksson Fix For: 2.0 we need to add all sstables to the leveled manifest on startup, looks like this was introduced in 6968f68cd7c -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-5908) Add existing sstables to leveled manifest on startup
[ https://issues.apache.org/jira/browse/CASSANDRA-5908?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marcus Eriksson updated CASSANDRA-5908: --- Attachment: 0001-on-startup-add-all-sstables-to-the-leveled-manifest.patch Add existing sstables to leveled manifest on startup Key: CASSANDRA-5908 URL: https://issues.apache.org/jira/browse/CASSANDRA-5908 Project: Cassandra Issue Type: Bug Reporter: Marcus Eriksson Assignee: Marcus Eriksson Fix For: 2.0 Attachments: 0001-on-startup-add-all-sstables-to-the-leveled-manifest.patch we need to add all sstables to the leveled manifest on startup, looks like this was introduced in 6968f68cd7c -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-5078) save compaction merge counts in a system table
[ https://issues.apache.org/jira/browse/CASSANDRA-5078?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] lantao yan updated CASSANDRA-5078: -- Attachment: patch.patch save compaction merge counts in a system table -- Key: CASSANDRA-5078 URL: https://issues.apache.org/jira/browse/CASSANDRA-5078 Project: Cassandra Issue Type: Improvement Reporter: Matthew F. Dennis Priority: Minor Labels: lhf Attachments: patch.patch we should save the compaction merge stats from CASSANDRA-4894 in the system table and probably expose them via JMX (and nodetool) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-5078) save compaction merge counts in a system table
[ https://issues.apache.org/jira/browse/CASSANDRA-5078?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] lantao yan updated CASSANDRA-5078: -- Attachment: (was: diff.txt) save compaction merge counts in a system table -- Key: CASSANDRA-5078 URL: https://issues.apache.org/jira/browse/CASSANDRA-5078 Project: Cassandra Issue Type: Improvement Reporter: Matthew F. Dennis Priority: Minor Labels: lhf Attachments: patch.patch we should save the compaction merge stats from CASSANDRA-4894 in the system table and probably expose them via JMX (and nodetool) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Comment Edited] (CASSANDRA-5078) save compaction merge counts in a system table
[ https://issues.apache.org/jira/browse/CASSANDRA-5078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13745895#comment-13745895 ] lantao yan edited comment on CASSANDRA-5078 at 8/21/13 12:33 PM: - i attached a new patch file between my branch and the latest trunk. this one should be working. i have tried on my local machine. was (Author: yanlantao): i attached a new diff file between my branch and the latest trunk. the only change between the two diff files is ignoring all changes in cassandra.yaml file. btw, after applying the first diff file, what's the error? save compaction merge counts in a system table -- Key: CASSANDRA-5078 URL: https://issues.apache.org/jira/browse/CASSANDRA-5078 Project: Cassandra Issue Type: Improvement Reporter: Matthew F. Dennis Priority: Minor Labels: lhf Attachments: patch.patch we should save the compaction merge stats from CASSANDRA-4894 in the system table and probably expose them via JMX (and nodetool) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-4551) Nodetool getendpoints keys do not work with spaces, key_validation=ascii value of key = a test no delimiter
[ https://issues.apache.org/jira/browse/CASSANDRA-4551?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jonathan Ellis updated CASSANDRA-4551: -- Reviewer: dbrosius Assignee: Greg DeAngelis Nodetool getendpoints keys do not work with spaces, key_validation=ascii value of key = a test no delimiter --- Key: CASSANDRA-4551 URL: https://issues.apache.org/jira/browse/CASSANDRA-4551 Project: Cassandra Issue Type: Bug Components: Tools Affects Versions: 1.0.9 Reporter: Mark Valdez Assignee: Greg DeAngelis Priority: Trivial Labels: datastax_qa, lhf Attachments: CASSANDRA-4551.txt Nodetool getendpoints keys do not work with embedded spaces, key_validation=ascii value of key = a test no delimiter tried to escape key = a test with double and single quotes. It doesn't work. It just reiterates the format of the tool's command: getendpoints requires ks, cf and key args -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5908) Add existing sstables to leveled manifest on startup
[ https://issues.apache.org/jira/browse/CASSANDRA-5908?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13746007#comment-13746007 ] Jonathan Ellis commented on CASSANDRA-5908: --- +1 Add existing sstables to leveled manifest on startup Key: CASSANDRA-5908 URL: https://issues.apache.org/jira/browse/CASSANDRA-5908 Project: Cassandra Issue Type: Bug Reporter: Marcus Eriksson Assignee: Marcus Eriksson Fix For: 2.0 Attachments: 0001-on-startup-add-all-sstables-to-the-leveled-manifest.patch we need to add all sstables to the leveled manifest on startup, looks like this was introduced in 6968f68cd7c -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
git commit: bump up duplicate log message filtering, for now
Updated Branches: refs/heads/trunk 896e1722d - fe32c9744 bump up duplicate log message filtering, for now Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/fe32c974 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/fe32c974 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/fe32c974 Branch: refs/heads/trunk Commit: fe32c9744d64c0ce439b661f2d259c287ed94ae9 Parents: 896e172 Author: Dave Brosius dbros...@apache.org Authored: Wed Aug 21 08:49:17 2013 -0400 Committer: Dave Brosius dbros...@apache.org Committed: Wed Aug 21 08:50:03 2013 -0400 -- conf/logback.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/fe32c974/conf/logback.xml -- diff --git a/conf/logback.xml b/conf/logback.xml index 47fed3f..cd17d44 100644 --- a/conf/logback.xml +++ b/conf/logback.xml @@ -1,6 +1,6 @@ configuration scan=true - turboFilter class=ch.qos.logback.classic.turbo.DuplicateMessageFilter AllowedRepetitions=5/ + turboFilter class=ch.qos.logback.classic.turbo.DuplicateMessageFilter AllowedRepetitions=100/ appender name=FILE class=ch.qos.logback.core.rolling.RollingFileAppender file/var/log/cassandra/system.log/file
git commit: Add all sstables to the leveled manifest on startup.
Updated Branches: refs/heads/cassandra-2.0.0 cd4718245 - 8f367fdf9 Add all sstables to the leveled manifest on startup. Patch by marcuse, reviewed by jbellis for CASSANDRA-5908 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/8f367fdf Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8f367fdf Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8f367fdf Branch: refs/heads/cassandra-2.0.0 Commit: 8f367fdf92c03ee4bbcb0daa2272bd5155cf4174 Parents: cd47182 Author: Marcus Eriksson marc...@spotify.com Authored: Wed Aug 21 14:50:02 2013 +0200 Committer: Marcus Eriksson marc...@spotify.com Committed: Wed Aug 21 14:50:02 2013 +0200 -- .../apache/cassandra/db/compaction/LeveledCompactionStrategy.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/8f367fdf/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java -- diff --git a/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java b/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java index 292220d..65abb0a 100644 --- a/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java +++ b/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java @@ -71,7 +71,7 @@ public class LeveledCompactionStrategy extends AbstractCompactionStrategy implem cfs.getDataTracker().subscribe(this); logger.debug({} subscribed to the data tracker., this); -manifest = LeveledManifest.create(cfs, this.maxSSTableSizeInMB, Collections.SSTableReaderemptyList(), localOptions); +manifest = LeveledManifest.create(cfs, this.maxSSTableSizeInMB, cfs.getSSTables(), localOptions); logger.debug(Created {}, manifest); }
[2/2] git commit: Merge branch 'cassandra-2.0.0' into cassandra-2.0
Merge branch 'cassandra-2.0.0' into cassandra-2.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/857a7f5f Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/857a7f5f Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/857a7f5f Branch: refs/heads/cassandra-2.0 Commit: 857a7f5fb8246aa2d588c3ff257109b14f35be2f Parents: c4f6be8 8f367fd Author: Marcus Eriksson marc...@spotify.com Authored: Wed Aug 21 14:52:25 2013 +0200 Committer: Marcus Eriksson marc...@spotify.com Committed: Wed Aug 21 14:52:25 2013 +0200 -- .../apache/cassandra/db/compaction/LeveledCompactionStrategy.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/857a7f5f/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java --
[1/2] git commit: Add all sstables to the leveled manifest on startup.
Updated Branches: refs/heads/cassandra-2.0 c4f6be8c4 - 857a7f5fb Add all sstables to the leveled manifest on startup. Patch by marcuse, reviewed by jbellis for CASSANDRA-5908 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/8f367fdf Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8f367fdf Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8f367fdf Branch: refs/heads/cassandra-2.0 Commit: 8f367fdf92c03ee4bbcb0daa2272bd5155cf4174 Parents: cd47182 Author: Marcus Eriksson marc...@spotify.com Authored: Wed Aug 21 14:50:02 2013 +0200 Committer: Marcus Eriksson marc...@spotify.com Committed: Wed Aug 21 14:50:02 2013 +0200 -- .../apache/cassandra/db/compaction/LeveledCompactionStrategy.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/8f367fdf/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java -- diff --git a/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java b/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java index 292220d..65abb0a 100644 --- a/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java +++ b/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java @@ -71,7 +71,7 @@ public class LeveledCompactionStrategy extends AbstractCompactionStrategy implem cfs.getDataTracker().subscribe(this); logger.debug({} subscribed to the data tracker., this); -manifest = LeveledManifest.create(cfs, this.maxSSTableSizeInMB, Collections.SSTableReaderemptyList(), localOptions); +manifest = LeveledManifest.create(cfs, this.maxSSTableSizeInMB, cfs.getSSTables(), localOptions); logger.debug(Created {}, manifest); }
[2/3] git commit: Merge branch 'cassandra-2.0.0' into cassandra-2.0
Merge branch 'cassandra-2.0.0' into cassandra-2.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/857a7f5f Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/857a7f5f Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/857a7f5f Branch: refs/heads/trunk Commit: 857a7f5fb8246aa2d588c3ff257109b14f35be2f Parents: c4f6be8 8f367fd Author: Marcus Eriksson marc...@spotify.com Authored: Wed Aug 21 14:52:25 2013 +0200 Committer: Marcus Eriksson marc...@spotify.com Committed: Wed Aug 21 14:52:25 2013 +0200 -- .../apache/cassandra/db/compaction/LeveledCompactionStrategy.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/857a7f5f/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java --
[3/3] git commit: Merge branch 'cassandra-2.0' into trunk
Merge branch 'cassandra-2.0' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7678661b Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7678661b Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7678661b Branch: refs/heads/trunk Commit: 7678661b0937ebef8e045418ea66ff6f26269928 Parents: fe32c97 857a7f5 Author: Marcus Eriksson marc...@spotify.com Authored: Wed Aug 21 14:53:23 2013 +0200 Committer: Marcus Eriksson marc...@spotify.com Committed: Wed Aug 21 14:53:23 2013 +0200 -- .../apache/cassandra/db/compaction/LeveledCompactionStrategy.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --
[1/3] git commit: Add all sstables to the leveled manifest on startup.
Updated Branches: refs/heads/trunk fe32c9744 - 7678661b0 Add all sstables to the leveled manifest on startup. Patch by marcuse, reviewed by jbellis for CASSANDRA-5908 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/8f367fdf Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8f367fdf Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8f367fdf Branch: refs/heads/trunk Commit: 8f367fdf92c03ee4bbcb0daa2272bd5155cf4174 Parents: cd47182 Author: Marcus Eriksson marc...@spotify.com Authored: Wed Aug 21 14:50:02 2013 +0200 Committer: Marcus Eriksson marc...@spotify.com Committed: Wed Aug 21 14:50:02 2013 +0200 -- .../apache/cassandra/db/compaction/LeveledCompactionStrategy.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/8f367fdf/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java -- diff --git a/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java b/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java index 292220d..65abb0a 100644 --- a/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java +++ b/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java @@ -71,7 +71,7 @@ public class LeveledCompactionStrategy extends AbstractCompactionStrategy implem cfs.getDataTracker().subscribe(this); logger.debug({} subscribed to the data tracker., this); -manifest = LeveledManifest.create(cfs, this.maxSSTableSizeInMB, Collections.SSTableReaderemptyList(), localOptions); +manifest = LeveledManifest.create(cfs, this.maxSSTableSizeInMB, cfs.getSSTables(), localOptions); logger.debug(Created {}, manifest); }
[jira] [Created] (CASSANDRA-5909) CommitLogReplayer date time issue
Artur Kronenberg created CASSANDRA-5909: --- Summary: CommitLogReplayer date time issue Key: CASSANDRA-5909 URL: https://issues.apache.org/jira/browse/CASSANDRA-5909 Project: Cassandra Issue Type: Bug Components: Core Reporter: Artur Kronenberg Hi, First off I am sorry if the component is not right for this. I am trying to get the point-in-time backup to work. And I ran into the following issues: 1. The documentation in the commitlog_archiving.properties seems to be out of date, as the example date format is no more valid and can't be parsed. 2. The restore_point_in_time property seems to differ from the actual maxTimeStamp. I added additional logging to the codebase in the class CommitLogReplayer like that: protected boolean pointInTimeExceeded(RowMutation frm) { long restoreTarget = CommitLog.instance.archiver.restorePointInTime; logger.info(String.valueOf(restoreTarget)); for (ColumnFamily families : frm.getColumnFamilies()) { logger.info(String.valueOf(families.maxTimestamp())); if (families.maxTimestamp() restoreTarget) return true; } return false; } The following output can be seen: The restoreTarget timestamp is: 1377015783000 This has been correctly parsed as I added this date to the properties: 2013:08:20 17:23:03 the value for families.maxTimestamp() is: 1377009021033000 This date corresponds to: Mon 45605-09-05 10:50:33 BST (44 millennia from now) It seems like the timestamp has 3 additional zeros. This also means that the code can never return false on the call, as the restoreTarget will always be smaller then the maxTimestamp(). Therefore the Replayer can never replay any of my commitlog files. The timestamp minus the 3 zeros corresponds to Tue 2013-08-20 15:30:21 BST (23 hours ago) which makes more sense and would allow for the replay to work. My config: Cassandra-1.2.4 Java 1.6 Ubuntu 12.04 64bit If you need any more information let me know and I'll be happy to suply whatever info I can. -- artur -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (CASSANDRA-5910) Most CQL3 functions should handle null gracefully
Sylvain Lebresne created CASSANDRA-5910: --- Summary: Most CQL3 functions should handle null gracefully Key: CASSANDRA-5910 URL: https://issues.apache.org/jira/browse/CASSANDRA-5910 Project: Cassandra Issue Type: Bug Reporter: Sylvain Lebresne Assignee: Sylvain Lebresne Priority: Minor Fix For: 1.2.9 Currently, we don't allow null parameters for functions. So {noformat} UPDATE test SET d=dateOf(null) WHERE k=0 {noformat} is basically an invalid query. Unfortunately, there's at least one case where we don't validate correctly, namely if we do: {noformat} SELECT k, dateOf(t) FROM test {noformat} In that case, if for any of the row {{t}} is null, we end up with a server side NPE. But more importantly, throwing an InvalidException in that case would be pretty inconvenient and actually somewhat wrong since the query is not invalid in itself. So, at least in that latter case, we want {{dateOf(t) == null}} when {{t == null}}. And if we do that, I suggest making it always the case (i.e. make the first query valid but assigning {{null}} to {{d}}). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-5910) Most CQL3 functions should handle null gracefully
[ https://issues.apache.org/jira/browse/CASSANDRA-5910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sylvain Lebresne updated CASSANDRA-5910: Attachment: 5910.txt Most CQL3 functions should handle null gracefully - Key: CASSANDRA-5910 URL: https://issues.apache.org/jira/browse/CASSANDRA-5910 Project: Cassandra Issue Type: Bug Reporter: Sylvain Lebresne Assignee: Sylvain Lebresne Priority: Minor Fix For: 1.2.9 Attachments: 5910.txt Currently, we don't allow null parameters for functions. So {noformat} UPDATE test SET d=dateOf(null) WHERE k=0 {noformat} is basically an invalid query. Unfortunately, there's at least one case where we don't validate correctly, namely if we do: {noformat} SELECT k, dateOf(t) FROM test {noformat} In that case, if for any of the row {{t}} is null, we end up with a server side NPE. But more importantly, throwing an InvalidException in that case would be pretty inconvenient and actually somewhat wrong since the query is not invalid in itself. So, at least in that latter case, we want {{dateOf(t) == null}} when {{t == null}}. And if we do that, I suggest making it always the case (i.e. make the first query valid but assigning {{null}} to {{d}}). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5910) Most CQL3 functions should handle null gracefully
[ https://issues.apache.org/jira/browse/CASSANDRA-5910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13746044#comment-13746044 ] Jonathan Ellis commented on CASSANDRA-5910: --- I don't think turning RTE into IRE is correct -- if it passes validation, it should execute, and if it doesn't, it's a bug and not an invalid request. Where does this leave varcharasblob? (Wish we'd gone with textasblob, FTR.) Most CQL3 functions should handle null gracefully - Key: CASSANDRA-5910 URL: https://issues.apache.org/jira/browse/CASSANDRA-5910 Project: Cassandra Issue Type: Bug Reporter: Sylvain Lebresne Assignee: Sylvain Lebresne Priority: Minor Fix For: 1.2.9 Attachments: 5910.txt Currently, we don't allow null parameters for functions. So {noformat} UPDATE test SET d=dateOf(null) WHERE k=0 {noformat} is basically an invalid query. Unfortunately, there's at least one case where we don't validate correctly, namely if we do: {noformat} SELECT k, dateOf(t) FROM test {noformat} In that case, if for any of the row {{t}} is null, we end up with a server side NPE. But more importantly, throwing an InvalidException in that case would be pretty inconvenient and actually somewhat wrong since the query is not invalid in itself. So, at least in that latter case, we want {{dateOf(t) == null}} when {{t == null}}. And if we do that, I suggest making it always the case (i.e. make the first query valid but assigning {{null}} to {{d}}). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5882) Changing column type from int to bigint or vice versa causes decoding errors.
[ https://issues.apache.org/jira/browse/CASSANDRA-5882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13746070#comment-13746070 ] Sylvain Lebresne commented on CASSANDRA-5882: - The reason is that we currently don't validate anything when a non-PK column type is altered, which is probably a mistake (at least imo). There's an historical reason for that: thrift doesn't validate such change either. So in a way, that's not a new thing: if you change a validator for an incompatible one (which is the case here, int (Int32Type) is not able to decode most value of bigint (IntegerType)), you'll likely break your client code (which is the case btw, it's a cqlsh error here, not a server side one). So I would personally be in favor of just refusing that kind of change pure and simple. Attaching a simple patch to do that (for CQL3 only since Thou Shalt Not Modify Thrift). Changing column type from int to bigint or vice versa causes decoding errors. - Key: CASSANDRA-5882 URL: https://issues.apache.org/jira/browse/CASSANDRA-5882 Project: Cassandra Issue Type: Bug Components: Core Reporter: J.B. Langston Attachments: 5882.txt cqlsh:dbsite create table testint (id uuid, bestof bigint, primary key (id) ); cqlsh:dbsite insert into testint (id, bestof ) values (49d30f84-a409-4433-ad60-eb9c1a06b7bb, 1376399966); cqlsh:dbsite insert into testint (id, bestof ) values (6cab4798-ad29-4419-bd59-308f9ec3bc44, 1376389800); cqlsh:dbsite insert into testint (id, bestof ) values (685bb9ff-a4fe-4e47-95eb-f6a353d9e179, 1376390400); cqlsh:dbsite insert into testint (id, bestof ) values (a848f832-5ded-4ef7-bf4b-7db561564c57, 1376391000); cqlsh:dbsite select * from testint ; id | bestof --+ a848f832-5ded-4ef7-bf4b-7db561564c57 | 1376391000 49d30f84-a409-4433-ad60-eb9c1a06b7bb | 1376399966 6cab4798-ad29-4419-bd59-308f9ec3bc44 | 1376389800 685bb9ff-a4fe-4e47-95eb-f6a353d9e179 | 1376390400 cqlsh:dbsite alter table testint alter bestof TYPE int; cqlsh:dbsite select * from testint ; id | bestof --+- a848f832-5ded-4ef7-bf4b-7db561564c57 | '\x00\x00\x00\x00R\n\x0fX' 49d30f84-a409-4433-ad60-eb9c1a06b7bb | '\x00\x00\x00\x00R\n2^' 6cab4798-ad29-4419-bd59-308f9ec3bc44 | '\x00\x00\x00\x00R\n\n\xa8' 685bb9ff-a4fe-4e47-95eb-f6a353d9e179 | '\x00\x00\x00\x00R\n\r\x00' Failed to decode value '\x00\x00\x00\x00R\n\x0fX' (for column 'bestof') as int: unpack requires a string argument of length 4 Failed to decode value '\x00\x00\x00\x00R\n2^' (for column 'bestof') as int: unpack requires a string argument of length 4 2 more decoding errors suppressed. I realize that going from BIGINT to INT would cause overflow if a column contained a number larger than 2^31-1, it is at least technically possible to go in the other direction. I also understand that rewriting all the data in the correct format would be a very expensive operation on a large column family, but if that's not something we want to allow we should explicitly disallow changing data types if the table has any rows. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-5882) Changing column type from int to bigint or vice versa causes decoding errors.
[ https://issues.apache.org/jira/browse/CASSANDRA-5882?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sylvain Lebresne updated CASSANDRA-5882: Attachment: 5882.txt Changing column type from int to bigint or vice versa causes decoding errors. - Key: CASSANDRA-5882 URL: https://issues.apache.org/jira/browse/CASSANDRA-5882 Project: Cassandra Issue Type: Bug Components: Core Reporter: J.B. Langston Attachments: 5882.txt cqlsh:dbsite create table testint (id uuid, bestof bigint, primary key (id) ); cqlsh:dbsite insert into testint (id, bestof ) values (49d30f84-a409-4433-ad60-eb9c1a06b7bb, 1376399966); cqlsh:dbsite insert into testint (id, bestof ) values (6cab4798-ad29-4419-bd59-308f9ec3bc44, 1376389800); cqlsh:dbsite insert into testint (id, bestof ) values (685bb9ff-a4fe-4e47-95eb-f6a353d9e179, 1376390400); cqlsh:dbsite insert into testint (id, bestof ) values (a848f832-5ded-4ef7-bf4b-7db561564c57, 1376391000); cqlsh:dbsite select * from testint ; id | bestof --+ a848f832-5ded-4ef7-bf4b-7db561564c57 | 1376391000 49d30f84-a409-4433-ad60-eb9c1a06b7bb | 1376399966 6cab4798-ad29-4419-bd59-308f9ec3bc44 | 1376389800 685bb9ff-a4fe-4e47-95eb-f6a353d9e179 | 1376390400 cqlsh:dbsite alter table testint alter bestof TYPE int; cqlsh:dbsite select * from testint ; id | bestof --+- a848f832-5ded-4ef7-bf4b-7db561564c57 | '\x00\x00\x00\x00R\n\x0fX' 49d30f84-a409-4433-ad60-eb9c1a06b7bb | '\x00\x00\x00\x00R\n2^' 6cab4798-ad29-4419-bd59-308f9ec3bc44 | '\x00\x00\x00\x00R\n\n\xa8' 685bb9ff-a4fe-4e47-95eb-f6a353d9e179 | '\x00\x00\x00\x00R\n\r\x00' Failed to decode value '\x00\x00\x00\x00R\n\x0fX' (for column 'bestof') as int: unpack requires a string argument of length 4 Failed to decode value '\x00\x00\x00\x00R\n2^' (for column 'bestof') as int: unpack requires a string argument of length 4 2 more decoding errors suppressed. I realize that going from BIGINT to INT would cause overflow if a column contained a number larger than 2^31-1, it is at least technically possible to go in the other direction. I also understand that rewriting all the data in the correct format would be a very expensive operation on a large column family, but if that's not something we want to allow we should explicitly disallow changing data types if the table has any rows. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5882) Changing column type from int to bigint or vice versa causes decoding errors.
[ https://issues.apache.org/jira/browse/CASSANDRA-5882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13746074#comment-13746074 ] Carl Yeksigian commented on CASSANDRA-5882: --- a couple of misspelled comments: s/let is fly/let it fly/; s/changet/change/ Changing column type from int to bigint or vice versa causes decoding errors. - Key: CASSANDRA-5882 URL: https://issues.apache.org/jira/browse/CASSANDRA-5882 Project: Cassandra Issue Type: Bug Components: Core Reporter: J.B. Langston Assignee: Sylvain Lebresne Fix For: 1.2.9 Attachments: 5882.txt cqlsh:dbsite create table testint (id uuid, bestof bigint, primary key (id) ); cqlsh:dbsite insert into testint (id, bestof ) values (49d30f84-a409-4433-ad60-eb9c1a06b7bb, 1376399966); cqlsh:dbsite insert into testint (id, bestof ) values (6cab4798-ad29-4419-bd59-308f9ec3bc44, 1376389800); cqlsh:dbsite insert into testint (id, bestof ) values (685bb9ff-a4fe-4e47-95eb-f6a353d9e179, 1376390400); cqlsh:dbsite insert into testint (id, bestof ) values (a848f832-5ded-4ef7-bf4b-7db561564c57, 1376391000); cqlsh:dbsite select * from testint ; id | bestof --+ a848f832-5ded-4ef7-bf4b-7db561564c57 | 1376391000 49d30f84-a409-4433-ad60-eb9c1a06b7bb | 1376399966 6cab4798-ad29-4419-bd59-308f9ec3bc44 | 1376389800 685bb9ff-a4fe-4e47-95eb-f6a353d9e179 | 1376390400 cqlsh:dbsite alter table testint alter bestof TYPE int; cqlsh:dbsite select * from testint ; id | bestof --+- a848f832-5ded-4ef7-bf4b-7db561564c57 | '\x00\x00\x00\x00R\n\x0fX' 49d30f84-a409-4433-ad60-eb9c1a06b7bb | '\x00\x00\x00\x00R\n2^' 6cab4798-ad29-4419-bd59-308f9ec3bc44 | '\x00\x00\x00\x00R\n\n\xa8' 685bb9ff-a4fe-4e47-95eb-f6a353d9e179 | '\x00\x00\x00\x00R\n\r\x00' Failed to decode value '\x00\x00\x00\x00R\n\x0fX' (for column 'bestof') as int: unpack requires a string argument of length 4 Failed to decode value '\x00\x00\x00\x00R\n2^' (for column 'bestof') as int: unpack requires a string argument of length 4 2 more decoding errors suppressed. I realize that going from BIGINT to INT would cause overflow if a column contained a number larger than 2^31-1, it is at least technically possible to go in the other direction. I also understand that rewriting all the data in the correct format would be a very expensive operation on a large column family, but if that's not something we want to allow we should explicitly disallow changing data types if the table has any rows. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5910) Most CQL3 functions should handle null gracefully
[ https://issues.apache.org/jira/browse/CASSANDRA-5910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13746085#comment-13746085 ] Sylvain Lebresne commented on CASSANDRA-5910: - bq. I don't think turning RTE into IRE is correct I don't really disagree and those catch all could probably be removed. The motivation was that if the execution of a function triggers an unexpected exception, then we send it back to the user instead of crashing server side, but as long as we don't have user custom function, an unexpected exception in a function is a bug so it's probably fine to throw server side. And I agree IRE is a bad exception anyway, we just don't have anything better so far. But the bigger problem is that we have functions (in the selection of a SELECT) that take their input at execution time. So I don't fully agree with if it passes validation, it should execute, and if it doesn't, it's a bug as that would mean we limit ourselves to functions that can never error out but that's going to be pretty limiting. We already have the token() method for which it's very unclear how to deal with null. We could return null on a null parameter, but if we have a composite partition key (in which case token() is a multi-parameter function), what to do when only one argument is null and not the other? Of course we could still return null in that case, but it feels wrong to silent what is essentially an error. Or to take another example, what do we do about division by 0 if we add a division function tomorrow? My hunch is that we need a new ExecutionException, though unfortunately it's not that easy to add new exceptions (rather, there is backward compatibility concerns). To be clear, we can probably find a simple hack for now, making token() return null as soon as any of its parameter is null is, while not perfect, probably good enough for now. But it's probably worth having a longer term plan. bq. Where does this leave varcharasblob? varcharasblob (and all the asBlob functions for that matter) execute method just return it's argument without any processing (it's really just a way to make the CQL type system happy, since internally everything is already bytes anyway), so if said argument is null, it will return null. bq. Wish we'd gone with textasblob We have it too, we have both. We have one XasBlob and one blobAsX for every CQL3 type. The only reason varchar is a special case in ByteConversionFcts is that the makeToBlobFunction method wouldn't generate it. Most CQL3 functions should handle null gracefully - Key: CASSANDRA-5910 URL: https://issues.apache.org/jira/browse/CASSANDRA-5910 Project: Cassandra Issue Type: Bug Reporter: Sylvain Lebresne Assignee: Sylvain Lebresne Priority: Minor Fix For: 1.2.9 Attachments: 5910.txt Currently, we don't allow null parameters for functions. So {noformat} UPDATE test SET d=dateOf(null) WHERE k=0 {noformat} is basically an invalid query. Unfortunately, there's at least one case where we don't validate correctly, namely if we do: {noformat} SELECT k, dateOf(t) FROM test {noformat} In that case, if for any of the row {{t}} is null, we end up with a server side NPE. But more importantly, throwing an InvalidException in that case would be pretty inconvenient and actually somewhat wrong since the query is not invalid in itself. So, at least in that latter case, we want {{dateOf(t) == null}} when {{t == null}}. And if we do that, I suggest making it always the case (i.e. make the first query valid but assigning {{null}} to {{d}}). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5893) CqlParser throws StackOverflowError on bigger batch operation
[ https://issues.apache.org/jira/browse/CASSANDRA-5893?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13746116#comment-13746116 ] Sylvain Lebresne commented on CASSANDRA-5893: - +1 CqlParser throws StackOverflowError on bigger batch operation - Key: CASSANDRA-5893 URL: https://issues.apache.org/jira/browse/CASSANDRA-5893 Project: Cassandra Issue Type: Bug Components: Core Reporter: Vincent Mallet Assignee: Aleksey Yeschenko Fix For: 1.2.9 Attachments: 5893.txt We are seeing a problem with CQL3/Cassandra 1.2.8 where a large batch operation causes the CqlParser to throw a StackOverflowError (-Xss180k initially, then -Xss325k). Shouldn't a batch be processed iteratively to avoid having to bump stack sizes to unreasonably large values? Here is more info from the original problem description: It looks like the CqlParser in 1.2.8 (probably 1.2.x, but i didn't look) is implemented recursively in such a way that large batch statements blow up the stack. We, of course on a Friday night, have a particular piece of code that's hitting a degenerate case that creates a batch of inserts with a VERY large number of collection items, and it manifests as a StackOverflow coming out the cass servers: java.lang.StackOverflowError at org.apache.cassandra.cql3.CqlParser.value(CqlParser.java:5266) at org.apache.cassandra.cql3.CqlParser.term(CqlParser.java:5627) at org.apache.cassandra.cql3.CqlParser.set_tail(CqlParser.java:4807) at org.apache.cassandra.cql3.CqlParser.set_tail(CqlParser.java:4813) at org.apache.cassandra.cql3.CqlParser.set_tail(CqlParser.java:4813) at org.apache.cassandra.cql3.CqlParser.set_tail(CqlParser.java:4813) at org.apache.cassandra.cql3.CqlParser.set_tail(CqlParser.java:4813) at org.apache.cassandra.cql3.CqlParser.set_tail(CqlParser.java:4813) at org.apache.cassandra.cql3.CqlParser.set_tail(CqlParser.java:4813) ... I think in the short term I can give up the atomicity of a batch in this code and kind of suck it up, but obviously I'd prefer not to. I'm also not sure if I kept a single batch, but split this into smaller pieces in each statement, whether that would still fail. I'm guessing I could also crank the hell out of the stack size on the servers, but that feels pretty dirty. It seems like the CqlParser should probably be implemented in a way that isn't quite so vulnerable to this, though I fully accept that this batch is koo-koo-bananas. Thanks! -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Comment Edited] (CASSANDRA-5903) Integer overflow in OffHeapBitSet when bloomfilter 2GB
[ https://issues.apache.org/jira/browse/CASSANDRA-5903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13746118#comment-13746118 ] Taylan Develioglu edited comment on CASSANDRA-5903 at 8/21/13 3:08 PM: --- Sadly that wasn't sufficient, there's another overflow in OffHeapBitSet.deserialize: ERROR [SSTableBatchOpen:6] 2013-08-21 15:29:51,799 CassandraDaemon.java (line 192) Exception in thread Thread[SSTableBatchOpen:6,5,main] java.lang.IllegalArgumentException at org.apache.cassandra.io.util.Memory.allocate(Memory.java:58) at org.apache.cassandra.utils.obs.OffHeapBitSet.deserialize(OffHeapBitSet.java:123) at org.apache.cassandra.utils.BloomFilterSerializer.deserialize(BloomFilterSerializer.java:46) at org.apache.cassandra.utils.Murmur2BloomFilter$Murmur2BloomFilterSerializer.deserialize(Murmur2BloomFilter.java:40) at org.apache.cassandra.utils.FilterFactory.deserialize(FilterFactory.java:71) at org.apache.cassandra.io.sstable.SSTableReader.loadBloomFilter(SSTableReader.java:365) at org.apache.cassandra.io.sstable.SSTableReader.open(SSTableReader.java:195) at org.apache.cassandra.io.sstable.SSTableReader.open(SSTableReader.java:153) at org.apache.cassandra.io.sstable.SSTableReader$1.run(SSTableReader.java:258) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) {code} public static OffHeapBitSet deserialize(DataInput dis) throws IOException { int byteCount = dis.readInt() * 8; Memory memory = RefCountedMemory.allocate(byteCount); for (int i = 0; i byteCount;) { long v = dis.readLong(); memory.setByte(i++, (byte) (v 0)); memory.setByte(i++, (byte) (v 8)); memory.setByte(i++, (byte) (v 16)); memory.setByte(i++, (byte) (v 24)); memory.setByte(i++, (byte) (v 32)); memory.setByte(i++, (byte) (v 40)); memory.setByte(i++, (byte) (v 48)); memory.setByte(i++, (byte) (v 56)); } return new OffHeapBitSet(memory); } {code} was (Author: tdevelioglu): Sadly that wasn't sufficient, there's another overflow in OffHeapBitSet.deserialize: {code} public static OffHeapBitSet deserialize(DataInput dis) throws IOException { int byteCount = dis.readInt() * 8; Memory memory = RefCountedMemory.allocate(byteCount); for (int i = 0; i byteCount;) { long v = dis.readLong(); memory.setByte(i++, (byte) (v 0)); memory.setByte(i++, (byte) (v 8)); memory.setByte(i++, (byte) (v 16)); memory.setByte(i++, (byte) (v 24)); memory.setByte(i++, (byte) (v 32)); memory.setByte(i++, (byte) (v 40)); memory.setByte(i++, (byte) (v 48)); memory.setByte(i++, (byte) (v 56)); } return new OffHeapBitSet(memory); } {code} Integer overflow in OffHeapBitSet when bloomfilter 2GB Key: CASSANDRA-5903 URL: https://issues.apache.org/jira/browse/CASSANDRA-5903 Project: Cassandra Issue Type: Bug Components: Core Reporter: Taylan Develioglu Assignee: Vijay Fix For: 1.2.9 Attachments: 0001-CASSANDRA-5903.patch In org.apache.cassandra.utils.obs.OffHeapBitSet. byteCount overflows and causes an IllegalArgument exception in Memory.allocate when bloomfilter is 2GB. Suggest changing byteCount to long. {code:title=OffHeapBitSet.java} public OffHeapBitSet(long numBits) { // OpenBitSet.bits2words calculation is there for backward compatibility. int byteCount = OpenBitSet.bits2words(numBits) * 8; bytes = RefCountedMemory.allocate(byteCount); // flush/clear the existing memory. clear(); } {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (CASSANDRA-5911) Commit logs are not removed after nodetool flush or nodetool drain
J.B. Langston created CASSANDRA-5911: Summary: Commit logs are not removed after nodetool flush or nodetool drain Key: CASSANDRA-5911 URL: https://issues.apache.org/jira/browse/CASSANDRA-5911 Project: Cassandra Issue Type: Bug Components: Core Reporter: J.B. Langston Priority: Minor Commit logs are not removed after nodetool flush or nodetool drain. This can lead to unnecessary commit log replay during startup. I've reproduced this on Apache Cassandra 1.2.8. Usually this isn't much of an issue but on a Solr-indexed column family in DSE, each replayed mutation has to be reindexed which can make startup take a long time (on the order of 20-30 min). Reproduction follows: {code} jblangston:bin jblangston$ ./cassandra /dev/null jblangston:bin jblangston$ ../tools/bin/cassandra-stress -n 2000 /dev/null jblangston:bin jblangston$ du -h ../commitlog 576M../commitlog jblangston:bin jblangston$ nodetool flush jblangston:bin jblangston$ du -h ../commitlog 576M../commitlog jblangston:bin jblangston$ nodetool drain jblangston:bin jblangston$ du -h ../commitlog 576M../commitlog jblangston:bin jblangston$ pkill java jblangston:bin jblangston$ du -h ../commitlog 576M../commitlog jblangston:bin jblangston$ ./cassandra -f | grep Replaying INFO 10:03:42,915 Replaying /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566761.log, /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566762.log, /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566763.log, /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566764.log, /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566765.log, /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566766.log, /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566767.log, /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566768.log, /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566769.log, /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566770.log, /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566771.log, /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566772.log, /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566773.log, /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566774.log, /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566775.log, /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566776.log, /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566777.log, /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566778.log INFO 10:03:42,922 Replaying /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566761.log INFO 10:03:43,907 Replaying /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566762.log INFO 10:03:43,907 Replaying /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566763.log INFO 10:03:43,907 Replaying /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566764.log INFO 10:03:43,908 Replaying /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566765.log INFO 10:03:43,908 Replaying /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566766.log INFO 10:03:43,908 Replaying /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566767.log INFO 10:03:43,909 Replaying /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566768.log INFO 10:03:43,909 Replaying /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566769.log INFO 10:03:43,909 Replaying /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566770.log INFO 10:03:43,910 Replaying /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566771.log INFO 10:03:43,910 Replaying /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566772.log INFO 10:03:43,911 Replaying /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566773.log INFO 10:03:43,911 Replaying /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566774.log INFO 10:03:43,911 Replaying /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566775.log INFO 10:03:43,912 Replaying /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566776.log INFO 10:03:43,912 Replaying /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566777.log INFO 10:03:43,912 Replaying /opt/apache-cassandra-1.2.8/commitlog/CommitLog-2-1377096566778.log {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Reopened] (CASSANDRA-5903) Integer overflow in OffHeapBitSet when bloomfilter 2GB
[ https://issues.apache.org/jira/browse/CASSANDRA-5903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Taylan Develioglu reopened CASSANDRA-5903: -- Sadly that wasn't sufficient, there's another overflow in OffHeapBitSet.deserialize: {code} public static OffHeapBitSet deserialize(DataInput dis) throws IOException { int byteCount = dis.readInt() * 8; Memory memory = RefCountedMemory.allocate(byteCount); for (int i = 0; i byteCount;) { long v = dis.readLong(); memory.setByte(i++, (byte) (v 0)); memory.setByte(i++, (byte) (v 8)); memory.setByte(i++, (byte) (v 16)); memory.setByte(i++, (byte) (v 24)); memory.setByte(i++, (byte) (v 32)); memory.setByte(i++, (byte) (v 40)); memory.setByte(i++, (byte) (v 48)); memory.setByte(i++, (byte) (v 56)); } return new OffHeapBitSet(memory); } {code} Integer overflow in OffHeapBitSet when bloomfilter 2GB Key: CASSANDRA-5903 URL: https://issues.apache.org/jira/browse/CASSANDRA-5903 Project: Cassandra Issue Type: Bug Components: Core Reporter: Taylan Develioglu Assignee: Vijay Fix For: 1.2.9 Attachments: 0001-CASSANDRA-5903.patch In org.apache.cassandra.utils.obs.OffHeapBitSet. byteCount overflows and causes an IllegalArgument exception in Memory.allocate when bloomfilter is 2GB. Suggest changing byteCount to long. {code:title=OffHeapBitSet.java} public OffHeapBitSet(long numBits) { // OpenBitSet.bits2words calculation is there for backward compatibility. int byteCount = OpenBitSet.bits2words(numBits) * 8; bytes = RefCountedMemory.allocate(byteCount); // flush/clear the existing memory. clear(); } {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Comment Edited] (CASSANDRA-5903) Integer overflow in OffHeapBitSet when bloomfilter 2GB
[ https://issues.apache.org/jira/browse/CASSANDRA-5903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13746118#comment-13746118 ] Taylan Develioglu edited comment on CASSANDRA-5903 at 8/21/13 3:09 PM: --- Sadly that wasn't sufficient, there's another overflow in OffHeapBitSet.deserialize: {code} public static OffHeapBitSet deserialize(DataInput dis) throws IOException { int byteCount = dis.readInt() * 8; Memory memory = RefCountedMemory.allocate(byteCount); for (int i = 0; i byteCount;) { long v = dis.readLong(); memory.setByte(i++, (byte) (v 0)); memory.setByte(i++, (byte) (v 8)); memory.setByte(i++, (byte) (v 16)); memory.setByte(i++, (byte) (v 24)); memory.setByte(i++, (byte) (v 32)); memory.setByte(i++, (byte) (v 40)); memory.setByte(i++, (byte) (v 48)); memory.setByte(i++, (byte) (v 56)); } return new OffHeapBitSet(memory); } {code} was (Author: tdevelioglu): Sadly that wasn't sufficient, there's another overflow in OffHeapBitSet.deserialize: ERROR [SSTableBatchOpen:6] 2013-08-21 15:29:51,799 CassandraDaemon.java (line 192) Exception in thread Thread[SSTableBatchOpen:6,5,main] java.lang.IllegalArgumentException at org.apache.cassandra.io.util.Memory.allocate(Memory.java:58) at org.apache.cassandra.utils.obs.OffHeapBitSet.deserialize(OffHeapBitSet.java:123) at org.apache.cassandra.utils.BloomFilterSerializer.deserialize(BloomFilterSerializer.java:46) at org.apache.cassandra.utils.Murmur2BloomFilter$Murmur2BloomFilterSerializer.deserialize(Murmur2BloomFilter.java:40) at org.apache.cassandra.utils.FilterFactory.deserialize(FilterFactory.java:71) at org.apache.cassandra.io.sstable.SSTableReader.loadBloomFilter(SSTableReader.java:365) at org.apache.cassandra.io.sstable.SSTableReader.open(SSTableReader.java:195) at org.apache.cassandra.io.sstable.SSTableReader.open(SSTableReader.java:153) at org.apache.cassandra.io.sstable.SSTableReader$1.run(SSTableReader.java:258) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) {code} public static OffHeapBitSet deserialize(DataInput dis) throws IOException { int byteCount = dis.readInt() * 8; Memory memory = RefCountedMemory.allocate(byteCount); for (int i = 0; i byteCount;) { long v = dis.readLong(); memory.setByte(i++, (byte) (v 0)); memory.setByte(i++, (byte) (v 8)); memory.setByte(i++, (byte) (v 16)); memory.setByte(i++, (byte) (v 24)); memory.setByte(i++, (byte) (v 32)); memory.setByte(i++, (byte) (v 40)); memory.setByte(i++, (byte) (v 48)); memory.setByte(i++, (byte) (v 56)); } return new OffHeapBitSet(memory); } {code} Integer overflow in OffHeapBitSet when bloomfilter 2GB Key: CASSANDRA-5903 URL: https://issues.apache.org/jira/browse/CASSANDRA-5903 Project: Cassandra Issue Type: Bug Components: Core Reporter: Taylan Develioglu Assignee: Vijay Fix For: 1.2.9 Attachments: 0001-CASSANDRA-5903.patch In org.apache.cassandra.utils.obs.OffHeapBitSet. byteCount overflows and causes an IllegalArgument exception in Memory.allocate when bloomfilter is 2GB. Suggest changing byteCount to long. {code:title=OffHeapBitSet.java} public OffHeapBitSet(long numBits) { // OpenBitSet.bits2words calculation is there for backward compatibility. int byteCount = OpenBitSet.bits2words(numBits) * 8; bytes = RefCountedMemory.allocate(byteCount); // flush/clear the existing memory. clear(); } {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5903) Integer overflow in OffHeapBitSet when bloomfilter 2GB
[ https://issues.apache.org/jira/browse/CASSANDRA-5903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13746120#comment-13746120 ] Taylan Develioglu commented on CASSANDRA-5903: -- ERROR [SSTableBatchOpen:6] 2013-08-21 15:29:51,799 CassandraDaemon.java (line 192) Exception in thread Thread[SSTableBatchOpen:6,5,main] java.lang.IllegalArgumentException at org.apache.cassandra.io.util.Memory.allocate(Memory.java:58) at org.apache.cassandra.utils.obs.OffHeapBitSet.deserialize(OffHeapBitSet.java:123) at org.apache.cassandra.utils.BloomFilterSerializer.deserialize(BloomFilterSerializer.java:46) at org.apache.cassandra.utils.Murmur2BloomFilter$Murmur2BloomFilterSerializer.deserialize(Murmur2BloomFilter.java:40) at org.apache.cassandra.utils.FilterFactory.deserialize(FilterFactory.java:71) at org.apache.cassandra.io.sstable.SSTableReader.loadBloomFilter(SSTableReader.java:365) at org.apache.cassandra.io.sstable.SSTableReader.open(SSTableReader.java:195) at org.apache.cassandra.io.sstable.SSTableReader.open(SSTableReader.java:153) at org.apache.cassandra.io.sstable.SSTableReader$1.run(SSTableReader.java:258) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) Integer overflow in OffHeapBitSet when bloomfilter 2GB Key: CASSANDRA-5903 URL: https://issues.apache.org/jira/browse/CASSANDRA-5903 Project: Cassandra Issue Type: Bug Components: Core Reporter: Taylan Develioglu Assignee: Vijay Fix For: 1.2.9 Attachments: 0001-CASSANDRA-5903.patch In org.apache.cassandra.utils.obs.OffHeapBitSet. byteCount overflows and causes an IllegalArgument exception in Memory.allocate when bloomfilter is 2GB. Suggest changing byteCount to long. {code:title=OffHeapBitSet.java} public OffHeapBitSet(long numBits) { // OpenBitSet.bits2words calculation is there for backward compatibility. int byteCount = OpenBitSet.bits2words(numBits) * 8; bytes = RefCountedMemory.allocate(byteCount); // flush/clear the existing memory. clear(); } {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (CASSANDRA-5912) Optimize listing partition keys
Sylvain Lebresne created CASSANDRA-5912: --- Summary: Optimize listing partition keys Key: CASSANDRA-5912 URL: https://issues.apache.org/jira/browse/CASSANDRA-5912 Project: Cassandra Issue Type: Improvement Reporter: Sylvain Lebresne Priority: Minor That's a small followup to optimize the DISTINCT support added by CASSANDRA-4536 if we feel like it's worth it. Quoting the initial ticket: it should be possible to optimize that further if we consider it worth it by adding a 1 bit per key info in the sstable index saying 'is there at least one live column for that key in that sstable' (we could even add that bit-per-key without augmenting the on-disk index size if we want to by using the first bit of the key position (since we use it as a signed long and thus the first bit is unused)). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4536) Ability for CQL3 to list partition keys
[ https://issues.apache.org/jira/browse/CASSANDRA-4536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13746123#comment-13746123 ] Sylvain Lebresne commented on CASSANDRA-4536: - lgtm, +1 (I've created CASSANDRA-5912 as a follow up if we want to get fancy and optimize that further. Probably not a priority though). Ability for CQL3 to list partition keys --- Key: CASSANDRA-4536 URL: https://issues.apache.org/jira/browse/CASSANDRA-4536 Project: Cassandra Issue Type: New Feature Components: API Affects Versions: 1.1.0 Reporter: Jonathan Ellis Assignee: Aleksey Yeschenko Priority: Minor Labels: cql3 Fix For: 2.0.1 Attachments: 4536.txt, cassandra-4536_1.1.0.patch, cassandra-4536_1.2.2.patch, cassandra-4536_1.2.5.patch It can be useful to know the set of in-use partition keys (storage engine row keys). One example given to me was where application data was modeled as a few 10s of 1000s of wide rows, where the app required presenting these rows to the user sorted based on information in the partition key. The partition count is small enough to do the sort client-side in memory, which is what the app did with the Thrift API--a range slice with an empty columns list. This was a problem when migrating to CQL3. {{SELECT mykey FROM mytable}} includes all the logical rows, which makes the resultset too large to make this a reasonable approach, even with paging. One way to add support would be to allow DISTINCT in the special case of {{SELECT DISTINCT mykey FROM mytable}}. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Comment Edited] (CASSANDRA-5078) save compaction merge counts in a system table
[ https://issues.apache.org/jira/browse/CASSANDRA-5078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13745895#comment-13745895 ] lantao yan edited comment on CASSANDRA-5078 at 8/21/13 3:21 PM: i attached a new patch file between my branch and the latest trunk. this one should be working. i have tried on my local machine. It may have something to do with the compaction itself. Seems like CompactionManager is trying to compact the compaction_history as well. maybe something wrong there, keep investigating. was (Author: yanlantao): i attached a new patch file between my branch and the latest trunk. this one should be working. i have tried on my local machine. save compaction merge counts in a system table -- Key: CASSANDRA-5078 URL: https://issues.apache.org/jira/browse/CASSANDRA-5078 Project: Cassandra Issue Type: Improvement Reporter: Matthew F. Dennis Priority: Minor Labels: lhf Attachments: patch.patch we should save the compaction merge stats from CASSANDRA-4894 in the system table and probably expose them via JMX (and nodetool) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Comment Edited] (CASSANDRA-5078) save compaction merge counts in a system table
[ https://issues.apache.org/jira/browse/CASSANDRA-5078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13745895#comment-13745895 ] lantao yan edited comment on CASSANDRA-5078 at 8/21/13 3:27 PM: i attached a new patch file between my branch and the latest trunk. this one should be working. i have tried on my local machine. was (Author: yanlantao): i attached a new patch file between my branch and the latest trunk. this one should be working. i have tried on my local machine. It may have something to do with the compaction itself. Seems like CompactionManager is trying to compact the compaction_history as well. maybe something wrong there, keep investigating. save compaction merge counts in a system table -- Key: CASSANDRA-5078 URL: https://issues.apache.org/jira/browse/CASSANDRA-5078 Project: Cassandra Issue Type: Improvement Reporter: Matthew F. Dennis Priority: Minor Labels: lhf Attachments: patch.patch we should save the compaction merge stats from CASSANDRA-4894 in the system table and probably expose them via JMX (and nodetool) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
git commit: Properly handle parsing huge map and set literals
Updated Branches: refs/heads/cassandra-1.2 55fed339c - dd65e88a7 Properly handle parsing huge map and set literals patch by Aleksey Yeschenko; reviewed by Sylvain Lebresne for CASSANDRA-5893 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/dd65e88a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/dd65e88a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/dd65e88a Branch: refs/heads/cassandra-1.2 Commit: dd65e88a76c5f76b5747030742b3e4829663521f Parents: 55fed33 Author: Aleksey Yeschenko alek...@apache.org Authored: Wed Aug 21 18:37:30 2013 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Wed Aug 21 18:37:30 2013 +0300 -- CHANGES.txt | 4 +-- src/java/org/apache/cassandra/cql3/Cql.g| 37 +--- .../apache/cassandra/cql3/QueryProcessor.java | 12 +++ 3 files changed, 23 insertions(+), 30 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/dd65e88a/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 74890ea..1ffec7d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -23,11 +23,11 @@ * Don't announce schema version until we've loaded the changes locally (CASSANDRA-5904) * Add -no-snapshot option to scrub (CASSANDRA-5891) + * Fix to support off heap bloom filters size greater than 2 GB (CASSANDRA-5903) + * Properly handle parsing huge map and set literals (CASSANDRA-5893) Merged from 1.1: * Correctly validate sparse composite cells in scrub (CASSANDRA-5855) -1.2.9 - * Fix to support off heap bloom filters size greater than 2 GB (CASSANDRA-5903) 1.2.8 * Fix reading DeletionTime from 1.1-format sstables (CASSANDRA-5814) http://git-wip-us.apache.org/repos/asf/cassandra/blob/dd65e88a/src/java/org/apache/cassandra/cql3/Cql.g -- diff --git a/src/java/org/apache/cassandra/cql3/Cql.g b/src/java/org/apache/cassandra/cql3/Cql.g index 6b31da5..218c541 100644 --- a/src/java/org/apache/cassandra/cql3/Cql.g +++ b/src/java/org/apache/cassandra/cql3/Cql.g @@ -390,7 +390,7 @@ batchStatement returns [BatchStatement expr] : K_BEGIN ( K_UNLOGGED { type = BatchStatement.Type.UNLOGGED; } | K_COUNTER { type = BatchStatement.Type.COUNTER; } )? K_BATCH ( usingClause[attrs] )? - s1=batchStatementObjective ';'? { statements.add(s1); } ( sN=batchStatementObjective ';'? { statements.add(sN); } )* + ( s=batchStatementObjective ';'? { statements.add(s); } )+ K_APPLY K_BATCH { return new BatchStatement(type, statements, attrs); @@ -676,33 +676,28 @@ constant returns [Constants.Literal constant] | t=HEXNUMBER { $constant = Constants.Literal.hex($t.text); } ; -set_tail[ListTerm.Raw s] -: '}' -| ',' t=term { s.add(t); } set_tail[s] -; - -map_tail[ListPairTerm.Raw, Term.Raw m] -: '}' -| ',' k=term ':' v=term { m.add(Pair.create(k, v)); } map_tail[m] -; - map_literal returns [Maps.Literal map] -: '{' '}' { $map = new Maps.Literal(Collections.PairTerm.Raw, Term.RawemptyList()); } -| '{' { ListPairTerm.Raw, Term.Raw m = new ArrayListPairTerm.Raw, Term.Raw(); } - k1=term ':' v1=term { m.add(Pair.create(k1, v1)); } map_tail[m] - { $map = new Maps.Literal(m); } +: '{' { ListPairTerm.Raw, Term.Raw m = new ArrayListPairTerm.Raw, Term.Raw(); } + ( k1=term ':' v1=term { m.add(Pair.create(k1, v1)); } ( ',' kn=term ':' vn=term { m.add(Pair.create(kn, vn)); } )* )? + '}' { $map = new Maps.Literal(m); } ; set_or_map[Term.Raw t] returns [Term.Raw value] -: ':' v=term { ListPairTerm.Raw, Term.Raw m = new ArrayListPairTerm.Raw, Term.Raw(); m.add(Pair.create(t, v)); } map_tail[m] { $value = new Maps.Literal(m); } -| { ListTerm.Raw s = new ArrayListTerm.Raw(); s.add(t); } set_tail[s] { $value = new Sets.Literal(s); } +: ':' v=term { ListPairTerm.Raw, Term.Raw m = new ArrayListPairTerm.Raw, Term.Raw(); m.add(Pair.create(t, v)); } + ( ',' kn=term ':' vn=term { m.add(Pair.create(kn, vn)); } )* + { $value = new Maps.Literal(m); } +| { ListTerm.Raw s = new ArrayListTerm.Raw(); s.add(t); } + ( ',' tn=term { s.add(tn); } )* + { $value = new Sets.Literal(s); } ; -// This is a bit convoluted but that's because I haven't found a much better to have antl disambiguate between sets and maps collection_literal returns [Term.Raw value] -: '[' { ListTerm.Raw l = new ArrayListTerm.Raw(); } ( t1=term { l.add(t1); } ( ',' tn=term { l.add(tn); } )* )? ']' { $value = new Lists.Literal(l); } -| '{' t=term v=set_or_map[t] { $value = v; } -// Note that we have an
[2/3] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0.0
Merge branch 'cassandra-1.2' into cassandra-2.0.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/26d05352 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/26d05352 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/26d05352 Branch: refs/heads/cassandra-2.0.0 Commit: 26d05352e28ca2549a3c041d849f53e60703c80d Parents: 8f367fd dd65e88 Author: Aleksey Yeschenko alek...@apache.org Authored: Wed Aug 21 18:42:56 2013 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Wed Aug 21 18:42:56 2013 +0300 -- CHANGES.txt | 4 +-- src/java/org/apache/cassandra/cql3/Cql.g| 37 +--- .../apache/cassandra/cql3/QueryProcessor.java | 9 ++--- 3 files changed, 23 insertions(+), 27 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/26d05352/CHANGES.txt -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/26d05352/src/java/org/apache/cassandra/cql3/Cql.g -- diff --cc src/java/org/apache/cassandra/cql3/Cql.g index b55600b,218c541..0035c41 --- a/src/java/org/apache/cassandra/cql3/Cql.g +++ b/src/java/org/apache/cassandra/cql3/Cql.g @@@ -421,10 -390,10 +421,10 @@@ batchStatement returns [BatchStatement. : K_BEGIN ( K_UNLOGGED { type = BatchStatement.Type.UNLOGGED; } | K_COUNTER { type = BatchStatement.Type.COUNTER; } )? K_BATCH ( usingClause[attrs] )? - s1=batchStatementObjective ';'? { statements.add(s1); } ( sN=batchStatementObjective ';'? { statements.add(sN); } )* + ( s=batchStatementObjective ';'? { statements.add(s); } )+ K_APPLY K_BATCH { - return new BatchStatement(type, statements, attrs); + return new BatchStatement.Parsed(type, attrs, statements); } ; http://git-wip-us.apache.org/repos/asf/cassandra/blob/26d05352/src/java/org/apache/cassandra/cql3/QueryProcessor.java --
[3/3] git commit: Fix CHANGES.txt
Fix CHANGES.txt Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c8b220ba Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c8b220ba Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c8b220ba Branch: refs/heads/cassandra-2.0.0 Commit: c8b220ba10ff248238777ed1a627f1bc55261049 Parents: 26d0535 Author: Aleksey Yeschenko alek...@apache.org Authored: Wed Aug 21 18:46:59 2013 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Wed Aug 21 18:46:59 2013 +0300 -- CHANGES.txt | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/c8b220ba/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index b966e0c..fdee261 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,8 @@ Merged from 1.2: * Fix getBloomFilterDiskSpaceUsed for AlwaysPresentFilter (CASSANDRA-5900) * Don't announce schema version until we've loaded the changes locally (CASSANDRA-5904) + * Fix to support off heap bloom filters size greater than 2 GB (CASSANDRA-5903) + * Properly handle parsing huge map and set literals (CASSANDRA-5893) 2.0.0-rc2 @@ -45,15 +47,7 @@ Merged from 1.2: * Future-proof inter-major-version schema migrations (CASSANDRA-5845) * (Hadoop) add CqlPagingRecordReader support for ReversedType in Thrift table (CASSANDRA-5718) - * Add KeyCacheHitRate metric to CF metrics (CASSANDRA-5868) - * cqlsh: add support for multiline comments (CASSANDRA-5798) - * Handle CQL3 SELECT duplicate IN restrictions on clustering columns - (CASSANDRA-5856) - * Don't announce schema version until we've loaded the changes locally - (CASSANDRA-5904) * Add -no-snapshot option to scrub (CASSANDRA-5891) - * Fix to support off heap bloom filters size greater than 2 GB (CASSANDRA-5903) - * Properly handle parsing huge map and set literals (CASSANDRA-5893) Merged from 1.1: * Correctly validate sparse composite cells in scrub (CASSANDRA-5855)
[1/3] git commit: Properly handle parsing huge map and set literals
Updated Branches: refs/heads/cassandra-2.0.0 8f367fdf9 - c8b220ba1 Properly handle parsing huge map and set literals patch by Aleksey Yeschenko; reviewed by Sylvain Lebresne for CASSANDRA-5893 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/dd65e88a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/dd65e88a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/dd65e88a Branch: refs/heads/cassandra-2.0.0 Commit: dd65e88a76c5f76b5747030742b3e4829663521f Parents: 55fed33 Author: Aleksey Yeschenko alek...@apache.org Authored: Wed Aug 21 18:37:30 2013 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Wed Aug 21 18:37:30 2013 +0300 -- CHANGES.txt | 4 +-- src/java/org/apache/cassandra/cql3/Cql.g| 37 +--- .../apache/cassandra/cql3/QueryProcessor.java | 12 +++ 3 files changed, 23 insertions(+), 30 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/dd65e88a/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 74890ea..1ffec7d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -23,11 +23,11 @@ * Don't announce schema version until we've loaded the changes locally (CASSANDRA-5904) * Add -no-snapshot option to scrub (CASSANDRA-5891) + * Fix to support off heap bloom filters size greater than 2 GB (CASSANDRA-5903) + * Properly handle parsing huge map and set literals (CASSANDRA-5893) Merged from 1.1: * Correctly validate sparse composite cells in scrub (CASSANDRA-5855) -1.2.9 - * Fix to support off heap bloom filters size greater than 2 GB (CASSANDRA-5903) 1.2.8 * Fix reading DeletionTime from 1.1-format sstables (CASSANDRA-5814) http://git-wip-us.apache.org/repos/asf/cassandra/blob/dd65e88a/src/java/org/apache/cassandra/cql3/Cql.g -- diff --git a/src/java/org/apache/cassandra/cql3/Cql.g b/src/java/org/apache/cassandra/cql3/Cql.g index 6b31da5..218c541 100644 --- a/src/java/org/apache/cassandra/cql3/Cql.g +++ b/src/java/org/apache/cassandra/cql3/Cql.g @@ -390,7 +390,7 @@ batchStatement returns [BatchStatement expr] : K_BEGIN ( K_UNLOGGED { type = BatchStatement.Type.UNLOGGED; } | K_COUNTER { type = BatchStatement.Type.COUNTER; } )? K_BATCH ( usingClause[attrs] )? - s1=batchStatementObjective ';'? { statements.add(s1); } ( sN=batchStatementObjective ';'? { statements.add(sN); } )* + ( s=batchStatementObjective ';'? { statements.add(s); } )+ K_APPLY K_BATCH { return new BatchStatement(type, statements, attrs); @@ -676,33 +676,28 @@ constant returns [Constants.Literal constant] | t=HEXNUMBER { $constant = Constants.Literal.hex($t.text); } ; -set_tail[ListTerm.Raw s] -: '}' -| ',' t=term { s.add(t); } set_tail[s] -; - -map_tail[ListPairTerm.Raw, Term.Raw m] -: '}' -| ',' k=term ':' v=term { m.add(Pair.create(k, v)); } map_tail[m] -; - map_literal returns [Maps.Literal map] -: '{' '}' { $map = new Maps.Literal(Collections.PairTerm.Raw, Term.RawemptyList()); } -| '{' { ListPairTerm.Raw, Term.Raw m = new ArrayListPairTerm.Raw, Term.Raw(); } - k1=term ':' v1=term { m.add(Pair.create(k1, v1)); } map_tail[m] - { $map = new Maps.Literal(m); } +: '{' { ListPairTerm.Raw, Term.Raw m = new ArrayListPairTerm.Raw, Term.Raw(); } + ( k1=term ':' v1=term { m.add(Pair.create(k1, v1)); } ( ',' kn=term ':' vn=term { m.add(Pair.create(kn, vn)); } )* )? + '}' { $map = new Maps.Literal(m); } ; set_or_map[Term.Raw t] returns [Term.Raw value] -: ':' v=term { ListPairTerm.Raw, Term.Raw m = new ArrayListPairTerm.Raw, Term.Raw(); m.add(Pair.create(t, v)); } map_tail[m] { $value = new Maps.Literal(m); } -| { ListTerm.Raw s = new ArrayListTerm.Raw(); s.add(t); } set_tail[s] { $value = new Sets.Literal(s); } +: ':' v=term { ListPairTerm.Raw, Term.Raw m = new ArrayListPairTerm.Raw, Term.Raw(); m.add(Pair.create(t, v)); } + ( ',' kn=term ':' vn=term { m.add(Pair.create(kn, vn)); } )* + { $value = new Maps.Literal(m); } +| { ListTerm.Raw s = new ArrayListTerm.Raw(); s.add(t); } + ( ',' tn=term { s.add(tn); } )* + { $value = new Sets.Literal(s); } ; -// This is a bit convoluted but that's because I haven't found a much better to have antl disambiguate between sets and maps collection_literal returns [Term.Raw value] -: '[' { ListTerm.Raw l = new ArrayListTerm.Raw(); } ( t1=term { l.add(t1); } ( ',' tn=term { l.add(tn); } )* )? ']' { $value = new Lists.Literal(l); } -| '{' t=term v=set_or_map[t] { $value = v; } -// Note that we have
[3/4] git commit: Fix CHANGES.txt
Fix CHANGES.txt Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c8b220ba Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c8b220ba Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c8b220ba Branch: refs/heads/cassandra-2.0 Commit: c8b220ba10ff248238777ed1a627f1bc55261049 Parents: 26d0535 Author: Aleksey Yeschenko alek...@apache.org Authored: Wed Aug 21 18:46:59 2013 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Wed Aug 21 18:46:59 2013 +0300 -- CHANGES.txt | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/c8b220ba/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index b966e0c..fdee261 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,8 @@ Merged from 1.2: * Fix getBloomFilterDiskSpaceUsed for AlwaysPresentFilter (CASSANDRA-5900) * Don't announce schema version until we've loaded the changes locally (CASSANDRA-5904) + * Fix to support off heap bloom filters size greater than 2 GB (CASSANDRA-5903) + * Properly handle parsing huge map and set literals (CASSANDRA-5893) 2.0.0-rc2 @@ -45,15 +47,7 @@ Merged from 1.2: * Future-proof inter-major-version schema migrations (CASSANDRA-5845) * (Hadoop) add CqlPagingRecordReader support for ReversedType in Thrift table (CASSANDRA-5718) - * Add KeyCacheHitRate metric to CF metrics (CASSANDRA-5868) - * cqlsh: add support for multiline comments (CASSANDRA-5798) - * Handle CQL3 SELECT duplicate IN restrictions on clustering columns - (CASSANDRA-5856) - * Don't announce schema version until we've loaded the changes locally - (CASSANDRA-5904) * Add -no-snapshot option to scrub (CASSANDRA-5891) - * Fix to support off heap bloom filters size greater than 2 GB (CASSANDRA-5903) - * Properly handle parsing huge map and set literals (CASSANDRA-5893) Merged from 1.1: * Correctly validate sparse composite cells in scrub (CASSANDRA-5855)
[4/4] git commit: Merge branch 'cassandra-2.0.0' into cassandra-2.0
Merge branch 'cassandra-2.0.0' into cassandra-2.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/bfb06473 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/bfb06473 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/bfb06473 Branch: refs/heads/cassandra-2.0 Commit: bfb06473ec13914aca7360706bff8e90cfd2ae79 Parents: 857a7f5 c8b220b Author: Aleksey Yeschenko alek...@apache.org Authored: Wed Aug 21 18:48:13 2013 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Wed Aug 21 18:48:13 2013 +0300 -- CHANGES.txt | 10 ++ src/java/org/apache/cassandra/cql3/Cql.g| 37 +--- .../apache/cassandra/cql3/QueryProcessor.java | 9 ++--- 3 files changed, 23 insertions(+), 33 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/bfb06473/CHANGES.txt --
[2/4] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0.0
Merge branch 'cassandra-1.2' into cassandra-2.0.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/26d05352 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/26d05352 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/26d05352 Branch: refs/heads/cassandra-2.0 Commit: 26d05352e28ca2549a3c041d849f53e60703c80d Parents: 8f367fd dd65e88 Author: Aleksey Yeschenko alek...@apache.org Authored: Wed Aug 21 18:42:56 2013 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Wed Aug 21 18:42:56 2013 +0300 -- CHANGES.txt | 4 +-- src/java/org/apache/cassandra/cql3/Cql.g| 37 +--- .../apache/cassandra/cql3/QueryProcessor.java | 9 ++--- 3 files changed, 23 insertions(+), 27 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/26d05352/CHANGES.txt -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/26d05352/src/java/org/apache/cassandra/cql3/Cql.g -- diff --cc src/java/org/apache/cassandra/cql3/Cql.g index b55600b,218c541..0035c41 --- a/src/java/org/apache/cassandra/cql3/Cql.g +++ b/src/java/org/apache/cassandra/cql3/Cql.g @@@ -421,10 -390,10 +421,10 @@@ batchStatement returns [BatchStatement. : K_BEGIN ( K_UNLOGGED { type = BatchStatement.Type.UNLOGGED; } | K_COUNTER { type = BatchStatement.Type.COUNTER; } )? K_BATCH ( usingClause[attrs] )? - s1=batchStatementObjective ';'? { statements.add(s1); } ( sN=batchStatementObjective ';'? { statements.add(sN); } )* + ( s=batchStatementObjective ';'? { statements.add(s); } )+ K_APPLY K_BATCH { - return new BatchStatement(type, statements, attrs); + return new BatchStatement.Parsed(type, attrs, statements); } ; http://git-wip-us.apache.org/repos/asf/cassandra/blob/26d05352/src/java/org/apache/cassandra/cql3/QueryProcessor.java --
[1/4] git commit: Properly handle parsing huge map and set literals
Updated Branches: refs/heads/cassandra-2.0 857a7f5fb - bfb06473e Properly handle parsing huge map and set literals patch by Aleksey Yeschenko; reviewed by Sylvain Lebresne for CASSANDRA-5893 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/dd65e88a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/dd65e88a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/dd65e88a Branch: refs/heads/cassandra-2.0 Commit: dd65e88a76c5f76b5747030742b3e4829663521f Parents: 55fed33 Author: Aleksey Yeschenko alek...@apache.org Authored: Wed Aug 21 18:37:30 2013 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Wed Aug 21 18:37:30 2013 +0300 -- CHANGES.txt | 4 +-- src/java/org/apache/cassandra/cql3/Cql.g| 37 +--- .../apache/cassandra/cql3/QueryProcessor.java | 12 +++ 3 files changed, 23 insertions(+), 30 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/dd65e88a/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 74890ea..1ffec7d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -23,11 +23,11 @@ * Don't announce schema version until we've loaded the changes locally (CASSANDRA-5904) * Add -no-snapshot option to scrub (CASSANDRA-5891) + * Fix to support off heap bloom filters size greater than 2 GB (CASSANDRA-5903) + * Properly handle parsing huge map and set literals (CASSANDRA-5893) Merged from 1.1: * Correctly validate sparse composite cells in scrub (CASSANDRA-5855) -1.2.9 - * Fix to support off heap bloom filters size greater than 2 GB (CASSANDRA-5903) 1.2.8 * Fix reading DeletionTime from 1.1-format sstables (CASSANDRA-5814) http://git-wip-us.apache.org/repos/asf/cassandra/blob/dd65e88a/src/java/org/apache/cassandra/cql3/Cql.g -- diff --git a/src/java/org/apache/cassandra/cql3/Cql.g b/src/java/org/apache/cassandra/cql3/Cql.g index 6b31da5..218c541 100644 --- a/src/java/org/apache/cassandra/cql3/Cql.g +++ b/src/java/org/apache/cassandra/cql3/Cql.g @@ -390,7 +390,7 @@ batchStatement returns [BatchStatement expr] : K_BEGIN ( K_UNLOGGED { type = BatchStatement.Type.UNLOGGED; } | K_COUNTER { type = BatchStatement.Type.COUNTER; } )? K_BATCH ( usingClause[attrs] )? - s1=batchStatementObjective ';'? { statements.add(s1); } ( sN=batchStatementObjective ';'? { statements.add(sN); } )* + ( s=batchStatementObjective ';'? { statements.add(s); } )+ K_APPLY K_BATCH { return new BatchStatement(type, statements, attrs); @@ -676,33 +676,28 @@ constant returns [Constants.Literal constant] | t=HEXNUMBER { $constant = Constants.Literal.hex($t.text); } ; -set_tail[ListTerm.Raw s] -: '}' -| ',' t=term { s.add(t); } set_tail[s] -; - -map_tail[ListPairTerm.Raw, Term.Raw m] -: '}' -| ',' k=term ':' v=term { m.add(Pair.create(k, v)); } map_tail[m] -; - map_literal returns [Maps.Literal map] -: '{' '}' { $map = new Maps.Literal(Collections.PairTerm.Raw, Term.RawemptyList()); } -| '{' { ListPairTerm.Raw, Term.Raw m = new ArrayListPairTerm.Raw, Term.Raw(); } - k1=term ':' v1=term { m.add(Pair.create(k1, v1)); } map_tail[m] - { $map = new Maps.Literal(m); } +: '{' { ListPairTerm.Raw, Term.Raw m = new ArrayListPairTerm.Raw, Term.Raw(); } + ( k1=term ':' v1=term { m.add(Pair.create(k1, v1)); } ( ',' kn=term ':' vn=term { m.add(Pair.create(kn, vn)); } )* )? + '}' { $map = new Maps.Literal(m); } ; set_or_map[Term.Raw t] returns [Term.Raw value] -: ':' v=term { ListPairTerm.Raw, Term.Raw m = new ArrayListPairTerm.Raw, Term.Raw(); m.add(Pair.create(t, v)); } map_tail[m] { $value = new Maps.Literal(m); } -| { ListTerm.Raw s = new ArrayListTerm.Raw(); s.add(t); } set_tail[s] { $value = new Sets.Literal(s); } +: ':' v=term { ListPairTerm.Raw, Term.Raw m = new ArrayListPairTerm.Raw, Term.Raw(); m.add(Pair.create(t, v)); } + ( ',' kn=term ':' vn=term { m.add(Pair.create(kn, vn)); } )* + { $value = new Maps.Literal(m); } +| { ListTerm.Raw s = new ArrayListTerm.Raw(); s.add(t); } + ( ',' tn=term { s.add(tn); } )* + { $value = new Sets.Literal(s); } ; -// This is a bit convoluted but that's because I haven't found a much better to have antl disambiguate between sets and maps collection_literal returns [Term.Raw value] -: '[' { ListTerm.Raw l = new ArrayListTerm.Raw(); } ( t1=term { l.add(t1); } ( ',' tn=term { l.add(tn); } )* )? ']' { $value = new Lists.Literal(l); } -| '{' t=term v=set_or_map[t] { $value = v; } -// Note that we have an
[1/5] git commit: Properly handle parsing huge map and set literals
Updated Branches: refs/heads/trunk 7678661b0 - 43105f7f1 Properly handle parsing huge map and set literals patch by Aleksey Yeschenko; reviewed by Sylvain Lebresne for CASSANDRA-5893 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/dd65e88a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/dd65e88a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/dd65e88a Branch: refs/heads/trunk Commit: dd65e88a76c5f76b5747030742b3e4829663521f Parents: 55fed33 Author: Aleksey Yeschenko alek...@apache.org Authored: Wed Aug 21 18:37:30 2013 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Wed Aug 21 18:37:30 2013 +0300 -- CHANGES.txt | 4 +-- src/java/org/apache/cassandra/cql3/Cql.g| 37 +--- .../apache/cassandra/cql3/QueryProcessor.java | 12 +++ 3 files changed, 23 insertions(+), 30 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/dd65e88a/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 74890ea..1ffec7d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -23,11 +23,11 @@ * Don't announce schema version until we've loaded the changes locally (CASSANDRA-5904) * Add -no-snapshot option to scrub (CASSANDRA-5891) + * Fix to support off heap bloom filters size greater than 2 GB (CASSANDRA-5903) + * Properly handle parsing huge map and set literals (CASSANDRA-5893) Merged from 1.1: * Correctly validate sparse composite cells in scrub (CASSANDRA-5855) -1.2.9 - * Fix to support off heap bloom filters size greater than 2 GB (CASSANDRA-5903) 1.2.8 * Fix reading DeletionTime from 1.1-format sstables (CASSANDRA-5814) http://git-wip-us.apache.org/repos/asf/cassandra/blob/dd65e88a/src/java/org/apache/cassandra/cql3/Cql.g -- diff --git a/src/java/org/apache/cassandra/cql3/Cql.g b/src/java/org/apache/cassandra/cql3/Cql.g index 6b31da5..218c541 100644 --- a/src/java/org/apache/cassandra/cql3/Cql.g +++ b/src/java/org/apache/cassandra/cql3/Cql.g @@ -390,7 +390,7 @@ batchStatement returns [BatchStatement expr] : K_BEGIN ( K_UNLOGGED { type = BatchStatement.Type.UNLOGGED; } | K_COUNTER { type = BatchStatement.Type.COUNTER; } )? K_BATCH ( usingClause[attrs] )? - s1=batchStatementObjective ';'? { statements.add(s1); } ( sN=batchStatementObjective ';'? { statements.add(sN); } )* + ( s=batchStatementObjective ';'? { statements.add(s); } )+ K_APPLY K_BATCH { return new BatchStatement(type, statements, attrs); @@ -676,33 +676,28 @@ constant returns [Constants.Literal constant] | t=HEXNUMBER { $constant = Constants.Literal.hex($t.text); } ; -set_tail[ListTerm.Raw s] -: '}' -| ',' t=term { s.add(t); } set_tail[s] -; - -map_tail[ListPairTerm.Raw, Term.Raw m] -: '}' -| ',' k=term ':' v=term { m.add(Pair.create(k, v)); } map_tail[m] -; - map_literal returns [Maps.Literal map] -: '{' '}' { $map = new Maps.Literal(Collections.PairTerm.Raw, Term.RawemptyList()); } -| '{' { ListPairTerm.Raw, Term.Raw m = new ArrayListPairTerm.Raw, Term.Raw(); } - k1=term ':' v1=term { m.add(Pair.create(k1, v1)); } map_tail[m] - { $map = new Maps.Literal(m); } +: '{' { ListPairTerm.Raw, Term.Raw m = new ArrayListPairTerm.Raw, Term.Raw(); } + ( k1=term ':' v1=term { m.add(Pair.create(k1, v1)); } ( ',' kn=term ':' vn=term { m.add(Pair.create(kn, vn)); } )* )? + '}' { $map = new Maps.Literal(m); } ; set_or_map[Term.Raw t] returns [Term.Raw value] -: ':' v=term { ListPairTerm.Raw, Term.Raw m = new ArrayListPairTerm.Raw, Term.Raw(); m.add(Pair.create(t, v)); } map_tail[m] { $value = new Maps.Literal(m); } -| { ListTerm.Raw s = new ArrayListTerm.Raw(); s.add(t); } set_tail[s] { $value = new Sets.Literal(s); } +: ':' v=term { ListPairTerm.Raw, Term.Raw m = new ArrayListPairTerm.Raw, Term.Raw(); m.add(Pair.create(t, v)); } + ( ',' kn=term ':' vn=term { m.add(Pair.create(kn, vn)); } )* + { $value = new Maps.Literal(m); } +| { ListTerm.Raw s = new ArrayListTerm.Raw(); s.add(t); } + ( ',' tn=term { s.add(tn); } )* + { $value = new Sets.Literal(s); } ; -// This is a bit convoluted but that's because I haven't found a much better to have antl disambiguate between sets and maps collection_literal returns [Term.Raw value] -: '[' { ListTerm.Raw l = new ArrayListTerm.Raw(); } ( t1=term { l.add(t1); } ( ',' tn=term { l.add(tn); } )* )? ']' { $value = new Lists.Literal(l); } -| '{' t=term v=set_or_map[t] { $value = v; } -// Note that we have an ambiguity between
[3/5] git commit: Fix CHANGES.txt
Fix CHANGES.txt Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c8b220ba Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c8b220ba Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c8b220ba Branch: refs/heads/trunk Commit: c8b220ba10ff248238777ed1a627f1bc55261049 Parents: 26d0535 Author: Aleksey Yeschenko alek...@apache.org Authored: Wed Aug 21 18:46:59 2013 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Wed Aug 21 18:46:59 2013 +0300 -- CHANGES.txt | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/c8b220ba/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index b966e0c..fdee261 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,8 @@ Merged from 1.2: * Fix getBloomFilterDiskSpaceUsed for AlwaysPresentFilter (CASSANDRA-5900) * Don't announce schema version until we've loaded the changes locally (CASSANDRA-5904) + * Fix to support off heap bloom filters size greater than 2 GB (CASSANDRA-5903) + * Properly handle parsing huge map and set literals (CASSANDRA-5893) 2.0.0-rc2 @@ -45,15 +47,7 @@ Merged from 1.2: * Future-proof inter-major-version schema migrations (CASSANDRA-5845) * (Hadoop) add CqlPagingRecordReader support for ReversedType in Thrift table (CASSANDRA-5718) - * Add KeyCacheHitRate metric to CF metrics (CASSANDRA-5868) - * cqlsh: add support for multiline comments (CASSANDRA-5798) - * Handle CQL3 SELECT duplicate IN restrictions on clustering columns - (CASSANDRA-5856) - * Don't announce schema version until we've loaded the changes locally - (CASSANDRA-5904) * Add -no-snapshot option to scrub (CASSANDRA-5891) - * Fix to support off heap bloom filters size greater than 2 GB (CASSANDRA-5903) - * Properly handle parsing huge map and set literals (CASSANDRA-5893) Merged from 1.1: * Correctly validate sparse composite cells in scrub (CASSANDRA-5855)
[4/5] git commit: Merge branch 'cassandra-2.0.0' into cassandra-2.0
Merge branch 'cassandra-2.0.0' into cassandra-2.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/bfb06473 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/bfb06473 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/bfb06473 Branch: refs/heads/trunk Commit: bfb06473ec13914aca7360706bff8e90cfd2ae79 Parents: 857a7f5 c8b220b Author: Aleksey Yeschenko alek...@apache.org Authored: Wed Aug 21 18:48:13 2013 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Wed Aug 21 18:48:13 2013 +0300 -- CHANGES.txt | 10 ++ src/java/org/apache/cassandra/cql3/Cql.g| 37 +--- .../apache/cassandra/cql3/QueryProcessor.java | 9 ++--- 3 files changed, 23 insertions(+), 33 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/bfb06473/CHANGES.txt --
[5/5] git commit: Merge branch 'cassandra-2.0' into trunk
Merge branch 'cassandra-2.0' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/43105f7f Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/43105f7f Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/43105f7f Branch: refs/heads/trunk Commit: 43105f7f16395c20e11b3a1c036308ee293abe60 Parents: 7678661 bfb0647 Author: Aleksey Yeschenko alek...@apache.org Authored: Wed Aug 21 18:52:00 2013 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Wed Aug 21 18:52:00 2013 +0300 -- CHANGES.txt | 10 ++ src/java/org/apache/cassandra/cql3/Cql.g| 37 +--- .../apache/cassandra/cql3/QueryProcessor.java | 9 ++--- 3 files changed, 23 insertions(+), 33 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/43105f7f/CHANGES.txt --
[2/5] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0.0
Merge branch 'cassandra-1.2' into cassandra-2.0.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/26d05352 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/26d05352 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/26d05352 Branch: refs/heads/trunk Commit: 26d05352e28ca2549a3c041d849f53e60703c80d Parents: 8f367fd dd65e88 Author: Aleksey Yeschenko alek...@apache.org Authored: Wed Aug 21 18:42:56 2013 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Wed Aug 21 18:42:56 2013 +0300 -- CHANGES.txt | 4 +-- src/java/org/apache/cassandra/cql3/Cql.g| 37 +--- .../apache/cassandra/cql3/QueryProcessor.java | 9 ++--- 3 files changed, 23 insertions(+), 27 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/26d05352/CHANGES.txt -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/26d05352/src/java/org/apache/cassandra/cql3/Cql.g -- diff --cc src/java/org/apache/cassandra/cql3/Cql.g index b55600b,218c541..0035c41 --- a/src/java/org/apache/cassandra/cql3/Cql.g +++ b/src/java/org/apache/cassandra/cql3/Cql.g @@@ -421,10 -390,10 +421,10 @@@ batchStatement returns [BatchStatement. : K_BEGIN ( K_UNLOGGED { type = BatchStatement.Type.UNLOGGED; } | K_COUNTER { type = BatchStatement.Type.COUNTER; } )? K_BATCH ( usingClause[attrs] )? - s1=batchStatementObjective ';'? { statements.add(s1); } ( sN=batchStatementObjective ';'? { statements.add(sN); } )* + ( s=batchStatementObjective ';'? { statements.add(s); } )+ K_APPLY K_BATCH { - return new BatchStatement(type, statements, attrs); + return new BatchStatement.Parsed(type, attrs, statements); } ; http://git-wip-us.apache.org/repos/asf/cassandra/blob/26d05352/src/java/org/apache/cassandra/cql3/QueryProcessor.java --
[jira] [Created] (CASSANDRA-5913) Nodes with no gossip STATUS shown as UN by nodetool:status
Chris Burroughs created CASSANDRA-5913: -- Summary: Nodes with no gossip STATUS shown as UN by nodetool:status Key: CASSANDRA-5913 URL: https://issues.apache.org/jira/browse/CASSANDRA-5913 Project: Cassandra Issue Type: Bug Components: Core Environment: 1.2.8 Reporter: Chris Burroughs Priority: Minor I have no idea if this is a valid situation or a larger problem, but either way nodetool status should not make it look like everything is a-okay. From nt:gossipinfo: {noformat} /64.215.255.182 RACK:NOP NET_VERSION:6 HOST_ID:4f3b214b-b03e-46eb-8214-5fab2662a06b RELEASE_VERSION:1.2.8 DC:IAD INTERNAL_IP:10.15.2.182 SCHEMA:59adb24e-f3cd-3e02-97f0-5b395827453f RPC_ADDRESS:0.0.0.0 {noformat} {noformat} $ ./bin/nt.sh status | grep -i 4055109d-800d-4743-8efa-4ecfff883463 UN 64.215.255.182 63.84 GB 256 2.5% 4055109d-800d-4743-8efa-4ecfff883463 NOP {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Issue Comment Deleted] (CASSANDRA-5903) Integer overflow in OffHeapBitSet when bloomfilter 2GB
[ https://issues.apache.org/jira/browse/CASSANDRA-5903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Taylan Develioglu updated CASSANDRA-5903: - Comment: was deleted (was: diff --git a/src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java b/src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java index b7bb733..fb32043 100644 --- a/src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java +++ b/src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java @@ -119,9 +119,9 @@ public class OffHeapBitSet implements IBitSet public static OffHeapBitSet deserialize(DataInput dis) throws IOException { -int byteCount = dis.readInt() * 8; +long byteCount = dis.readInt() * 8L; Memory memory = RefCountedMemory.allocate(byteCount); -for (int i = 0; i byteCount;) +for (long i = 0; i byteCount;) { long v = dis.readLong(); memory.setByte(i++, (byte) (v 0)); ) Integer overflow in OffHeapBitSet when bloomfilter 2GB Key: CASSANDRA-5903 URL: https://issues.apache.org/jira/browse/CASSANDRA-5903 Project: Cassandra Issue Type: Bug Components: Core Reporter: Taylan Develioglu Assignee: Vijay Labels: patch Fix For: 1.2.9 Attachments: 0001-CASSANDRA-5903.patch In org.apache.cassandra.utils.obs.OffHeapBitSet. byteCount overflows and causes an IllegalArgument exception in Memory.allocate when bloomfilter is 2GB. Suggest changing byteCount to long. {code:title=OffHeapBitSet.java} public OffHeapBitSet(long numBits) { // OpenBitSet.bits2words calculation is there for backward compatibility. int byteCount = OpenBitSet.bits2words(numBits) * 8; bytes = RefCountedMemory.allocate(byteCount); // flush/clear the existing memory. clear(); } {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-5903) Integer overflow in OffHeapBitSet when bloomfilter 2GB
[ https://issues.apache.org/jira/browse/CASSANDRA-5903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Taylan Develioglu updated CASSANDRA-5903: - Attachment: 0002-CASSANDRA-5903.patch Integer overflow in OffHeapBitSet when bloomfilter 2GB Key: CASSANDRA-5903 URL: https://issues.apache.org/jira/browse/CASSANDRA-5903 Project: Cassandra Issue Type: Bug Components: Core Reporter: Taylan Develioglu Assignee: Vijay Labels: patch Fix For: 1.2.9 Attachments: 0001-CASSANDRA-5903.patch, 0002-CASSANDRA-5903.patch In org.apache.cassandra.utils.obs.OffHeapBitSet. byteCount overflows and causes an IllegalArgument exception in Memory.allocate when bloomfilter is 2GB. Suggest changing byteCount to long. {code:title=OffHeapBitSet.java} public OffHeapBitSet(long numBits) { // OpenBitSet.bits2words calculation is there for backward compatibility. int byteCount = OpenBitSet.bits2words(numBits) * 8; bytes = RefCountedMemory.allocate(byteCount); // flush/clear the existing memory. clear(); } {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5913) Nodes with no gossip STATUS shown as UN by nodetool:status
[ https://issues.apache.org/jira/browse/CASSANDRA-5913?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13746518#comment-13746518 ] Brandon Williams commented on CASSANDRA-5913: - I'm going to need steps to reproduce, since not having a STATUS state should be impossible, especially since STATUS and TOKENS are added in the same place (tokens is hidden from gossipinfo on purpose, however.) LOAD and SEVERITY appear to be missing as well. Nodes with no gossip STATUS shown as UN by nodetool:status Key: CASSANDRA-5913 URL: https://issues.apache.org/jira/browse/CASSANDRA-5913 Project: Cassandra Issue Type: Bug Components: Core Environment: 1.2.8 Reporter: Chris Burroughs Priority: Minor I have no idea if this is a valid situation or a larger problem, but either way nodetool status should not make it look like everything is a-okay. From nt:gossipinfo: {noformat} /64.215.255.182 RACK:NOP NET_VERSION:6 HOST_ID:4f3b214b-b03e-46eb-8214-5fab2662a06b RELEASE_VERSION:1.2.8 DC:IAD INTERNAL_IP:10.15.2.182 SCHEMA:59adb24e-f3cd-3e02-97f0-5b395827453f RPC_ADDRESS:0.0.0.0 {noformat} {noformat} $ ./bin/nt.sh status | grep -i 4055109d-800d-4743-8efa-4ecfff883463 UN 64.215.255.182 63.84 GB 256 2.5% 4055109d-800d-4743-8efa-4ecfff883463 NOP {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (CASSANDRA-5914) Failed replace_node bootstrap leaves gossip in weird state ; possible perf problem
Chris Burroughs created CASSANDRA-5914: -- Summary: Failed replace_node bootstrap leaves gossip in weird state ; possible perf problem Key: CASSANDRA-5914 URL: https://issues.apache.org/jira/browse/CASSANDRA-5914 Project: Cassandra Issue Type: Bug Components: Core Environment: 1.2.8 Reporter: Chris Burroughs A node was down for a week or two due to hardware disk failure. I tried to use replace_node to bring up a new node on the same physical host with the same IPs. (rbranson suspected that using the same IP may be issue prone.) This failed due to unable to find sufficient sources for streaming range. However, gossip for the to-be-replaced node was left in a funky state: {noformat} /64.215.255.182 RACK:NOP NET_VERSION:6 HOST_ID:4f3b214b-b03e-46eb-8214-5fab2662a06b RELEASE_VERSION:1.2.8 DC:IAD INTERNAL_IP:10.15.2.182 SCHEMA:59adb24e-f3cd-3e02-97f0-5b395827453f RPC_ADDRESS:0.0.0.0 {noformat} (See CASSANDRA-5913 for cosmetic issue with nt:status.) This seems (A) confusing and (B) the failed replace_token correlated with 95th percentile read latency for this cluster going from 8k microseconds to around 200k microseconds (on both DCs in a mutli-dc cluster reading at CL.ONE). I don't have a good theory for the correlation but performance was bad for over an hour and returned to normal once a successful replace_token was performed. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5913) Nodes with no gossip STATUS shown as UN by nodetool:status
[ https://issues.apache.org/jira/browse/CASSANDRA-5913?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13746520#comment-13746520 ] Chris Burroughs commented on CASSANDRA-5913: Sorry, trying to write up separate discrete tickets instead of one giant CASSANDRA AND I HAD A BAD MORNING. It was from a replace_node on a down node that failed as in CASSANDRA-5914 Nodes with no gossip STATUS shown as UN by nodetool:status Key: CASSANDRA-5913 URL: https://issues.apache.org/jira/browse/CASSANDRA-5913 Project: Cassandra Issue Type: Bug Components: Core Environment: 1.2.8 Reporter: Chris Burroughs Priority: Minor I have no idea if this is a valid situation or a larger problem, but either way nodetool status should not make it look like everything is a-okay. From nt:gossipinfo: {noformat} /64.215.255.182 RACK:NOP NET_VERSION:6 HOST_ID:4f3b214b-b03e-46eb-8214-5fab2662a06b RELEASE_VERSION:1.2.8 DC:IAD INTERNAL_IP:10.15.2.182 SCHEMA:59adb24e-f3cd-3e02-97f0-5b395827453f RPC_ADDRESS:0.0.0.0 {noformat} {noformat} $ ./bin/nt.sh status | grep -i 4055109d-800d-4743-8efa-4ecfff883463 UN 64.215.255.182 63.84 GB 256 2.5% 4055109d-800d-4743-8efa-4ecfff883463 NOP {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
git commit: Add ability for CQL3 to list partition keys
Updated Branches: refs/heads/cassandra-2.0 bfb06473e - b362aebd3 Add ability for CQL3 to list partition keys patch by Aleksey Yeschenko and Dan Jatnieks; reviewed by Sylvain Lebresne for CASSANDRA-4536 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b362aebd Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b362aebd Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b362aebd Branch: refs/heads/cassandra-2.0 Commit: b362aebd304144235121350913839b9a7ba3a5b0 Parents: bfb0647 Author: Aleksey Yeschenko alek...@apache.org Authored: Wed Aug 21 19:09:58 2013 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Wed Aug 21 19:09:58 2013 +0300 -- CHANGES.txt | 1 + bin/cqlsh | 4 +- doc/cql3/CQL.textile| 9 ++- pylib/cqlshlib/cql3handling.py | 2 +- src/java/org/apache/cassandra/cql3/Cql.g| 6 +- .../apache/cassandra/cql3/QueryProcessor.java | 2 +- .../cql3/statements/ModificationStatement.java | 2 +- .../cql3/statements/SelectStatement.java| 63 8 files changed, 69 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/b362aebd/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 8335423..cdc79c1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,7 @@ * Use a range aware scanner for cleanup (CASSANDRA-2524) * Cleanup doesn't need to inspect sstables that contain only local data (CASSANDRA-5722) + * Add ability for CQL3 to list partition keys (CASSANDRA-4536) 2.0.0 http://git-wip-us.apache.org/repos/asf/cassandra/blob/b362aebd/bin/cqlsh -- diff --git a/bin/cqlsh b/bin/cqlsh index 0f51c7f..b1764db 100755 --- a/bin/cqlsh +++ b/bin/cqlsh @@ -32,7 +32,7 @@ exit 1 from __future__ import with_statement description = CQL Shell for Apache Cassandra -version = 4.0.0 +version = 4.0.1 from StringIO import StringIO from itertools import groupby @@ -132,7 +132,7 @@ if os.path.exists(OLD_HISTORY): DEFAULT_HOST = 'localhost' DEFAULT_PORT = 9160 -DEFAULT_CQLVER = '3.1.0' +DEFAULT_CQLVER = '3.1.1' DEFAULT_TRANSPORT_FACTORY = 'cqlshlib.tfactory.regular_transport_factory' DEFAULT_TIME_FORMAT = '%Y-%m-%d %H:%M:%S%z' http://git-wip-us.apache.org/repos/asf/cassandra/blob/b362aebd/doc/cql3/CQL.textile -- diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile index c87b9a5..e8f991b 100644 --- a/doc/cql3/CQL.textile +++ b/doc/cql3/CQL.textile @@ -1,6 +1,6 @@ link rel=StyleSheet href=CQL.css type=text/css media=screen -h1. Cassandra Query Language (CQL) v3.1.0 +h1. Cassandra Query Language (CQL) v3.1.1 span id=tableOfContents @@ -604,7 +604,7 @@ bc(syntax).. ( LIMIT integer )? ( ALLOW FILTERING )? -select-clause ::= selection-list +select-clause ::= DISTINCT? selection-list | COUNT '(' ( '*' | '1' ) ')' (AS identifier)? selection-list ::= selector (AS identifier)? ( ',' selector (AS identifier)? )* @@ -1077,12 +1077,17 @@ CQL distinguishes between _reserved_ and _non-reserved_ keywords. Reserved keywo | @WHERE@| yes | | @WITH@ | yes | | @WRITETIME@| no | +| @DISTINCT@ | no | h2(#changes). Changes The following describes the addition/changes brought for each version of CQL. +h3. 3.1.1 + +* @SELECT@ statement now allows listing the partition keys (using the @DISTINCT@ modifier). See CASSANDRA-4536:https://issues.apache.org/jira/browse/CASSANDRA-4536. + h3. 3.1.0 * ALTER TABLE:#alterTableStmt @DROP@ option has been reenabled for CQL3 tables and has new semantics now: the space formerly used by dropped columns will now be eventually reclaimed (post-compaction). You should not readd previously dropped columns unless you use timestamps with microsecond precision (see CASSANDRA-3919:https://issues.apache.org/jira/browse/CASSANDRA-3919 for more details). http://git-wip-us.apache.org/repos/asf/cassandra/blob/b362aebd/pylib/cqlshlib/cql3handling.py -- diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py index eacc433..0b38d04 100644 --- a/pylib/cqlshlib/cql3handling.py +++ b/pylib/cqlshlib/cql3handling.py @@ -568,7 +568,7 @@ syntax_rules += r''' ) (= | | | = | =) tokenDefinition | [rel_lhs]=cident IN ( term ( , term )* ) ; -selectClause ::= selector (AS cident)? (, selector (AS
[2/2] git commit: Merge branch 'cassandra-2.0' into trunk
Merge branch 'cassandra-2.0' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/0da21de3 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/0da21de3 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/0da21de3 Branch: refs/heads/trunk Commit: 0da21de3ef67e40a42015d7f50728a3d9b5cd2fa Parents: 43105f7 b362aeb Author: Aleksey Yeschenko alek...@apache.org Authored: Wed Aug 21 19:17:01 2013 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Wed Aug 21 19:17:01 2013 +0300 -- CHANGES.txt | 1 + bin/cqlsh | 4 +- doc/cql3/CQL.textile| 9 ++- pylib/cqlshlib/cql3handling.py | 2 +- src/java/org/apache/cassandra/cql3/Cql.g| 6 +- .../apache/cassandra/cql3/QueryProcessor.java | 2 +- .../cql3/statements/ModificationStatement.java | 2 +- .../cql3/statements/SelectStatement.java| 63 8 files changed, 69 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/0da21de3/CHANGES.txt --
[1/2] git commit: Add ability for CQL3 to list partition keys
Updated Branches: refs/heads/trunk 43105f7f1 - 0da21de3e Add ability for CQL3 to list partition keys patch by Aleksey Yeschenko and Dan Jatnieks; reviewed by Sylvain Lebresne for CASSANDRA-4536 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b362aebd Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b362aebd Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b362aebd Branch: refs/heads/trunk Commit: b362aebd304144235121350913839b9a7ba3a5b0 Parents: bfb0647 Author: Aleksey Yeschenko alek...@apache.org Authored: Wed Aug 21 19:09:58 2013 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Wed Aug 21 19:09:58 2013 +0300 -- CHANGES.txt | 1 + bin/cqlsh | 4 +- doc/cql3/CQL.textile| 9 ++- pylib/cqlshlib/cql3handling.py | 2 +- src/java/org/apache/cassandra/cql3/Cql.g| 6 +- .../apache/cassandra/cql3/QueryProcessor.java | 2 +- .../cql3/statements/ModificationStatement.java | 2 +- .../cql3/statements/SelectStatement.java| 63 8 files changed, 69 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/b362aebd/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 8335423..cdc79c1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,7 @@ * Use a range aware scanner for cleanup (CASSANDRA-2524) * Cleanup doesn't need to inspect sstables that contain only local data (CASSANDRA-5722) + * Add ability for CQL3 to list partition keys (CASSANDRA-4536) 2.0.0 http://git-wip-us.apache.org/repos/asf/cassandra/blob/b362aebd/bin/cqlsh -- diff --git a/bin/cqlsh b/bin/cqlsh index 0f51c7f..b1764db 100755 --- a/bin/cqlsh +++ b/bin/cqlsh @@ -32,7 +32,7 @@ exit 1 from __future__ import with_statement description = CQL Shell for Apache Cassandra -version = 4.0.0 +version = 4.0.1 from StringIO import StringIO from itertools import groupby @@ -132,7 +132,7 @@ if os.path.exists(OLD_HISTORY): DEFAULT_HOST = 'localhost' DEFAULT_PORT = 9160 -DEFAULT_CQLVER = '3.1.0' +DEFAULT_CQLVER = '3.1.1' DEFAULT_TRANSPORT_FACTORY = 'cqlshlib.tfactory.regular_transport_factory' DEFAULT_TIME_FORMAT = '%Y-%m-%d %H:%M:%S%z' http://git-wip-us.apache.org/repos/asf/cassandra/blob/b362aebd/doc/cql3/CQL.textile -- diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile index c87b9a5..e8f991b 100644 --- a/doc/cql3/CQL.textile +++ b/doc/cql3/CQL.textile @@ -1,6 +1,6 @@ link rel=StyleSheet href=CQL.css type=text/css media=screen -h1. Cassandra Query Language (CQL) v3.1.0 +h1. Cassandra Query Language (CQL) v3.1.1 span id=tableOfContents @@ -604,7 +604,7 @@ bc(syntax).. ( LIMIT integer )? ( ALLOW FILTERING )? -select-clause ::= selection-list +select-clause ::= DISTINCT? selection-list | COUNT '(' ( '*' | '1' ) ')' (AS identifier)? selection-list ::= selector (AS identifier)? ( ',' selector (AS identifier)? )* @@ -1077,12 +1077,17 @@ CQL distinguishes between _reserved_ and _non-reserved_ keywords. Reserved keywo | @WHERE@| yes | | @WITH@ | yes | | @WRITETIME@| no | +| @DISTINCT@ | no | h2(#changes). Changes The following describes the addition/changes brought for each version of CQL. +h3. 3.1.1 + +* @SELECT@ statement now allows listing the partition keys (using the @DISTINCT@ modifier). See CASSANDRA-4536:https://issues.apache.org/jira/browse/CASSANDRA-4536. + h3. 3.1.0 * ALTER TABLE:#alterTableStmt @DROP@ option has been reenabled for CQL3 tables and has new semantics now: the space formerly used by dropped columns will now be eventually reclaimed (post-compaction). You should not readd previously dropped columns unless you use timestamps with microsecond precision (see CASSANDRA-3919:https://issues.apache.org/jira/browse/CASSANDRA-3919 for more details). http://git-wip-us.apache.org/repos/asf/cassandra/blob/b362aebd/pylib/cqlshlib/cql3handling.py -- diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py index eacc433..0b38d04 100644 --- a/pylib/cqlshlib/cql3handling.py +++ b/pylib/cqlshlib/cql3handling.py @@ -568,7 +568,7 @@ syntax_rules += r''' ) (= | | | = | =) tokenDefinition | [rel_lhs]=cident IN ( term ( , term )* ) ; -selectClause ::= selector (AS cident)? (, selector (AS cident)?)*
[jira] [Created] (CASSANDRA-5915) node flapping prevents replace_node from succeeding consistently
Chris Burroughs created CASSANDRA-5915: -- Summary: node flapping prevents replace_node from succeeding consistently Key: CASSANDRA-5915 URL: https://issues.apache.org/jira/browse/CASSANDRA-5915 Project: Cassandra Issue Type: Bug Components: Core Environment: 1.2.8 Reporter: Chris Burroughs A node was down for a week or two due to hardware disk failure. I tried to use replace_node to bring up a new node on the same physical host with the same IPs. (rbranson suspected that using the same IP may be more issue prone.) This failed due to unable to find sufficient sources for streaming range See CASSANDRA-5913 for a problem with how the failure was handled by gossip. All of the other nodes should have been up the entire time, but when this node came up it saw nodes flap up and down for quiet some time. I was eventually able to get replace_token to work by adding a 60 (!) second sleep to StorageService:bootstrap. I don't know if the right path is why are things flapping so much or bootstrap should wait until things look stable. A few notes about the cluster: * 2 dc cluster (about 20 each), using GossipingPropertyFileSnitch * multi-dc no vpn setup: http://mail-archives.apache.org/mod_mbox/cassandra-user/201306.mbox/%3c51bf5c79.7020...@gmail.com%3E Startup log from the successful (with sleep) replace_node attached. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-5915) node flapping prevents replace_node from succeeding consistently
[ https://issues.apache.org/jira/browse/CASSANDRA-5915?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chris Burroughs updated CASSANDRA-5915: --- Attachment: cassandra.log.gz Startup log showing about a minute of flapping. node flapping prevents replace_node from succeeding consistently Key: CASSANDRA-5915 URL: https://issues.apache.org/jira/browse/CASSANDRA-5915 Project: Cassandra Issue Type: Bug Components: Core Environment: 1.2.8 Reporter: Chris Burroughs Attachments: cassandra.log.gz A node was down for a week or two due to hardware disk failure. I tried to use replace_node to bring up a new node on the same physical host with the same IPs. (rbranson suspected that using the same IP may be more issue prone.) This failed due to unable to find sufficient sources for streaming range See CASSANDRA-5913 for a problem with how the failure was handled by gossip. All of the other nodes should have been up the entire time, but when this node came up it saw nodes flap up and down for quiet some time. I was eventually able to get replace_token to work by adding a 60 (!) second sleep to StorageService:bootstrap. I don't know if the right path is why are things flapping so much or bootstrap should wait until things look stable. A few notes about the cluster: * 2 dc cluster (about 20 each), using GossipingPropertyFileSnitch * multi-dc no vpn setup: http://mail-archives.apache.org/mod_mbox/cassandra-user/201306.mbox/%3c51bf5c79.7020...@gmail.com%3E Startup log from the successful (with sleep) replace_node attached. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4952) Add blocking force compaction (and anything else) calls to NodeProbe
[ https://issues.apache.org/jira/browse/CASSANDRA-4952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13746544#comment-13746544 ] Michael Harris commented on CASSANDRA-4952: --- It doesn't look like user defined compaction has this property, however. Unless 1.2 does and I'm still looking at 1.1 code. Add blocking force compaction (and anything else) calls to NodeProbe Key: CASSANDRA-4952 URL: https://issues.apache.org/jira/browse/CASSANDRA-4952 Project: Cassandra Issue Type: Improvement Components: Core Affects Versions: 1.1.6 Reporter: Michael Harris Priority: Minor Labels: lhf There are times when I'd like to get feedback about when compactions complete. For example, if I'm deleting data from cassandra and want to know when it is 100% removed from cassandra (tombstones collected and all). This is completely trivial to implement based on the existing code (the method called by the non-blocking version returns a future, so you could just wait on that, potentially with a timeout). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-5907) Leveled compaction may cause overlap in L1 when L0 compaction get behind
[ https://issues.apache.org/jira/browse/CASSANDRA-5907?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Yuki Morishita updated CASSANDRA-5907: -- Attachment: 5907-1.2.txt I think simply moving check overlap with compacting L0 out to the end of getCandidateFor will fix the problem. Patch attached. Leveled compaction may cause overlap in L1 when L0 compaction get behind Key: CASSANDRA-5907 URL: https://issues.apache.org/jira/browse/CASSANDRA-5907 Project: Cassandra Issue Type: Bug Reporter: Yuki Morishita Assignee: Yuki Morishita Priority: Minor Fix For: 1.2.9 Attachments: 5907-1.2.txt 1.2 makes LCS run parallel, though if L0 compaction get far behind and concurrent compactions at L0 where each compaction holds maximum number of SSTable to compact at L0(32), it will likely cause overlap in L1. There will be ERROR log as follows: {code} ERROR [CompactionExecutor:30] 2013-08-19 17:54:29,648 LeveledManifest.java (line 244) At level 1, SSTableReader(path='xxx-Data.db') [DecoratedKey(204853724659241194183955214890519, 30303132343830), DecoratedKey(69227335985728660912035125310473966323, 30393537373332)] overlaps SSTableReader(path='xxx-Data.db') [DecoratedKey(217896711032704014921095870827202, 30333635363932), DecoratedKey(71430242198281555888954138354238066233, 30333035343132)]. This is caused by a bug in Cassandra 1.1.0 .. 1.1.3. Sending back to L0. If you have not yet run scrub, you should do so since you may also have rows out-of-order within an sstable {code} We should send back compacted SSTables to L0 when compacting max SSTables at L0. Also, the above error message is confusing, at version 1.2, we can reduce to WARNing level without mentioning scrub. C* 2.0 performs Size-Tiered compaction on L0 when it has max SSTables and sends back compacted SSTable to L0, so I think we don't need to fix this on 2.0. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5078) save compaction merge counts in a system table
[ https://issues.apache.org/jira/browse/CASSANDRA-5078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13746551#comment-13746551 ] lantao yan commented on CASSANDRA-5078: --- is it because of the CompactionManager compacting compaction_history itself as well. and During this process, there is some issue? save compaction merge counts in a system table -- Key: CASSANDRA-5078 URL: https://issues.apache.org/jira/browse/CASSANDRA-5078 Project: Cassandra Issue Type: Improvement Reporter: Matthew F. Dennis Priority: Minor Labels: lhf Attachments: patch.patch we should save the compaction merge stats from CASSANDRA-4894 in the system table and probably expose them via JMX (and nodetool) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5664) Improve serialization in the native protocol
[ https://issues.apache.org/jira/browse/CASSANDRA-5664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13746560#comment-13746560 ] Daniel Norberg commented on CASSANDRA-5664: --- Yeah, the patches as they are now look good. The stuff I brought up can definitely be iterated on in later patches if desired. Improve serialization in the native protocol Key: CASSANDRA-5664 URL: https://issues.apache.org/jira/browse/CASSANDRA-5664 Project: Cassandra Issue Type: Improvement Reporter: Sylvain Lebresne Assignee: Sylvain Lebresne Priority: Minor Fix For: 2.0 Attachments: 0001-Rewrite-encoding-methods.txt, 0002-Avoid-copy-when-compressing-native-protocol-frames.txt Message serialization in the native protocol currently make a Netty's ChannelBuffers.wrappedBuffer(). The rational was to avoid copying of the values bytes when such value are biggish. This has a cost however, especially with lots of small values, and as suggested in CASSANDRA-5422, this might well be a more common scenario for Cassandra, so let's consider directly serializing in a newly allocated buffer. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5664) Improve serialization in the native protocol
[ https://issues.apache.org/jira/browse/CASSANDRA-5664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13746563#comment-13746563 ] Daniel Norberg commented on CASSANDRA-5664: --- As for figuring out the size of the encoded string without encoding it: http://stackoverflow.com/a/8512877 =) Improve serialization in the native protocol Key: CASSANDRA-5664 URL: https://issues.apache.org/jira/browse/CASSANDRA-5664 Project: Cassandra Issue Type: Improvement Reporter: Sylvain Lebresne Assignee: Sylvain Lebresne Priority: Minor Fix For: 2.0 Attachments: 0001-Rewrite-encoding-methods.txt, 0002-Avoid-copy-when-compressing-native-protocol-frames.txt Message serialization in the native protocol currently make a Netty's ChannelBuffers.wrappedBuffer(). The rational was to avoid copying of the values bytes when such value are biggish. This has a cost however, especially with lots of small values, and as suggested in CASSANDRA-5422, this might well be a more common scenario for Cassandra, so let's consider directly serializing in a newly allocated buffer. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5907) Leveled compaction may cause overlap in L1 when L0 compaction get behind
[ https://issues.apache.org/jira/browse/CASSANDRA-5907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13746567#comment-13746567 ] Jeremiah Jordan commented on CASSANDRA-5907: Reading the patch 10 times, I think that logic is right to skip doing parallel L0 compactions if there is any overlap. Leveled compaction may cause overlap in L1 when L0 compaction get behind Key: CASSANDRA-5907 URL: https://issues.apache.org/jira/browse/CASSANDRA-5907 Project: Cassandra Issue Type: Bug Reporter: Yuki Morishita Assignee: Yuki Morishita Priority: Minor Fix For: 1.2.9 Attachments: 5907-1.2.txt 1.2 makes LCS run parallel, though if L0 compaction get far behind and concurrent compactions at L0 where each compaction holds maximum number of SSTable to compact at L0(32), it will likely cause overlap in L1. There will be ERROR log as follows: {code} ERROR [CompactionExecutor:30] 2013-08-19 17:54:29,648 LeveledManifest.java (line 244) At level 1, SSTableReader(path='xxx-Data.db') [DecoratedKey(204853724659241194183955214890519, 30303132343830), DecoratedKey(69227335985728660912035125310473966323, 30393537373332)] overlaps SSTableReader(path='xxx-Data.db') [DecoratedKey(217896711032704014921095870827202, 30333635363932), DecoratedKey(71430242198281555888954138354238066233, 30333035343132)]. This is caused by a bug in Cassandra 1.1.0 .. 1.1.3. Sending back to L0. If you have not yet run scrub, you should do so since you may also have rows out-of-order within an sstable {code} We should send back compacted SSTables to L0 when compacting max SSTables at L0. Also, the above error message is confusing, at version 1.2, we can reduce to WARNing level without mentioning scrub. C* 2.0 performs Size-Tiered compaction on L0 when it has max SSTables and sends back compacted SSTable to L0, so I think we don't need to fix this on 2.0. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (CASSANDRA-5916) gossip and tokenMetadata get hostId out of sync on failed replace_node
Brandon Williams created CASSANDRA-5916: --- Summary: gossip and tokenMetadata get hostId out of sync on failed replace_node Key: CASSANDRA-5916 URL: https://issues.apache.org/jira/browse/CASSANDRA-5916 Project: Cassandra Issue Type: Bug Reporter: Brandon Williams Assignee: Brandon Williams Fix For: 1.2.9 If you try to replace_node an existing, live hostId, it will error out. However if you're using an existing IP to do this (as in, you chose the wrong uuid to replace on accident) then the newly generated hostId wipes out the old one in TMD, and when you do try to replace it replace_node will complain it does not exist. Examination of gossipinfo still shows the old hostId, however now you can't replace it either. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5664) Improve serialization in the native protocol
[ https://issues.apache.org/jira/browse/CASSANDRA-5664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13746575#comment-13746575 ] Jonathan Ellis commented on CASSANDRA-5664: --- We've been using TypeSizes.encodedUTF8Length for a while in inter-node serialization. Improve serialization in the native protocol Key: CASSANDRA-5664 URL: https://issues.apache.org/jira/browse/CASSANDRA-5664 Project: Cassandra Issue Type: Improvement Reporter: Sylvain Lebresne Assignee: Sylvain Lebresne Priority: Minor Fix For: 2.0 Attachments: 0001-Rewrite-encoding-methods.txt, 0002-Avoid-copy-when-compressing-native-protocol-frames.txt Message serialization in the native protocol currently make a Netty's ChannelBuffers.wrappedBuffer(). The rational was to avoid copying of the values bytes when such value are biggish. This has a cost however, especially with lots of small values, and as suggested in CASSANDRA-5422, this might well be a more common scenario for Cassandra, so let's consider directly serializing in a newly allocated buffer. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5916) gossip and tokenMetadata get hostId out of sync on failed replace_node
[ https://issues.apache.org/jira/browse/CASSANDRA-5916?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13746595#comment-13746595 ] Brandon Williams commented on CASSANDRA-5916: - The problem runs a little deeper, too: even if you specify the right uuid, and the replace fails for whatever reason, now they're out of sync again and you can't do the replace at all. gossip and tokenMetadata get hostId out of sync on failed replace_node -- Key: CASSANDRA-5916 URL: https://issues.apache.org/jira/browse/CASSANDRA-5916 Project: Cassandra Issue Type: Bug Reporter: Brandon Williams Assignee: Brandon Williams Fix For: 1.2.9 If you try to replace_node an existing, live hostId, it will error out. However if you're using an existing IP to do this (as in, you chose the wrong uuid to replace on accident) then the newly generated hostId wipes out the old one in TMD, and when you do try to replace it replace_node will complain it does not exist. Examination of gossipinfo still shows the old hostId, however now you can't replace it either. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-4952) Add blocking force compaction (and anything else) calls to NodeProbe
[ https://issues.apache.org/jira/browse/CASSANDRA-4952?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jonathan Ellis updated CASSANDRA-4952: -- Attachment: 4952.txt You're right. Patch attached to bring user-defined compactions into compliance w/ the others. Add blocking force compaction (and anything else) calls to NodeProbe Key: CASSANDRA-4952 URL: https://issues.apache.org/jira/browse/CASSANDRA-4952 Project: Cassandra Issue Type: Improvement Components: Core Affects Versions: 1.1.6 Reporter: Michael Harris Priority: Minor Labels: lhf Attachments: 4952.txt There are times when I'd like to get feedback about when compactions complete. For example, if I'm deleting data from cassandra and want to know when it is 100% removed from cassandra (tombstones collected and all). This is completely trivial to implement based on the existing code (the method called by the non-blocking version returns a future, so you could just wait on that, potentially with a timeout). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Reopened] (CASSANDRA-4952) Add blocking force compaction (and anything else) calls to NodeProbe
[ https://issues.apache.org/jira/browse/CASSANDRA-4952?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jonathan Ellis reopened CASSANDRA-4952: --- Add blocking force compaction (and anything else) calls to NodeProbe Key: CASSANDRA-4952 URL: https://issues.apache.org/jira/browse/CASSANDRA-4952 Project: Cassandra Issue Type: Improvement Components: Core Affects Versions: 1.1.6 Reporter: Michael Harris Priority: Minor Labels: lhf There are times when I'd like to get feedback about when compactions complete. For example, if I'm deleting data from cassandra and want to know when it is 100% removed from cassandra (tombstones collected and all). This is completely trivial to implement based on the existing code (the method called by the non-blocking version returns a future, so you could just wait on that, potentially with a timeout). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5903) Integer overflow in OffHeapBitSet when bloomfilter 2GB
[ https://issues.apache.org/jira/browse/CASSANDRA-5903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13746598#comment-13746598 ] Vijay commented on CASSANDRA-5903: -- Thanks Taylan, I will writeup a test case for it... The patch on 1.2 (0002) should handle up to 2GB * 8 over which we might want to serialize and deserialize into long for 2.1. Integer overflow in OffHeapBitSet when bloomfilter 2GB Key: CASSANDRA-5903 URL: https://issues.apache.org/jira/browse/CASSANDRA-5903 Project: Cassandra Issue Type: Bug Components: Core Reporter: Taylan Develioglu Assignee: Vijay Labels: patch Fix For: 1.2.9 Attachments: 0001-CASSANDRA-5903.patch, 0002-CASSANDRA-5903.patch In org.apache.cassandra.utils.obs.OffHeapBitSet. byteCount overflows and causes an IllegalArgument exception in Memory.allocate when bloomfilter is 2GB. Suggest changing byteCount to long. {code:title=OffHeapBitSet.java} public OffHeapBitSet(long numBits) { // OpenBitSet.bits2words calculation is there for backward compatibility. int byteCount = OpenBitSet.bits2words(numBits) * 8; bytes = RefCountedMemory.allocate(byteCount); // flush/clear the existing memory. clear(); } {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-5915) node flapping prevents replace_node from succeeding consistently
[ https://issues.apache.org/jira/browse/CASSANDRA-5915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13746604#comment-13746604 ] Brandon Williams commented on CASSANDRA-5915: - I'm confused by how this worked at all the second time, because I encountered CASSANDRA-5916 in all attempts. But I'm also confused how you can be missing the STATUS state, since a failed replace won't cause this, it will just leave the node with STATUS:hibernate,true. That said, I think the right path is why are things flapping so much since bootstrap already waits for RING_DELAY for things to stabilize, which at 30s should be plenty of time on any competent network. (And it's worth noting you can override ring delay next time if you need to wait longer.) node flapping prevents replace_node from succeeding consistently Key: CASSANDRA-5915 URL: https://issues.apache.org/jira/browse/CASSANDRA-5915 Project: Cassandra Issue Type: Bug Components: Core Environment: 1.2.8 Reporter: Chris Burroughs Attachments: cassandra.log.gz A node was down for a week or two due to hardware disk failure. I tried to use replace_node to bring up a new node on the same physical host with the same IPs. (rbranson suspected that using the same IP may be more issue prone.) This failed due to unable to find sufficient sources for streaming range See CASSANDRA-5913 for a problem with how the failure was handled by gossip. All of the other nodes should have been up the entire time, but when this node came up it saw nodes flap up and down for quiet some time. I was eventually able to get replace_token to work by adding a 60 (!) second sleep to StorageService:bootstrap. I don't know if the right path is why are things flapping so much or bootstrap should wait until things look stable. A few notes about the cluster: * 2 dc cluster (about 20 each), using GossipingPropertyFileSnitch * multi-dc no vpn setup: http://mail-archives.apache.org/mod_mbox/cassandra-user/201306.mbox/%3c51bf5c79.7020...@gmail.com%3E Startup log from the successful (with sleep) replace_node attached. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[02/10] git commit: use long math on deserialize as well patch by Taylan Develioglu; reviewed by jbellis for CASSANDRA-5903
use long math on deserialize as well patch by Taylan Develioglu; reviewed by jbellis for CASSANDRA-5903 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/572cddc3 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/572cddc3 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/572cddc3 Branch: refs/heads/cassandra-2.0.0 Commit: 572cddc3008780a1ea08ffaaa468821e42ab7100 Parents: dd65e88 Author: Jonathan Ellis jbel...@apache.org Authored: Wed Aug 21 12:30:08 2013 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Aug 21 12:30:29 2013 -0500 -- src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/572cddc3/src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java -- diff --git a/src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java b/src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java index b7bb733..fb32043 100644 --- a/src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java +++ b/src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java @@ -119,9 +119,9 @@ public class OffHeapBitSet implements IBitSet public static OffHeapBitSet deserialize(DataInput dis) throws IOException { -int byteCount = dis.readInt() * 8; +long byteCount = dis.readInt() * 8L; Memory memory = RefCountedMemory.allocate(byteCount); -for (int i = 0; i byteCount;) +for (long i = 0; i byteCount;) { long v = dis.readLong(); memory.setByte(i++, (byte) (v 0));
[07/10] git commit: merge from 1.2
merge from 1.2 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/9dc4c16d Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/9dc4c16d Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/9dc4c16d Branch: refs/heads/trunk Commit: 9dc4c16d7e535eaed36ad112986304812d6147be Parents: c8b220b 572cddc Author: Jonathan Ellis jbel...@apache.org Authored: Wed Aug 21 12:31:17 2013 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Aug 21 12:31:17 2013 -0500 -- src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/9dc4c16d/src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java -- diff --cc src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java index 2f5e5ca,fb32043..438d90f --- a/src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java +++ b/src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java @@@ -117,13 -117,13 +117,13 @@@ public class OffHeapBitSet implements I return type.sizeof((int) bytes.size()) + bytes.size(); } -public static OffHeapBitSet deserialize(DataInput dis) throws IOException +public static OffHeapBitSet deserialize(DataInput in) throws IOException { - int byteCount = in.readInt() * 8; -long byteCount = dis.readInt() * 8L; ++long byteCount = in.readInt() * 8L; Memory memory = RefCountedMemory.allocate(byteCount); - for (int i = 0; i byteCount;) + for (long i = 0; i byteCount;) { -long v = dis.readLong(); +long v = in.readLong(); memory.setByte(i++, (byte) (v 0)); memory.setByte(i++, (byte) (v 8)); memory.setByte(i++, (byte) (v 16));
[09/10] git commit: Merge branch 'cassandra-2.0.0' into cassandra-2.0
Merge branch 'cassandra-2.0.0' into cassandra-2.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/9e296196 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/9e296196 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/9e296196 Branch: refs/heads/cassandra-2.0 Commit: 9e2961964e8b6129ff03fd066951fcad3be12742 Parents: b362aeb 9dc4c16 Author: Jonathan Ellis jbel...@apache.org Authored: Wed Aug 21 12:31:42 2013 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Aug 21 12:31:42 2013 -0500 -- src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --
[08/10] git commit: Merge branch 'cassandra-2.0.0' into cassandra-2.0
Merge branch 'cassandra-2.0.0' into cassandra-2.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/9e296196 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/9e296196 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/9e296196 Branch: refs/heads/trunk Commit: 9e2961964e8b6129ff03fd066951fcad3be12742 Parents: b362aeb 9dc4c16 Author: Jonathan Ellis jbel...@apache.org Authored: Wed Aug 21 12:31:42 2013 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Aug 21 12:31:42 2013 -0500 -- src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --
[10/10] git commit: Merge branch 'cassandra-2.0' into trunk
Merge branch 'cassandra-2.0' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/487e3de0 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/487e3de0 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/487e3de0 Branch: refs/heads/trunk Commit: 487e3de0559df55d99132814e9c06aa458a23748 Parents: 0da21de 9e29619 Author: Jonathan Ellis jbel...@apache.org Authored: Wed Aug 21 12:31:50 2013 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Aug 21 12:31:50 2013 -0500 -- src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --
[04/10] git commit: use long math on deserialize as well patch by Taylan Develioglu; reviewed by jbellis for CASSANDRA-5903
use long math on deserialize as well patch by Taylan Develioglu; reviewed by jbellis for CASSANDRA-5903 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/572cddc3 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/572cddc3 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/572cddc3 Branch: refs/heads/trunk Commit: 572cddc3008780a1ea08ffaaa468821e42ab7100 Parents: dd65e88 Author: Jonathan Ellis jbel...@apache.org Authored: Wed Aug 21 12:30:08 2013 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Aug 21 12:30:29 2013 -0500 -- src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/572cddc3/src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java -- diff --git a/src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java b/src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java index b7bb733..fb32043 100644 --- a/src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java +++ b/src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java @@ -119,9 +119,9 @@ public class OffHeapBitSet implements IBitSet public static OffHeapBitSet deserialize(DataInput dis) throws IOException { -int byteCount = dis.readInt() * 8; +long byteCount = dis.readInt() * 8L; Memory memory = RefCountedMemory.allocate(byteCount); -for (int i = 0; i byteCount;) +for (long i = 0; i byteCount;) { long v = dis.readLong(); memory.setByte(i++, (byte) (v 0));