[jira] [Commented] (CASSANDRA-10079) LEAK DETECTED, after nodetool drain

2015-10-20 Thread Marcus Eriksson (JIRA)

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

Marcus Eriksson commented on CASSANDRA-10079:
-

+1

> LEAK DETECTED, after nodetool drain
> ---
>
> Key: CASSANDRA-10079
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10079
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Sebastian Estevez
>Assignee: Yuki Morishita
> Fix For: 2.1.x
>
>
> 6 node cluster running 2.1.8
> Sequence of events:
> {quote}
> 2015-08-14 13:37:07,049 - Drain the node
> 2015-08-14 13:37:11,943 - Drained
> 2015-08-14 13:37:37,055 Ref.java:179 - LEAK DETECTED:
> {quote}
> {code}
> ERROR [Reference-Reaper:1] 2015-08-14 13:37:37,055 Ref.java:179 - LEAK 
> DETECTED: a reference 
> (org.apache.cassandra.utils.concurrent.Ref$State@5534701) to class 
> org.apache.cassandra.utils.concurrent.WrappedSharedCloseable$1@194296283:[[OffHeapBitSet]]
>  was not released before the reference was garbage collected
> ERROR [Reference-Reaper:1] 2015-08-14 13:37:37,057 Ref.java:179 - LEAK 
> DETECTED: a reference 
> (org.apache.cassandra.utils.concurrent.Ref$State@fab2c71) to class 
> org.apache.cassandra.io.util.MmappedSegmentedFile$Cleanup@1252635616:/var/lib/cassandra/data/metric/metric-811fa5402a3b11e5a2c0870545c0f352/metric-metric-ka-6883-Index.db
>  was not released before the reference was garbage collected
> ERROR [Reference-Reaper:1] 2015-08-14 13:37:37,057 Ref.java:179 - LEAK 
> DETECTED: a reference 
> (org.apache.cassandra.utils.concurrent.Ref$State@555d8efb) to class 
> org.apache.cassandra.io.util.MmappedSegmentedFile$Cleanup@1252635616:/var/lib/cassandra/data/metric/metric-811fa5402a3b11e5a2c0870545c0f352/metric-metric-ka-6883-Index.db
>  was not released before the reference was garbage collected
> ERROR [Reference-Reaper:1] 2015-08-14 13:37:37,057 Ref.java:179 - LEAK 
> DETECTED: a reference 
> (org.apache.cassandra.utils.concurrent.Ref$State@7b29bfea) to class 
> org.apache.cassandra.io.util.MmappedSegmentedFile$Cleanup@1252635616:/var/lib/cassandra/data/metric/metric-811fa5402a3b11e5a2c0870545c0f352/metric-metric-ka-6883-Index.db
>  was not released before the reference was garbage collected
> ERROR [Reference-Reaper:1] 2015-08-14 13:37:37,057 Ref.java:179 - LEAK 
> DETECTED: a reference 
> (org.apache.cassandra.utils.concurrent.Ref$State@2d37dc5a) to class 
> org.apache.cassandra.utils.concurrent.WrappedSharedCloseable$1@713444527:[[OffHeapBitSet]]
>  was not released before the reference was garbage collected
> ERROR [Reference-Reaper:1] 2015-08-14 13:37:37,057 Ref.java:179 - LEAK 
> DETECTED: a reference 
> (org.apache.cassandra.utils.concurrent.Ref$State@13153552) to class 
> org.apache.cassandra.utils.concurrent.WrappedSharedCloseable$1@713444527:[[OffHeapBitSet]]
>  was not released before the reference was garbage collected
> ERROR [Reference-Reaper:1] 2015-08-14 13:37:37,057 Ref.java:179 - LEAK 
> DETECTED: a reference 
> (org.apache.cassandra.utils.concurrent.Ref$State@25f51e35) to class 
> org.apache.cassandra.utils.concurrent.WrappedSharedCloseable$1@713444527:[[OffHeapBitSet]]
>  was not released before the reference was garbage collected
> ERROR [Reference-Reaper:1] 2015-08-14 13:37:37,057 Ref.java:179 - LEAK 
> DETECTED: a reference 
> (org.apache.cassandra.utils.concurrent.Ref$State@3633d3dd) to class 
> org.apache.cassandra.utils.concurrent.WrappedSharedCloseable$1@194296283:[[OffHeapBitSet]]
>  was not released before the reference was garbage collected
> ERROR [Reference-Reaper:1] 2015-08-14 13:37:37,057 Ref.java:179 - LEAK 
> DETECTED: a reference 
> (org.apache.cassandra.utils.concurrent.Ref$State@2ec81280) to class 
> org.apache.cassandra.utils.concurrent.WrappedSharedCloseable$1@194296283:[[OffHeapBitSet]]
>  was not released before the reference was garbage collected
> ERROR [Reference-Reaper:1] 2015-08-14 13:37:37,058 Ref.java:179 - LEAK 
> DETECTED: a reference 
> (org.apache.cassandra.utils.concurrent.Ref$State@144d1dae) to class 
> org.apache.cassandra.utils.concurrent.WrappedSharedCloseable$1@194296283:[[OffHeapBitSet]]
>  was not released before the reference was garbage collected
> ERROR [Reference-Reaper:1] 2015-08-14 13:37:37,058 Ref.java:179 - LEAK 
> DETECTED: a reference 
> (org.apache.cassandra.utils.concurrent.Ref$State@1944bda4) to class 
> org.apache.cassandra.utils.concurrent.WrappedSharedCloseable$1@194296283:[[OffHeapBitSet]]
>  was not released before the reference was garbage collected
> ERROR [Reference-Reaper:1] 2015-08-14 13:37:37,058 Ref.java:179 - LEAK 
> DETECTED: a reference 
> (org.apache.cassandra.utils.concurrent.Ref$State@31c1386a) to class 
> org.apache.cassandra.io.util.MmappedSegmentedFile$Cleanup@1601396928:/var/lib/cassandra/data/metric/metric-811fa5402a3b11e5a2c0870545c0f352/met

[jira] [Reopened] (CASSANDRA-10415) Fix cqlsh bugs

2015-10-20 Thread Jeremiah Jordan (JIRA)

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

Jeremiah Jordan reopened CASSANDRA-10415:
-

> Fix cqlsh bugs
> --
>
> Key: CASSANDRA-10415
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10415
> Project: Cassandra
>  Issue Type: Sub-task
>Reporter: Jim Witschey
>Assignee: Stefania
>  Labels: cqlsh
> Fix For: 3.0.0 rc2, 2.2.4, 2.1.12
>
>
> This is followup to CASSANDRA-10289
> The tests currently failing should be:
> * 
> {{cqlshlib.test.test_cqlsh_completion.TestCqlshCompletion.test_complete_in_create_columnfamily}}
> ** uses {{create_columnfamily_table_template}}. Stefania says "the {{(}} 
> after {{CREATE ... IF}} does not look valid to me."
> * 
> {{cqlshlib.test.test_cqlsh_completion.TestCqlshCompletion.test_complete_in_create_table}}
> ** uses {{create_columnfamily_table_template}}, see above.
> * 
> {{cqlshlib.test.test_cqlsh_completion.TestCqlshCompletion.test_complete_in_delete}}
> ** Stefania says: "I don't think keyspaces are a valid completion after 
> {{DELETE a [}} and after {{DELETE FROM twenty_rows_composite_table USING 
> TIMESTAMP 0 WHERE TOKEN(a) >=}}. From a quick analysis of {{cqlhandling.py}} 
> I think it comes from {{}}, which picks up {{}}, which 
> was changed to include {{ks.}} by CASSANDRA-7556.
> * 
> {{cqlshlib.test.test_cqlsh_completion.TestCqlshCompletion.test_complete_in_drop_keyspace}}
> ** Stefania says: "the {{;}} after {{DROP KEYSPACE IF}} is not valid.
> * {{cqlshlib.test.test_cqlsh_output.TestCqlshOutput.test_timestamp_output}}
> ** already documented with CASSANDRA-10313 and CASSANDRA-10397
> I'm happy to break these out into separate tickets if necessary. 
> To run the tests locally, I cd to {{cassandra/pylib/cqlshlib}} and run the 
> following:
> {code}
> ccm create -n 1 --install-dir=../.. test
> ccm start --wait-for-binary-proto
> nosetests test 2>&1
> ccm remove
> {code}
> This requires nose and ccm. Until CASSANDRA-10289 is resolved, you'll have to 
> use my branch here: https://github.com/mambocab/cassandra/tree/fix-cqlsh-tests
> Tests for this branch are run (non-continuously) here:
> http://cassci.datastax.com/job/scratch_mambocab-fix_cqlsh/
> Assigning [~Stefania] for now, since she's already looked at 10289, but feel 
> free to reassign.



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


[jira] [Comment Edited] (CASSANDRA-10415) Fix cqlsh bugs

2015-10-20 Thread Jeremiah Jordan (JIRA)

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

Jeremiah Jordan edited comment on CASSANDRA-10415 at 10/21/15 3:03 AM:
---

This change forces users to need python 2.7 to run cqlsh.  Please change 

{noformat}
syntax = ' ::= /(' + '|'.join(r'\b{}\b'.format(k) for k in 
keywords) + ')/ ;'
{noformat}

To not use a zero length field name in format.


was (Author: jjordan):
This change forces users to need python 2.7 to run cqlsh.  Please change 

{noformat}
syntax = ' ::= /(' + '|'.join(r'\b{}\b'.format(k) for k in 
keywords) + ')/ ;'
{no format}

To not use a zero length field name in format.

> Fix cqlsh bugs
> --
>
> Key: CASSANDRA-10415
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10415
> Project: Cassandra
>  Issue Type: Sub-task
>Reporter: Jim Witschey
>Assignee: Stefania
>  Labels: cqlsh
> Fix For: 3.0.0 rc2, 2.2.4, 2.1.12
>
>
> This is followup to CASSANDRA-10289
> The tests currently failing should be:
> * 
> {{cqlshlib.test.test_cqlsh_completion.TestCqlshCompletion.test_complete_in_create_columnfamily}}
> ** uses {{create_columnfamily_table_template}}. Stefania says "the {{(}} 
> after {{CREATE ... IF}} does not look valid to me."
> * 
> {{cqlshlib.test.test_cqlsh_completion.TestCqlshCompletion.test_complete_in_create_table}}
> ** uses {{create_columnfamily_table_template}}, see above.
> * 
> {{cqlshlib.test.test_cqlsh_completion.TestCqlshCompletion.test_complete_in_delete}}
> ** Stefania says: "I don't think keyspaces are a valid completion after 
> {{DELETE a [}} and after {{DELETE FROM twenty_rows_composite_table USING 
> TIMESTAMP 0 WHERE TOKEN(a) >=}}. From a quick analysis of {{cqlhandling.py}} 
> I think it comes from {{}}, which picks up {{}}, which 
> was changed to include {{ks.}} by CASSANDRA-7556.
> * 
> {{cqlshlib.test.test_cqlsh_completion.TestCqlshCompletion.test_complete_in_drop_keyspace}}
> ** Stefania says: "the {{;}} after {{DROP KEYSPACE IF}} is not valid.
> * {{cqlshlib.test.test_cqlsh_output.TestCqlshOutput.test_timestamp_output}}
> ** already documented with CASSANDRA-10313 and CASSANDRA-10397
> I'm happy to break these out into separate tickets if necessary. 
> To run the tests locally, I cd to {{cassandra/pylib/cqlshlib}} and run the 
> following:
> {code}
> ccm create -n 1 --install-dir=../.. test
> ccm start --wait-for-binary-proto
> nosetests test 2>&1
> ccm remove
> {code}
> This requires nose and ccm. Until CASSANDRA-10289 is resolved, you'll have to 
> use my branch here: https://github.com/mambocab/cassandra/tree/fix-cqlsh-tests
> Tests for this branch are run (non-continuously) here:
> http://cassci.datastax.com/job/scratch_mambocab-fix_cqlsh/
> Assigning [~Stefania] for now, since she's already looked at 10289, but feel 
> free to reassign.



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


[jira] [Commented] (CASSANDRA-10415) Fix cqlsh bugs

2015-10-20 Thread Jeremiah Jordan (JIRA)

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

Jeremiah Jordan commented on CASSANDRA-10415:
-

This change forces users to need python 2.7 to run cqlsh.  Please change 

{noformat}
syntax = ' ::= /(' + '|'.join(r'\b{}\b'.format(k) for k in 
keywords) + ')/ ;'
{no format}

To not use a zero length field name in format.

> Fix cqlsh bugs
> --
>
> Key: CASSANDRA-10415
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10415
> Project: Cassandra
>  Issue Type: Sub-task
>Reporter: Jim Witschey
>Assignee: Stefania
>  Labels: cqlsh
> Fix For: 3.0.0 rc2, 2.2.4, 2.1.12
>
>
> This is followup to CASSANDRA-10289
> The tests currently failing should be:
> * 
> {{cqlshlib.test.test_cqlsh_completion.TestCqlshCompletion.test_complete_in_create_columnfamily}}
> ** uses {{create_columnfamily_table_template}}. Stefania says "the {{(}} 
> after {{CREATE ... IF}} does not look valid to me."
> * 
> {{cqlshlib.test.test_cqlsh_completion.TestCqlshCompletion.test_complete_in_create_table}}
> ** uses {{create_columnfamily_table_template}}, see above.
> * 
> {{cqlshlib.test.test_cqlsh_completion.TestCqlshCompletion.test_complete_in_delete}}
> ** Stefania says: "I don't think keyspaces are a valid completion after 
> {{DELETE a [}} and after {{DELETE FROM twenty_rows_composite_table USING 
> TIMESTAMP 0 WHERE TOKEN(a) >=}}. From a quick analysis of {{cqlhandling.py}} 
> I think it comes from {{}}, which picks up {{}}, which 
> was changed to include {{ks.}} by CASSANDRA-7556.
> * 
> {{cqlshlib.test.test_cqlsh_completion.TestCqlshCompletion.test_complete_in_drop_keyspace}}
> ** Stefania says: "the {{;}} after {{DROP KEYSPACE IF}} is not valid.
> * {{cqlshlib.test.test_cqlsh_output.TestCqlshOutput.test_timestamp_output}}
> ** already documented with CASSANDRA-10313 and CASSANDRA-10397
> I'm happy to break these out into separate tickets if necessary. 
> To run the tests locally, I cd to {{cassandra/pylib/cqlshlib}} and run the 
> following:
> {code}
> ccm create -n 1 --install-dir=../.. test
> ccm start --wait-for-binary-proto
> nosetests test 2>&1
> ccm remove
> {code}
> This requires nose and ccm. Until CASSANDRA-10289 is resolved, you'll have to 
> use my branch here: https://github.com/mambocab/cassandra/tree/fix-cqlsh-tests
> Tests for this branch are run (non-continuously) here:
> http://cassci.datastax.com/job/scratch_mambocab-fix_cqlsh/
> Assigning [~Stefania] for now, since she's already looked at 10289, but feel 
> free to reassign.



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


[jira] [Updated] (CASSANDRA-10470) Fix upgrade_tests.cql_tests/TestCQL/counters_test dtest

2015-10-20 Thread Paulo Motta (JIRA)

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

Paulo Motta updated CASSANDRA-10470:

Priority: Critical  (was: Major)

> Fix upgrade_tests.cql_tests/TestCQL/counters_test dtest
> ---
>
> Key: CASSANDRA-10470
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10470
> Project: Cassandra
>  Issue Type: Sub-task
>Reporter: Jim Witschey
>Assignee: Paulo Motta
>Priority: Critical
> Fix For: 3.0.0
>
>
> This test fails on CassCI:
> http://cassci.datastax.com/view/Upgrades/job/storage_engine_upgrade_dtest-22_tarball-30_HEAD/44/testReport/upgrade_tests.cql_tests/TestCQL/counters_test/
> Once [this dtest PR|https://github.com/riptano/cassandra-dtest/pull/586] is 
> merged, these tests should also run with this upgrade path on normal 3.0 
> jobs. Until then, you can run it with the following command:
> {code}
> SKIP=false CASSANDRA_VERSION=binary:2.2.0 UPGRADE_TO=git:cassandra-3.0 
> nosetests 2>&1 upgrade_tests/cql_tests.py:TestCQL.counters_test
> {code}



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


[jira] [Commented] (CASSANDRA-10258) Counter table written with CQLSSTableWriter generates exceptions and become corrupted at first use

2015-10-20 Thread Paulo Motta (JIRA)

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

Paulo Motta commented on CASSANDRA-10258:
-

I was able to reproduce the issue above with a simple [test 
case|https://github.com/apache/cassandra/commit/24ab53e4b3b6512488b9ba119f777a84ebd6fa0b]
 on Cassandra 2.1.

The problem is that {{CQLSSTableWriter}} serializes {{CounterUpdateCell}} 
objects without being applied by a counter leader replica, so they cannot be 
reconciled with ordinary {{CounterCell}} objects during reads/compactions. 
Another limitation with {{CQLSStableWriter}} and counters on 2.1, is that 
multiple counter updates to the same partition are not coalesced by 
{{CQLSSTableWriter}}, so only the last counter update is applied.

Surprisingly enough, on 3.0, it's not possible to reproduce this issue, because 
CASSANDRA-8099 abolished the {{CounterUpdateCells}} altogether, so 
{{CQLSSTableWriter}} counter cells are treated as remote shards during 
reconcile. Furthermore, the {{PartitionUpdate}} abstraction, also introduced by 
CASSANDRA-8099, merges all updates to the same partition before serialization 
on {{CQLSSTableWriter}}, so multiple updates to the same partition are indeed 
coalesced on 3.0.

We could fix the 2.1 behavior by special-casing the counter cell creation on 
{{UpdateParameters.addCounter()}} when {{Config.isClientMode()}} (an indication 
that the {{CQLSStableWriter}} is running) and creating a remote {{CounterCell}} 
instead, as done [in this commented 
block|https://github.com/apache/cassandra/blob/5449ad7b7e1b1930c07e0ea80ac3c3e2882633b5/src/java/org/apache/cassandra/cql3/UpdateParameters.java#L79].
 This would mimic the 3.0 behavior and treat {{CQLSStableWriter}} counters as a 
remote shard.

A hidden nit in this solution (and also on 3.0) is that a remote counter 
context is created for each {{CQLSSTableWriter}} session that updates counters, 
and afaik we currently have no way of discarding old counter contexts. So, new 
counter contexts created by {{CQLSStableWriter}} can potentially grow 
unbounded, what could affect performance significantly. Maybe after 
CASSANDRA-6506 we will be able to discard "inactive" counter contexts, and be 
able to support counters on {{CQLSStableWriter}} more efficiently.

While we don't have a solution for cleaning inactive/temporary counter 
contexts, I propose we disable counters usage by default on 
{{CQLSSTableWriter}}, or at least make it harder to use (with a flag/warning, 
for instance), since it might still be useful for testing scenarios. What do 
you think [~slebresne], [~iamaleksey]? Do you see a better alternative?

> Counter table written with CQLSSTableWriter generates exceptions and become 
> corrupted at first use
> --
>
> Key: CASSANDRA-10258
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10258
> Project: Cassandra
>  Issue Type: Bug
>  Components: API
> Environment: Linux Debian Wheezie 7.8 / Oracle Java 1.7.0_67
> Ubuntu 14.04.3 LTS / Oracle Java 1.7.0_75
> Cassandra 2.0.12 2.1.5 2.1.8
>Reporter: Guillaume VIEL
>Assignee: Paulo Motta
> Fix For: 2.1.x
>
>
> We use CQLSStableWriter to produce testing datasets.
> Here are the steps to reproduce this issue :
> 1) definition of a table with counter
> {code}
> CREATE TABLE my_counter (
>   my_id text,
>   my_counter counter,
>   PRIMARY KEY (my_id)
> )
> {code}
> 2) with CQLSSTableWriter initialize this table (about 2millions entries) with 
> this insert order (one insert / key only)
> {{UPDATE myks.my_counter SET my_counter = my_counter + ? WHERE my_id = ?}}
> 3) load the files written by CQLSSTableWriter with sstableloader in your 
> cassandra cluster (tested on a single node and a 3 nodes cluster)
> 4) start a process that updates the counters (we used 3millions entries 
> distributed on the key my_id)
> 5) after a while try to query a key in the my_counter table
> {{cqlsh:myks> select * from my_counter where my_id='001';}}
> Request did not complete within rpc_timeout.
> In the logs of cassandra (2.0.12) :
> {code}
> ERROR [CompactionExecutor:3] 2015-05-28 15:53:39,491 CassandraDaemon.java 
> (line 258) Exception in thread Thread[CompactionExecutor:3,1,main]
> java.lang.AssertionError: Wrong class type.
> at 
> org.apache.cassandra.db.CounterUpdateColumn.reconcile(CounterUpdateColumn.java:70)
> at 
> org.apache.cassandra.db.ArrayBackedSortedColumns.resolveAgainst(ArrayBackedSortedColumns.java:147)
> at 
> org.apache.cassandra.db.ArrayBackedSortedColumns.addColumn(ArrayBackedSortedColumns.java:126)
> at 
> org.apache.cassandra.db.ColumnFamily.addColumn(ColumnFamily.java:121)
> at 
> org.apache.cassandra.db.

[jira] [Commented] (CASSANDRA-10242) Validate rack information on startup

2015-10-20 Thread Jeremiah Jordan (JIRA)

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

Jeremiah Jordan commented on CASSANDRA-10242:
-

The yaml/properties/news entries about this should probably say 
"decommissioned" not "wiped".  Someone is going to read that wrong and lose 
data.

> Validate rack information on startup
> 
>
> Key: CASSANDRA-10242
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10242
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Jonathan Ellis
>Assignee: Carl Yeksigian
> Fix For: 3.0.0 rc2, 2.2.4, 2.1.12
>
>
> Moving to a new rack means that different data should be stored on a node.  
> We already persist rack information in a system table; we should fail startup 
> if this doesn't match what the snitch thinks it should be.  (Either the 
> snitch is wrong, and needs to be fixed, or the machine has been moved and 
> needs to be rebootstrapped.)



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


[jira] [Commented] (CASSANDRA-8895) Compressed sstables should only compress if the win is above a certain threshold, and should use a variable block size

2015-10-20 Thread Jeff Jirsa (JIRA)

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

Jeff Jirsa commented on CASSANDRA-8895:
---

On the variable chunk size: explicit compression chunk size allows an operator 
to balance between performance and compression ratios, where they can drop 
block size to be much smaller for faster reads, or increase it to save disk 
usage (larger chunks = better ratios). We manually balance this - assessing 
exactly those tradeoffs - on clusters today, and I would be sad to see that 
turned into magic under the hood. I would encourage the project to let 
operators decide what compression chunk size they want, imo.

> Compressed sstables should only compress if the win is above a certain 
> threshold, and should use a variable block size
> --
>
> Key: CASSANDRA-8895
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8895
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Benedict
>Assignee: Paulo Motta
>  Labels: performance
> Fix For: 3.x
>
>
> On performing a flush to disk, we should assess if the data we're flushing 
> will actually be substantively compressed, and how large the page should be 
> to get optimal compression ratio versus read latency. Decompressing 64Kb 
> chunks is wasteful when reading small records.



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


[jira] [Updated] (CASSANDRA-10079) LEAK DETECTED, after nodetool drain

2015-10-20 Thread Yuki Morishita (JIRA)

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

Yuki Morishita updated CASSANDRA-10079:
---
Reviewer: Marcus Eriksson

> LEAK DETECTED, after nodetool drain
> ---
>
> Key: CASSANDRA-10079
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10079
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Sebastian Estevez
>Assignee: Yuki Morishita
> Fix For: 2.1.x
>
>
> 6 node cluster running 2.1.8
> Sequence of events:
> {quote}
> 2015-08-14 13:37:07,049 - Drain the node
> 2015-08-14 13:37:11,943 - Drained
> 2015-08-14 13:37:37,055 Ref.java:179 - LEAK DETECTED:
> {quote}
> {code}
> ERROR [Reference-Reaper:1] 2015-08-14 13:37:37,055 Ref.java:179 - LEAK 
> DETECTED: a reference 
> (org.apache.cassandra.utils.concurrent.Ref$State@5534701) to class 
> org.apache.cassandra.utils.concurrent.WrappedSharedCloseable$1@194296283:[[OffHeapBitSet]]
>  was not released before the reference was garbage collected
> ERROR [Reference-Reaper:1] 2015-08-14 13:37:37,057 Ref.java:179 - LEAK 
> DETECTED: a reference 
> (org.apache.cassandra.utils.concurrent.Ref$State@fab2c71) to class 
> org.apache.cassandra.io.util.MmappedSegmentedFile$Cleanup@1252635616:/var/lib/cassandra/data/metric/metric-811fa5402a3b11e5a2c0870545c0f352/metric-metric-ka-6883-Index.db
>  was not released before the reference was garbage collected
> ERROR [Reference-Reaper:1] 2015-08-14 13:37:37,057 Ref.java:179 - LEAK 
> DETECTED: a reference 
> (org.apache.cassandra.utils.concurrent.Ref$State@555d8efb) to class 
> org.apache.cassandra.io.util.MmappedSegmentedFile$Cleanup@1252635616:/var/lib/cassandra/data/metric/metric-811fa5402a3b11e5a2c0870545c0f352/metric-metric-ka-6883-Index.db
>  was not released before the reference was garbage collected
> ERROR [Reference-Reaper:1] 2015-08-14 13:37:37,057 Ref.java:179 - LEAK 
> DETECTED: a reference 
> (org.apache.cassandra.utils.concurrent.Ref$State@7b29bfea) to class 
> org.apache.cassandra.io.util.MmappedSegmentedFile$Cleanup@1252635616:/var/lib/cassandra/data/metric/metric-811fa5402a3b11e5a2c0870545c0f352/metric-metric-ka-6883-Index.db
>  was not released before the reference was garbage collected
> ERROR [Reference-Reaper:1] 2015-08-14 13:37:37,057 Ref.java:179 - LEAK 
> DETECTED: a reference 
> (org.apache.cassandra.utils.concurrent.Ref$State@2d37dc5a) to class 
> org.apache.cassandra.utils.concurrent.WrappedSharedCloseable$1@713444527:[[OffHeapBitSet]]
>  was not released before the reference was garbage collected
> ERROR [Reference-Reaper:1] 2015-08-14 13:37:37,057 Ref.java:179 - LEAK 
> DETECTED: a reference 
> (org.apache.cassandra.utils.concurrent.Ref$State@13153552) to class 
> org.apache.cassandra.utils.concurrent.WrappedSharedCloseable$1@713444527:[[OffHeapBitSet]]
>  was not released before the reference was garbage collected
> ERROR [Reference-Reaper:1] 2015-08-14 13:37:37,057 Ref.java:179 - LEAK 
> DETECTED: a reference 
> (org.apache.cassandra.utils.concurrent.Ref$State@25f51e35) to class 
> org.apache.cassandra.utils.concurrent.WrappedSharedCloseable$1@713444527:[[OffHeapBitSet]]
>  was not released before the reference was garbage collected
> ERROR [Reference-Reaper:1] 2015-08-14 13:37:37,057 Ref.java:179 - LEAK 
> DETECTED: a reference 
> (org.apache.cassandra.utils.concurrent.Ref$State@3633d3dd) to class 
> org.apache.cassandra.utils.concurrent.WrappedSharedCloseable$1@194296283:[[OffHeapBitSet]]
>  was not released before the reference was garbage collected
> ERROR [Reference-Reaper:1] 2015-08-14 13:37:37,057 Ref.java:179 - LEAK 
> DETECTED: a reference 
> (org.apache.cassandra.utils.concurrent.Ref$State@2ec81280) to class 
> org.apache.cassandra.utils.concurrent.WrappedSharedCloseable$1@194296283:[[OffHeapBitSet]]
>  was not released before the reference was garbage collected
> ERROR [Reference-Reaper:1] 2015-08-14 13:37:37,058 Ref.java:179 - LEAK 
> DETECTED: a reference 
> (org.apache.cassandra.utils.concurrent.Ref$State@144d1dae) to class 
> org.apache.cassandra.utils.concurrent.WrappedSharedCloseable$1@194296283:[[OffHeapBitSet]]
>  was not released before the reference was garbage collected
> ERROR [Reference-Reaper:1] 2015-08-14 13:37:37,058 Ref.java:179 - LEAK 
> DETECTED: a reference 
> (org.apache.cassandra.utils.concurrent.Ref$State@1944bda4) to class 
> org.apache.cassandra.utils.concurrent.WrappedSharedCloseable$1@194296283:[[OffHeapBitSet]]
>  was not released before the reference was garbage collected
> ERROR [Reference-Reaper:1] 2015-08-14 13:37:37,058 Ref.java:179 - LEAK 
> DETECTED: a reference 
> (org.apache.cassandra.utils.concurrent.Ref$State@31c1386a) to class 
> org.apache.cassandra.io.util.MmappedSegmentedFile$Cleanup@1601396928:/var/lib/cassandra/data/metric/metric-811fa5402a3b11e5a2c0870545c0f352/metric-metric-ka-8229-Index.db
>  wa

[jira] [Updated] (CASSANDRA-10554) Auto Bootstraping a new node fails

2015-10-20 Thread Alan Boudreault (JIRA)

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

Alan Boudreault updated CASSANDRA-10554:

Attachment: debug.log

Here's the debug.log.

> Auto Bootstraping a new node fails
> --
>
> Key: CASSANDRA-10554
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10554
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Alan Boudreault
>Assignee: Yuki Morishita
> Fix For: 3.0.0
>
> Attachments: 0001-Add-debug.txt, debug.log, system.log
>
>
> I've been trying to add a new node in my 3.0 cluster and it seems to fail. 
> All my nodes are using apache/cassandra-3.0.0 branch. At the beginning, I can 
> see the following error:
> {code}
> INFO  18:45:55 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a ID#0] Prepare 
> completed. Receiving 42 files(1910066622 bytes), sending 0 files(0 bytes)
> WARN  18:45:55 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a] Retrying for 
> following error
> java.lang.RuntimeException: Unknown column added_time during deserialization
> at 
> org.apache.cassandra.db.SerializationHeader$Component.toHeader(SerializationHeader.java:331)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.StreamReader.createWriter(StreamReader.java:136)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.compress.CompressedStreamReader.read(CompressedStreamReader.java:77)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.messages.IncomingFileMessage$1.deserialize(IncomingFileMessage.java:50)
>  [main/:na]
> at 
> org.apache.cassandra.streaming.messages.IncomingFileMessage$1.deserialize(IncomingFileMessage.java:39)
>  [main/:na]
> at 
> org.apache.cassandra.streaming.messages.StreamMessage.deserialize(StreamMessage.java:59)
>  [main/:na]
> at 
> org.apache.cassandra.streaming.ConnectionHandler$IncomingMessageHandler.run(ConnectionHandler.java:261)
>  [main/:na]
> at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
> ERROR 18:45:55 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a] Streaming error 
> occurred
> java.lang.IllegalArgumentException: Unknown type 0
> at 
> org.apache.cassandra.streaming.messages.StreamMessage$Type.get(StreamMessage.java:97)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.messages.StreamMessage.deserialize(StreamMessage.java:58)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.ConnectionHandler$IncomingMessageHandler.run(ConnectionHandler.java:261)
>  ~[main/:na]
> at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
> INFO  18:45:55 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a] Session with 
> /54.210.187.114 is complete
> INFO  18:45:56 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a ID#0] Prepare 
> completed. Receiving 38 files(2323537628 bytes), sending 0 files(0 bytes)
> WARN  18:45:56 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a] Retrying for 
> following error
> java.lang.RuntimeException: Unknown column added_time during deserialization
> at 
> org.apache.cassandra.db.SerializationHeader$Component.toHeader(SerializationHeader.java:331)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.StreamReader.createWriter(StreamReader.java:136)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.compress.CompressedStreamReader.read(CompressedStreamReader.java:77)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.messages.IncomingFileMessage$1.deserialize(IncomingFileMessage.java:50)
>  [main/:na]
> at 
> org.apache.cassandra.streaming.messages.IncomingFileMessage$1.deserialize(IncomingFileMessage.java:39)
>  [main/:na]
> at 
> org.apache.cassandra.streaming.messages.StreamMessage.deserialize(StreamMessage.java:59)
>  [main/:na]
> at 
> org.apache.cassandra.streaming.ConnectionHandler$IncomingMessageHandler.run(ConnectionHandler.java:261)
>  [main/:na]
> at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
> ERROR 18:45:56 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a] Streaming error 
> occurred
> java.lang.IllegalArgumentException: Unknown type 0
> at 
> org.apache.cassandra.streaming.messages.StreamMessage$Type.get(StreamMessage.java:97)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.messages.StreamMessage.deserialize(StreamMessage.java:58)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.ConnectionHandler$IncomingMessageHandler.run(ConnectionHandler.java:261)
>  ~[main/:na]
> at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
> INFO  18:45:56 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a] Session with 
> /54.210.184.198 is complete
> INFO  18:45:56 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a ID#0] Prepare 
> completed. Receiving 35 files(2069893759 bytes), sending 0 files(0 bytes)
> WARN  18:45:57 [

[jira] [Comment Edited] (CASSANDRA-9928) Add Support for multiple non-primary key columns in Materialized View primary keys

2015-10-20 Thread Tyler Hobbs (JIRA)

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

Tyler Hobbs edited comment on CASSANDRA-9928 at 10/20/15 9:02 PM:
--

One possible solution is to require that all non-PK columns that are in a view 
PK be updated simultaneously.  [~tjake] mentioned possible problems from read 
repair, but it seems like with this restriction in place, any read repairs 
would end up repairing all non-PK columns at once.

This would also solve (or avoid) CASSANDRA-10226.


was (Author: thobbs):
One possible solution is to require that all non-PK columns that are in a view 
PK be updated simultaneously.  [~tjake] mentioned possible problems from read 
repair, but it seems like with this restriction in place, any read repairs 
would end up repairing all non-PK columns at once.

> Add Support for multiple non-primary key columns in Materialized View primary 
> keys
> --
>
> Key: CASSANDRA-9928
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9928
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: T Jake Luciani
>  Labels: materializedviews
> Fix For: 3.x
>
>
> Currently we don't allow > 1 non primary key from the base table in a MV 
> primary key.  We should remove this restriction assuming we continue 
> filtering out nulls.  With allowing nulls in the MV columns there are a lot 
> of multiplicative implications we need to think through.



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


[jira] [Commented] (CASSANDRA-8713) Print out all current values of available configuration parameters at startup

2015-10-20 Thread Jeremy Hanna (JIRA)

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

Jeremy Hanna commented on CASSANDRA-8713:
-

In addition to default or unlisted values in the yaml, this could also be for 
calculated values.  For example, memtable_cleanup_threshold could be printed 
out in the log.  This type of thing saves having to look in the source for 
either the default value or the way that the value is calculated when trying to 
troubleshoot an issue.

> Print out all current values of available configuration parameters at startup
> -
>
> Key: CASSANDRA-8713
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8713
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Config
>Reporter: Wei Deng
>Priority: Minor
>
> I know we have https://issues.apache.org/jira/browse/CASSANDRA-6456 to print 
> out all parameters configured in cassandra.yaml at startup as in here 
> https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/config/YamlConfigurationLoader.java#L124-136,
>  however, how about those parameters that we don't configure in 
> cassandra.yaml? It will be helpful to troubleshooting if we can add a similar 
> logConfig() method for all parameters in 
> https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/config/Config.java.



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


[jira] [Commented] (CASSANDRA-10557) Streaming can throw exception when trying to retry

2015-10-20 Thread Yuki Morishita (JIRA)

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

Yuki Morishita commented on CASSANDRA-10557:


Here are patches:

2.1: https://github.com/yukim/cassandra/tree/10557-2.1
2.2: https://github.com/yukim/cassandra/tree/10557-2.2
3.0: https://github.com/yukim/cassandra/tree/10557-3.0

Tests are running on cassci so I will report back.

> Streaming can throw exception when trying to retry
> --
>
> Key: CASSANDRA-10557
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10557
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Yuki Morishita
>Assignee: Yuki Morishita
>Priority: Minor
> Fix For: 2.1.x, 2.2.x, 3.0.0
>
>
> Streaming can throw below exception when trying to retry.
> This seems to be happening when underlining cause is not catched properly.
> {code}
> ERROR 18:45:56 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a] Streaming error 
> occurred
> java.lang.IllegalArgumentException: Unknown type 0
> at 
> org.apache.cassandra.streaming.messages.StreamMessage$Type.get(StreamMessage.java:97)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.messages.StreamMessage.deserialize(StreamMessage.java:58)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.ConnectionHandler$IncomingMessageHandler.run(ConnectionHandler.java:261)
>  ~[main/:na]
> at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
> {code}



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


[jira] [Commented] (CASSANDRA-10515) Commit logs back up with move to 2.1.10

2015-10-20 Thread Jeff Griffith (JIRA)

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

Jeff Griffith commented on CASSANDRA-10515:
---

Hi again [~krummas]
Before trying the leveling, the remaining problematic clusters seemed to work 
out the # of files in L0 problem. They were all trending downward but there 
were several days where it was very frequent. Alas, the isolated node with 
large SSTable counts does not seem to be the only issue where commit logs break 
the limit. I'm tempted to open this as a separate issue, but let's see what you 
think first. In some cases, we see all 3 nodes in those small clusters break 
the limit at the same time. I will do better monitoring but I did manage to 
catch one in progress and here i observed. There was not a lot of blocked 
threads like before but it did have the MemtablePostFlusher blocked on the 
countdown latch. So here are the tpstats for that:
{code}
MemtableFlushWriter   830   7200 0  
   0
MemtablePostFlush 1 45879  16841 0  
   0
MemtableReclaimMemory 0 0   7199 0  
   0
{code}
With 46K pending. The only thread I see for that is here:
{code}
"MemtablePostFlush:3" #3054 daemon prio=5 os_prio=0 tid=0x7f806fb71000 
nid=0x2e5c waiting on condition [0x7f804366c000]
   java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  <0x0005de8976f8> (a 
java.util.concurrent.CountDownLatch$Sync)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at 
java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
at 
java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:997)
at 
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1304)
at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:231)
at 
org.apache.cassandra.db.ColumnFamilyStore$PostFlush.run(ColumnFamilyStore.java:998)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
{code}
I don't know who counts that latch down, but there were a couple of blocked 
threads, here:
{code}
"HintedHandoff:2" #1429 daemon prio=1 os_prio=4 tid=0x7f80895c4800 
nid=0x1242 waiting for monitor entry [0x7f804321b000]
   java.lang.Thread.State: BLOCKED (on object monitor)
at 
org.apache.cassandra.db.HintedHandOffManager.compact(HintedHandOffManager.java:267)
- waiting to lock <0x0004e2e689a8> (a 
org.apache.cassandra.db.HintedHandOffManager)
at 
org.apache.cassandra.db.HintedHandOffManager$5.run(HintedHandOffManager.java:561)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

"HintedHandoff:1" #1428 daemon prio=1 os_prio=4 tid=0x7f80895c3800 
nid=0x1241 waiting for monitor entry [0x7f7838855000]
   java.lang.Thread.State: BLOCKED (on object monitor)
at 
org.apache.cassandra.db.HintedHandOffManager.compact(HintedHandOffManager.java:267)
- waiting to lock <0x0004e2e689a8> (a 
org.apache.cassandra.db.HintedHandOffManager)
at 
org.apache.cassandra.db.HintedHandOffManager$5.run(HintedHandOffManager.java:561)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
{code}
and the lock was held here:
{code}
"HintedHandoffManager:1" #1430 daemon prio=1 os_prio=4 tid=0x7f808aaf1800 
nid=0x1243 waiting on condition [0x7f8043423000]
   java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  <0x00060bdc0b98> (a 
java.util.concurrent.FutureTask)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.FutureTask.awaitDone(FutureTask.java:429)
at java.util.concurrent.FutureTask.get(FutureTask.java:191)
at 
org.apache.c

[jira] [Commented] (CASSANDRA-10554) Auto Bootstraping a new node fails

2015-10-20 Thread Yuki Morishita (JIRA)

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

Yuki Morishita commented on CASSANDRA-10554:


Can you post debug.log also?

> Auto Bootstraping a new node fails
> --
>
> Key: CASSANDRA-10554
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10554
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Alan Boudreault
>Assignee: Yuki Morishita
> Fix For: 3.0.0
>
> Attachments: 0001-Add-debug.txt, system.log
>
>
> I've been trying to add a new node in my 3.0 cluster and it seems to fail. 
> All my nodes are using apache/cassandra-3.0.0 branch. At the beginning, I can 
> see the following error:
> {code}
> INFO  18:45:55 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a ID#0] Prepare 
> completed. Receiving 42 files(1910066622 bytes), sending 0 files(0 bytes)
> WARN  18:45:55 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a] Retrying for 
> following error
> java.lang.RuntimeException: Unknown column added_time during deserialization
> at 
> org.apache.cassandra.db.SerializationHeader$Component.toHeader(SerializationHeader.java:331)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.StreamReader.createWriter(StreamReader.java:136)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.compress.CompressedStreamReader.read(CompressedStreamReader.java:77)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.messages.IncomingFileMessage$1.deserialize(IncomingFileMessage.java:50)
>  [main/:na]
> at 
> org.apache.cassandra.streaming.messages.IncomingFileMessage$1.deserialize(IncomingFileMessage.java:39)
>  [main/:na]
> at 
> org.apache.cassandra.streaming.messages.StreamMessage.deserialize(StreamMessage.java:59)
>  [main/:na]
> at 
> org.apache.cassandra.streaming.ConnectionHandler$IncomingMessageHandler.run(ConnectionHandler.java:261)
>  [main/:na]
> at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
> ERROR 18:45:55 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a] Streaming error 
> occurred
> java.lang.IllegalArgumentException: Unknown type 0
> at 
> org.apache.cassandra.streaming.messages.StreamMessage$Type.get(StreamMessage.java:97)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.messages.StreamMessage.deserialize(StreamMessage.java:58)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.ConnectionHandler$IncomingMessageHandler.run(ConnectionHandler.java:261)
>  ~[main/:na]
> at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
> INFO  18:45:55 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a] Session with 
> /54.210.187.114 is complete
> INFO  18:45:56 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a ID#0] Prepare 
> completed. Receiving 38 files(2323537628 bytes), sending 0 files(0 bytes)
> WARN  18:45:56 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a] Retrying for 
> following error
> java.lang.RuntimeException: Unknown column added_time during deserialization
> at 
> org.apache.cassandra.db.SerializationHeader$Component.toHeader(SerializationHeader.java:331)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.StreamReader.createWriter(StreamReader.java:136)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.compress.CompressedStreamReader.read(CompressedStreamReader.java:77)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.messages.IncomingFileMessage$1.deserialize(IncomingFileMessage.java:50)
>  [main/:na]
> at 
> org.apache.cassandra.streaming.messages.IncomingFileMessage$1.deserialize(IncomingFileMessage.java:39)
>  [main/:na]
> at 
> org.apache.cassandra.streaming.messages.StreamMessage.deserialize(StreamMessage.java:59)
>  [main/:na]
> at 
> org.apache.cassandra.streaming.ConnectionHandler$IncomingMessageHandler.run(ConnectionHandler.java:261)
>  [main/:na]
> at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
> ERROR 18:45:56 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a] Streaming error 
> occurred
> java.lang.IllegalArgumentException: Unknown type 0
> at 
> org.apache.cassandra.streaming.messages.StreamMessage$Type.get(StreamMessage.java:97)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.messages.StreamMessage.deserialize(StreamMessage.java:58)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.ConnectionHandler$IncomingMessageHandler.run(ConnectionHandler.java:261)
>  ~[main/:na]
> at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
> INFO  18:45:56 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a] Session with 
> /54.210.184.198 is complete
> INFO  18:45:56 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a ID#0] Prepare 
> completed. Receiving 35 files(2069893759 bytes), sending 0 files(0 

[jira] [Created] (CASSANDRA-10557) Streaming can throw exception when trying to retry

2015-10-20 Thread Yuki Morishita (JIRA)
Yuki Morishita created CASSANDRA-10557:
--

 Summary: Streaming can throw exception when trying to retry
 Key: CASSANDRA-10557
 URL: https://issues.apache.org/jira/browse/CASSANDRA-10557
 Project: Cassandra
  Issue Type: Bug
Reporter: Yuki Morishita
Assignee: Yuki Morishita
Priority: Minor
 Fix For: 2.1.x, 2.2.x, 3.0.0


Streaming can throw below exception when trying to retry.
This seems to be happening when underlining cause is not catched properly.

{code}
ERROR 18:45:56 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a] Streaming error 
occurred
java.lang.IllegalArgumentException: Unknown type 0
at 
org.apache.cassandra.streaming.messages.StreamMessage$Type.get(StreamMessage.java:97)
 ~[main/:na]
at 
org.apache.cassandra.streaming.messages.StreamMessage.deserialize(StreamMessage.java:58)
 ~[main/:na]
at 
org.apache.cassandra.streaming.ConnectionHandler$IncomingMessageHandler.run(ConnectionHandler.java:261)
 ~[main/:na]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
{code}



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


[jira] [Updated] (CASSANDRA-10554) Auto Bootstraping a new node fails

2015-10-20 Thread Alan Boudreault (JIRA)

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

Alan Boudreault updated CASSANDRA-10554:

Attachment: system.log

Here's the system log. I will try to create a small test case that someone can 
reproduce easily with CCM. 

> Auto Bootstraping a new node fails
> --
>
> Key: CASSANDRA-10554
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10554
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Alan Boudreault
>Assignee: Yuki Morishita
> Fix For: 3.0.0
>
> Attachments: 0001-Add-debug.txt, system.log
>
>
> I've been trying to add a new node in my 3.0 cluster and it seems to fail. 
> All my nodes are using apache/cassandra-3.0.0 branch. At the beginning, I can 
> see the following error:
> {code}
> INFO  18:45:55 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a ID#0] Prepare 
> completed. Receiving 42 files(1910066622 bytes), sending 0 files(0 bytes)
> WARN  18:45:55 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a] Retrying for 
> following error
> java.lang.RuntimeException: Unknown column added_time during deserialization
> at 
> org.apache.cassandra.db.SerializationHeader$Component.toHeader(SerializationHeader.java:331)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.StreamReader.createWriter(StreamReader.java:136)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.compress.CompressedStreamReader.read(CompressedStreamReader.java:77)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.messages.IncomingFileMessage$1.deserialize(IncomingFileMessage.java:50)
>  [main/:na]
> at 
> org.apache.cassandra.streaming.messages.IncomingFileMessage$1.deserialize(IncomingFileMessage.java:39)
>  [main/:na]
> at 
> org.apache.cassandra.streaming.messages.StreamMessage.deserialize(StreamMessage.java:59)
>  [main/:na]
> at 
> org.apache.cassandra.streaming.ConnectionHandler$IncomingMessageHandler.run(ConnectionHandler.java:261)
>  [main/:na]
> at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
> ERROR 18:45:55 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a] Streaming error 
> occurred
> java.lang.IllegalArgumentException: Unknown type 0
> at 
> org.apache.cassandra.streaming.messages.StreamMessage$Type.get(StreamMessage.java:97)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.messages.StreamMessage.deserialize(StreamMessage.java:58)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.ConnectionHandler$IncomingMessageHandler.run(ConnectionHandler.java:261)
>  ~[main/:na]
> at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
> INFO  18:45:55 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a] Session with 
> /54.210.187.114 is complete
> INFO  18:45:56 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a ID#0] Prepare 
> completed. Receiving 38 files(2323537628 bytes), sending 0 files(0 bytes)
> WARN  18:45:56 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a] Retrying for 
> following error
> java.lang.RuntimeException: Unknown column added_time during deserialization
> at 
> org.apache.cassandra.db.SerializationHeader$Component.toHeader(SerializationHeader.java:331)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.StreamReader.createWriter(StreamReader.java:136)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.compress.CompressedStreamReader.read(CompressedStreamReader.java:77)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.messages.IncomingFileMessage$1.deserialize(IncomingFileMessage.java:50)
>  [main/:na]
> at 
> org.apache.cassandra.streaming.messages.IncomingFileMessage$1.deserialize(IncomingFileMessage.java:39)
>  [main/:na]
> at 
> org.apache.cassandra.streaming.messages.StreamMessage.deserialize(StreamMessage.java:59)
>  [main/:na]
> at 
> org.apache.cassandra.streaming.ConnectionHandler$IncomingMessageHandler.run(ConnectionHandler.java:261)
>  [main/:na]
> at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
> ERROR 18:45:56 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a] Streaming error 
> occurred
> java.lang.IllegalArgumentException: Unknown type 0
> at 
> org.apache.cassandra.streaming.messages.StreamMessage$Type.get(StreamMessage.java:97)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.messages.StreamMessage.deserialize(StreamMessage.java:58)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.ConnectionHandler$IncomingMessageHandler.run(ConnectionHandler.java:261)
>  ~[main/:na]
> at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
> INFO  18:45:56 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a] Session with 
> /54.210.184.198 is complete
> INFO  18:45:56 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a ID#0] Prepare 
> completed. Recei

[jira] [Commented] (CASSANDRA-9928) Add Support for multiple non-primary key columns in Materialized View primary keys

2015-10-20 Thread Tyler Hobbs (JIRA)

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

Tyler Hobbs commented on CASSANDRA-9928:


One possible solution is to require that all non-PK columns that are in a view 
PK be updated simultaneously.  [~tjake] mentioned possible problems from read 
repair, but it seems like with this restriction in place, any read repairs 
would end up repairing all non-PK columns at once.

> Add Support for multiple non-primary key columns in Materialized View primary 
> keys
> --
>
> Key: CASSANDRA-9928
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9928
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: T Jake Luciani
>  Labels: materializedviews
> Fix For: 3.x
>
>
> Currently we don't allow > 1 non primary key from the base table in a MV 
> primary key.  We should remove this restriction assuming we continue 
> filtering out nulls.  With allowing nulls in the MV columns there are a lot 
> of multiplicative implications we need to think through.



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


[jira] [Commented] (CASSANDRA-8821) Errors in JVM_OPTS and cassandra_parms environment vars

2015-10-20 Thread Michael Shuler (JIRA)

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

Michael Shuler commented on CASSANDRA-8821:
---

I have! Can we get a committer for CASSANDRA-10251? That solves most of the 
issues and I'll work up a new patch for this ticket with the above in mind.

> Errors in JVM_OPTS and cassandra_parms environment vars
> ---
>
> Key: CASSANDRA-8821
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8821
> Project: Cassandra
>  Issue Type: Bug
> Environment: Ubuntu 14.04 LTS amd64
>Reporter: Terry Moschou
>Assignee: Michael Shuler
>Priority: Minor
> Fix For: 2.1.x, 2.2.x
>
> Attachments: 8821_2.0.txt, 8821_2.1.txt
>
>
> Repos:
> deb http://www.apache.org/dist/cassandra/debian 21x main
> deb-src http://www.apache.org/dist/cassandra/debian 21x main
> The cassandra init script
>   /etc/init.d/cassandra
> is sourcing the environment file
>   /etc/cassandra/cassandra-env.sh
> twice. Once directly from the init script, and again inside
>   /usr/sbin/cassandra
> The result is arguments in JVM_OPTS are duplicated.
> Further the JVM opt
>   -XX:CMSWaitDuration=1
> is defined twice if jvm >= 1.7.60.
> Also, for the environment variable CASSANDRA_CONF used in this context
>   -XX:CompileCommandFile=$CASSANDRA_CONF/hotspot_compiler"
> is undefined when
>   /etc/cassandra/cassandra-env.sh
> is sourced from the init script.
> Lastly the variable cassandra_storagedir is undefined in
>   /usr/sbin/cassandra
> when used in this context
>   -Dcassandra.storagedir=$cassandra_storagedir



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


[jira] [Comment Edited] (CASSANDRA-10552) Pluggable IResources

2015-10-20 Thread Anthony Cozzie (JIRA)

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

Anthony Cozzie edited comment on CASSANDRA-10552 at 10/20/15 4:43 PM:
--

It seems I have fallen into my classic trap of 'this shouldn't be too bad' . . 
. . 'I've made a huge mistake'.  Fixing both of these problems is somewhat 
difficult.  The different types of roles are somewhat entangled with the CQL 
grammar, and it doesn't seem possible to specify keywords that aren't hard 
coded.  Loading classes at runtime would require adding another dependency to 
the project (probably Reflections, but maybe Objectweb) which seems dubious.  
[~beobal] and I discussed three possible solutions this morning, but none look 
all that great.

1, We can have extensions have the full class path as their string 
representation.  So rather than data/keyspace/table or roles/blah it would be 
com.foo.bar.ResourceClass/type/subtype.  At that point, the {{Resource}} class 
can simply load the classes it finds in {{system_auth.role_permissions}}.  
Unfortunately, this leads to a truly miserable CQL syntax: {{GRANT MODIFY ON 
CUSTOM RESOURCE com.foo.bar.ResourceClass/type/subtype}}.

2, We can register new auth types in some sort of system table.  Unfortunately, 
I don't think this improves the CQL syntax much: {{GRANT MODIFY ON CUSTOM 
RESOURCE ALIAS blah.blah}} and it adds a lot of complexity.

3, We can add a Cassandra {{IResource}} extension, say {{UserResource}}.  The 
CQL syntax is about the same as #2 {{GRANT MODIFY ON URESOURCE 
alias/blah/blah}} but it's much simpler internally.  However, {{UserResource}} 
would not be able to properly implement {{IResource.exists()}} or 
{{IResource.applicablePermissions()}}, which is also pretty ugly.

We also questioned the long term validity of some of this stuff.  If vtables 
become the preferred form of access, then the normal access controls are just 
fine.


was (Author: acoz):
It seems I have fallen into my classic trap of 'this shouldn't be too bad' . . 
. . 'I've made a huge mistake'.  Fixing both of these problems is somewhat 
difficult.  The different types of roles are somewhat entangled with the CQL 
grammar, and it doesn't seem possible to specify keywords that aren't hard 
coded.  Loading classes at runtime would require adding another dependency to 
the project (probably Reflections, but maybe Objectweb) which seems dubious.  
[~beobal] and I discussed three possible solutions this morning, but both have 
rather serious flaws.

1, We can have extensions have the full class path as their string 
representation.  So rather than data/keyspace/table or roles/blah it would be 
com.foo.bar.ResourceClass/type/subtype.  At that point, the {{Resource}} class 
can simply load the classes it finds in {{system_auth.role_permissions}}.  
Unfortunately, this leads to a truly miserable CQL syntax: {{GRANT MODIFY ON 
CUSTOM RESOURCE com.foo.bar.ResourceClass/type/subtype}}.

2, We can register new auth types in some sort of system table.  Unfortunately, 
I don't think this improves the CQL syntax much: {{GRANT MODIFY ON CUSTOM 
RESOURCE ALIAS blah.blah}} and it adds a lot of complexity.

3, We can add a Cassandra {{IResource}} extension, say {{UserResource}}.  The 
CQL syntax is about the same as #2 {{GRANT MODIFY ON URESOURCE 
alias/blah/blah}} but it's much simpler internally.  However, {{UserResource}} 
would not be able to properly implement {{IResource.exists()}} or 
{{IResource.applicablePermissions()}}, which is also pretty ugly.

> Pluggable IResources
> 
>
> Key: CASSANDRA-10552
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10552
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Anthony Cozzie
>Assignee: Anthony Cozzie
> Fix For: 3.x
>
> Attachments: cassandra-3.0.0-10552.txt
>
>
> It is impossible to add new IResources because of the static method 
> Resources.fromName(), which creates IResources from the text values in the 
> authentication tables.  This patch replaces the static list of checks with a 
> hash table that can be extended.



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


[jira] [Commented] (CASSANDRA-10552) Pluggable IResources

2015-10-20 Thread Anthony Cozzie (JIRA)

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

Anthony Cozzie commented on CASSANDRA-10552:


It seems I have fallen into my classic trap of 'this shouldn't be too bad' . . 
. . 'I've made a huge mistake'.  Fixing both of these problems is somewhat 
difficult.  The different types of roles are somewhat entangled with the CQL 
grammar, and it doesn't seem possible to specify keywords that aren't hard 
coded.  Loading classes at runtime would require adding another dependency to 
the project (probably Reflections, but maybe Objectweb) which seems dubious.  
[~beobal] and I discussed three possible solutions this morning, but both have 
rather serious flaws.

1, We can have extensions have the full class path as their string 
representation.  So rather than data/keyspace/table or roles/blah it would be 
com.foo.bar.ResourceClass/type/subtype.  At that point, the {{Resource}} class 
can simply load the classes it finds in {{system_auth.role_permissions}}.  
Unfortunately, this leads to a truly miserable CQL syntax: {{GRANT MODIFY ON 
CUSTOM RESOURCE com.foo.bar.ResourceClass/type/subtype}}.

2, We can register new auth types in some sort of system table.  Unfortunately, 
I don't think this improves the CQL syntax much: {{GRANT MODIFY ON CUSTOM 
RESOURCE ALIAS blah.blah}} and it adds a lot of complexity.

3, We can add a Cassandra {{IResource}} extension, say {{UserResource}}.  The 
CQL syntax is about the same as #2 {{GRANT MODIFY ON URESOURCE 
alias/blah/blah}} but it's much simpler internally.  However, {{UserResource}} 
would not be able to properly implement {{IResource.exists()}} or 
{{IResource.applicablePermissions()}}, which is also pretty ugly.

> Pluggable IResources
> 
>
> Key: CASSANDRA-10552
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10552
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Anthony Cozzie
>Assignee: Anthony Cozzie
> Fix For: 3.x
>
> Attachments: cassandra-3.0.0-10552.txt
>
>
> It is impossible to add new IResources because of the static method 
> Resources.fromName(), which creates IResources from the text values in the 
> authentication tables.  This patch replaces the static list of checks with a 
> hash table that can be extended.



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


[jira] [Comment Edited] (CASSANDRA-10517) Make sure all unit tests run on CassCI

2015-10-20 Thread Joel Knighton (JIRA)

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

Joel Knighton edited comment on CASSANDRA-10517 at 10/20/15 4:29 PM:
-

In summary, this works as designed.

We set a timeout in the ant junit test runner that works on the level of the 
forked JVM. A JVM is forked for every test class, and the timeout is global 
rather than per-method.  Upon timeout, the forked JVM errors out and no more 
tests from this class are run.

In order to run all the testcases in a test class, we would need to abandon the 
timeouts in the forked JVM and switch to junit annotations.

There's a development philosophy debate attached to this.  On the one hand, 
running all the tests in every circumstance makes it easier to identify the 
timed-out test cases more than one at a time.  On the other hand, a failure is 
a failure, and a red light will show up for the build in the case of a timed 
out.

For now, I think we leave this be and use it as additional impetus to fix our 
test problem. In the event that we find timed out tests to be one of the last 
remaining issues because of unpredictable runtime behavior in CassCI, we should 
consider moving to junit annotations.

EDIT: I'm going to leave this open a bit longer, since I expect there will be 
good discussion on this topic, and I'd rather have it centralized.


was (Author: jkni):
In summary, this works as designed.

We set a timeout in the ant junit test runner that works on the level of the 
forked JVM. A JVM is forked for every test class, and the timeout is global 
rather than per-method.  Upon timeout, the forked JVM errors out and no more 
tests from this class are run.

In order to run all the testcases in a test class, we would need to abandon the 
timeouts in the forked JVM and switch to junit annotations.

There's a development philosophy debate attached to this.  On the one hand, 
running all the tests in every circumstance makes it easier to identify the 
timed-out test cases more than one at a time.  On the other hand, a failure is 
a failure, and a red light will show up for the build in the case of a timed 
out.

For now, I think we leave this be and use it as additional impetus to fix our 
test problem. In the event that we find timed out tests to be one of the last 
remaining issues because of unpredictable runtime behavior in CassCI, we should 
consider moving to junit annotations.

> Make sure all unit tests run on CassCI
> --
>
> Key: CASSANDRA-10517
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10517
> Project: Cassandra
>  Issue Type: Sub-task
>Reporter: Jim Witschey
>Assignee: Joel Knighton
>  Labels: triage
> Fix For: 3.0.0
>
>
> It seems that some Windows unit tests aren't run sometimes on CassCI, and 
> there's no error reporting for this. For instance, this test was introduced 
> around the time build #38 would have happened, but has only run in builds 
> #50-3 and #64:
> http://cassci.datastax.com/view/cassandra-3.0/job/cassandra-3.0_utest_win32/lastCompletedBuild/testReport/org.apache.cassandra.cql3/ViewTest/testPrimaryKeyIsNotNull/history/



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


[jira] [Commented] (CASSANDRA-10517) Make sure all unit tests run on CassCI

2015-10-20 Thread Joel Knighton (JIRA)

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

Joel Knighton commented on CASSANDRA-10517:
---

In summary, this works as designed.

We set a timeout in the ant junit test runner that works on the level of the 
forked JVM. A JVM is forked for every test class, and the timeout is global 
rather than per-method.  Upon timeout, the forked JVM errors out and no more 
tests from this class are run.

In order to run all the testcases in a test class, we would need to abandon the 
timeouts in the forked JVM and switch to junit annotations.

There's a development philosophy debate attached to this.  On the one hand, 
running all the tests in every circumstance makes it easier to identify the 
timed-out test cases more than one at a time.  On the other hand, a failure is 
a failure, and a red light will show up for the build in the case of a timed 
out.

For now, I think we leave this be and use it as additional impetus to fix our 
test problem. In the event that we find timed out tests to be one of the last 
remaining issues because of unpredictable runtime behavior in CassCI, we should 
consider moving to junit annotations.

> Make sure all unit tests run on CassCI
> --
>
> Key: CASSANDRA-10517
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10517
> Project: Cassandra
>  Issue Type: Sub-task
>Reporter: Jim Witschey
>Assignee: Joel Knighton
>  Labels: triage
> Fix For: 3.0.0
>
>
> It seems that some Windows unit tests aren't run sometimes on CassCI, and 
> there's no error reporting for this. For instance, this test was introduced 
> around the time build #38 would have happened, but has only run in builds 
> #50-3 and #64:
> http://cassci.datastax.com/view/cassandra-3.0/job/cassandra-3.0_utest_win32/lastCompletedBuild/testReport/org.apache.cassandra.cql3/ViewTest/testPrimaryKeyIsNotNull/history/



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


[jira] [Updated] (CASSANDRA-10517) Make sure all unit tests run on CassCI

2015-10-20 Thread Joel Knighton (JIRA)

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

Joel Knighton updated CASSANDRA-10517:
--
Summary: Make sure all unit tests run on CassCI  (was: Make sure all unit 
tests run on CassCI on Windows)

> Make sure all unit tests run on CassCI
> --
>
> Key: CASSANDRA-10517
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10517
> Project: Cassandra
>  Issue Type: Sub-task
>Reporter: Jim Witschey
>Assignee: Joel Knighton
>  Labels: triage
> Fix For: 3.0.0
>
>
> It seems that some Windows unit tests aren't run sometimes on CassCI, and 
> there's no error reporting for this. For instance, this test was introduced 
> around the time build #38 would have happened, but has only run in builds 
> #50-3 and #64:
> http://cassci.datastax.com/view/cassandra-3.0/job/cassandra-3.0_utest_win32/lastCompletedBuild/testReport/org.apache.cassandra.cql3/ViewTest/testPrimaryKeyIsNotNull/history/



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


[jira] [Commented] (CASSANDRA-10517) Make sure all unit tests run on CassCI on Windows

2015-10-20 Thread Ariel Weisberg (JIRA)

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

Ariel Weisberg commented on CASSANDRA-10517:


This is not a Windows specific issue. It happens on Linux as well.

> Make sure all unit tests run on CassCI on Windows
> -
>
> Key: CASSANDRA-10517
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10517
> Project: Cassandra
>  Issue Type: Sub-task
>Reporter: Jim Witschey
>Assignee: Joel Knighton
>  Labels: triage
> Fix For: 3.0.0
>
>
> It seems that some Windows unit tests aren't run sometimes on CassCI, and 
> there's no error reporting for this. For instance, this test was introduced 
> around the time build #38 would have happened, but has only run in builds 
> #50-3 and #64:
> http://cassci.datastax.com/view/cassandra-3.0/job/cassandra-3.0_utest_win32/lastCompletedBuild/testReport/org.apache.cassandra.cql3/ViewTest/testPrimaryKeyIsNotNull/history/



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


[jira] [Commented] (CASSANDRA-10462) Fix failing test_failure_threshold_deletions upgrade test

2015-10-20 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-10462:
--

Appears that test hasn't bee fully updated for 3.0. It still expect a 
{{ReadTimeout}} when a 3.0 would throw a {{ReadFailure}} (on purpose). Note 
sure we have a way in the upgrade test to know which node will answer so 
modified the test to expect either one of {{ReadTimeout}} and {{ReadFailure}}, 
which should be good enough (commit 
[here|https://github.com/riptano/cassandra-dtest/commit/e12b06cb05e8b8ee2d685045e65c7b5589c14d3a]).
 The test is failing weirdly for me so while this should fix the CassCI issue, 
I'll wait to see how happy CI is with that before closing this.

> Fix failing test_failure_threshold_deletions upgrade test
> -
>
> Key: CASSANDRA-10462
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10462
> Project: Cassandra
>  Issue Type: Sub-task
>Reporter: Jim Witschey
>Assignee: Sylvain Lebresne
> Fix For: 3.0.0
>
>
> The 
> {{upgrade_tests/paging_test.py:TestPagingWithDeletions.test_failure_threshold_deletions}}
>  dtest fails on CassCI:
> http://cassci.datastax.com/view/cassandra-3.0/job/cassandra-3.0_dtest/lastCompletedBuild/testReport/upgrade_tests.paging_test/TestPagingWithDeletions/test_failure_threshold_deletions/
> and has failed for a while:
> http://cassci.datastax.com/view/cassandra-3.0/job/cassandra-3.0_dtest/lastCompletedBuild/testReport/upgrade_tests.paging_test/TestPagingWithDeletions/test_failure_threshold_deletions/history/
> It fails identically when I run it manually on OpenStack, so I don't think 
> it's a CassCI problem.



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


[jira] [Updated] (CASSANDRA-10462) Fix failing test_failure_threshold_deletions upgrade test

2015-10-20 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-10462:
-
Summary: Fix failing test_failure_threshold_deletions upgrade test  (was: 
Fix failing upgrade test)

> Fix failing test_failure_threshold_deletions upgrade test
> -
>
> Key: CASSANDRA-10462
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10462
> Project: Cassandra
>  Issue Type: Sub-task
>Reporter: Jim Witschey
>Assignee: Sylvain Lebresne
> Fix For: 3.0.0
>
>
> The 
> {{upgrade_tests/paging_test.py:TestPagingWithDeletions.test_failure_threshold_deletions}}
>  dtest fails on CassCI:
> http://cassci.datastax.com/view/cassandra-3.0/job/cassandra-3.0_dtest/lastCompletedBuild/testReport/upgrade_tests.paging_test/TestPagingWithDeletions/test_failure_threshold_deletions/
> and has failed for a while:
> http://cassci.datastax.com/view/cassandra-3.0/job/cassandra-3.0_dtest/lastCompletedBuild/testReport/upgrade_tests.paging_test/TestPagingWithDeletions/test_failure_threshold_deletions/history/
> It fails identically when I run it manually on OpenStack, so I don't think 
> it's a CassCI problem.



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


[jira] [Commented] (CASSANDRA-10092) Generalize PerRowSecondaryIndex validation

2015-10-20 Thread JIRA

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

Andrés de la Peña commented on CASSANDRA-10092:
---

I totally agree with you. Indeed our particular index implementation already 
performs a read when it receives an update with a subset of the indexed 
columns. Other implementations could choose between the strategies you have 
mentioned.

I'm not familiarized with the Thrift API, but I'm following [your 
steps|https://github.com/apache/cassandra/commit/0626be8667aefdcf50a051471f83da90bbae9bcf#diff-f53ee75d79fb30b497f6d1584d51d7d3L828]
 to add validation in the same way as it has been added in 3.0. If I'm not 
wrong, the affected methods are {{CassandraServer#cas}}, 
{{CassandraServer#createMutationList}} and {{CassandraServer#internal_insert}}. 
I'll also add some tests, and I hope to have the new patch ready in no more 
than a couple of days. Thanks!

> Generalize PerRowSecondaryIndex validation
> --
>
> Key: CASSANDRA-10092
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10092
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Andrés de la Peña
>Assignee: Andrés de la Peña
>Priority: Minor
>  Labels: 2i, secondary_index, validation
> Fix For: 2.1.x, 2.2.x
>
> Attachments: improve_2i_validation.patch
>
>
> Index validation is currently done in a per-cell basis. However, per-row 
> secondary index developers can be interested in validating all the written 
> columns at once, because some implementations need to check the validity of a 
> row write by comparing some column values against others. For example, a per 
> row 2i implementation indexing time ranges (composed by a start date column 
> and an end date column) should check that the start date is before the stop 
> date.
> I'm attaching a patch adding a new method to {{PerRowSecondaryIndex}}:
> {code:java}
> public void validate(ByteBuffer key, ColumnFamily cf) throws 
> InvalidRequestException {}
> {code}
> and a new method to {{SecondaryIndexManager}}:
> {code:java}
> public void validateRowLevelIndexes(ByteBuffer key, ColumnFamily cf) throws 
> InvalidRequestException
>   {
>   for (SecondaryIndex index : rowLevelIndexMap.values())
>   {
>   ((PerRowSecondaryIndex) index).validate(key, cf);
>   }
>   }
> {code}
> This method is invoked in CQL {{UpdateStatement#validateIndexedColumns}}. 
> This way, {{PerRowSecondaryIndex}} could perform complex write validation.
> I have tried to do the patch in the least invasive way possible. Maybe the 
> current method {{SecondaryIndex#validate(ByteBuffer, Cell)}} should be moved 
> to {{PerColumnSecondaryIndex}}, and the {{InvalidRequestException}} that 
> informs about the particular 64k limitation should be thrown by 
> {{AbstractSimplePerColumnSecondaryIndex}}. However, given the incoming  
> [CASSANDRA-9459|https://issues.apache.org/jira/browse/CASSANDRA-9459], I 
> think that the proposed patch is more than enough to provide rich validation 
> features to 2i implementations based on 2.1.x and 2.2.x.



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


[jira] [Created] (CASSANDRA-10556) Wrong order returned when querying ttl(value) and using SELECT IN + ORDER BY

2015-10-20 Thread Sucwinder Bassi (JIRA)
Sucwinder Bassi created CASSANDRA-10556:
---

 Summary: Wrong order returned when querying ttl(value) and using 
SELECT IN + ORDER BY
 Key: CASSANDRA-10556
 URL: https://issues.apache.org/jira/browse/CASSANDRA-10556
 Project: Cassandra
  Issue Type: Bug
 Environment: Tested with 3 node cluster on these versions:

C* 2.0.16.678
C* 2.1.8.689
C* 2.1.9.791
Reporter: Sucwinder Bassi


Setup a 3 node cluster, use these steps to create a keyspace, table and load 
data:

CREATE KEYSPACE testksp 
WITH replication = {'class': 'SimpleStrategy', 'replication_factor':3} 
AND durable_writes = true;

use testksp;

CREATE TABLE test ( 
useruid varchar, 
direction varchar, 
last_modified timestamp, 
value varchar, 
PRIMARY KEY ((useruid, direction), last_modified) 
);

INSERT INTO test (useruid,direction,last_modified,value) VALUES ('userid2', 
'out', '2015-09-18T14:11:15.010+00:00', 'a value1') USING TTL 86400; 
INSERT INTO test (useruid,direction,last_modified,value) VALUES ('userid2', 
'out', '2015-09-18T14:11:15.020+00:00', 'a value2') USING TTL 86400; 
INSERT INTO test (useruid,direction,last_modified,value) VALUES ('userid2', 
'in', '2015-09-18T14:11:15.030+00:00', 'a value3') USING TTL 86400; 
INSERT INTO test (useruid,direction,last_modified,value) VALUES ('userid2', 
'in', '2015-09-18T14:11:15.040+00:00', 'a value4') USING TTL 86400; 
INSERT INTO test (useruid,direction,last_modified,value) VALUES ('userid2', 
'out', '2015-09-18T14:11:15.050+00:00', 'a value5') USING TTL 86400; 
INSERT INTO test (useruid,direction,last_modified,value) VALUES ('userid2', 
'out', '2015-09-18T14:11:15.060+00:00', 'a value6') USING TTL 86400; 
INSERT INTO test (useruid,direction,last_modified,value) VALUES ('userid2', 
'in', '2015-09-18T14:11:15.070+00:00', 'a value7') USING TTL 86400; 
INSERT INTO test (useruid,direction,last_modified,value) VALUES ('userid2', 
'in', '2015-09-18T14:11:15.080+00:00', 'a value8') USING TTL 86400; 
INSERT INTO test (useruid,direction,last_modified,value) VALUES ('userid2', 
'out', '2015-09-18T14:11:15.090+00:00', 'a value9') USING TTL 86400; 
INSERT INTO test (useruid,direction,last_modified,value) VALUES ('userid2', 
'out', '2015-09-18T14:11:15.100+00:00', 'a value10') USING TTL 86400; 


Running this query with ttl(value) shows this message:


cqlsh:testksp> SELECT useruid, 
value,ttl(value),last_modified,blobAsBigint(timestampAsBlob(last_modified)) 
FROM test WHERE useruid= 'userid2' AND direction IN ('out', 'in') ORDER BY 
last_modified; 

InvalidRequest: code=2200 [Invalid query] message="Cannot page queries with 
both ORDER BY and a IN restriction on the partition key; you must either remove 
the ORDER BY or the IN and sort client side, or disable paging for this query"


Turning off paging returns the result:


cqlsh:testksp> paging off;
Disabled Query paging.

cqlsh:testksp> SELECT useruid, 
value,ttl(value),last_modified,blobAsBigint(timestampAsBlob(last_modified)) 
FROM test WHERE useruid= 'userid2' AND direction IN ('out', 'in') ORDER BY 
last_modified; 

 useruid | value | ttl(value) | last_modified| 
blobAsBigint(timestampAsBlob(last_modified))
-+---++--+--
 userid2 |  a value1 |  86275 | 2015-09-18 14:11:15+ |  
  1442585475010
 userid2 |  a value2 |  86275 | 2015-09-18 14:11:15+ |  
  1442585475020
 userid2 |  a value5 |  86275 | 2015-09-18 14:11:15+ |  
  1442585475050
 userid2 |  a value6 |  86275 | 2015-09-18 14:11:15+ |  
  1442585475060
 userid2 |  a value9 |  86275 | 2015-09-18 14:11:15+ |  
  1442585475090
 userid2 |  a value3 |  86275 | 2015-09-18 14:11:15+ |  
  1442585475030
 userid2 |  a value4 |  86275 | 2015-09-18 14:11:15+ |  
  1442585475040
 userid2 |  a value7 |  86275 | 2015-09-18 14:11:15+ |  
  1442585475070
 userid2 |  a value8 |  86275 | 2015-09-18 14:11:15+ |  
  1442585475080
 userid2 | a value10 |  86277 | 2015-09-18 14:11:15+ |  
  1442585475100

(10 rows)

Notice value1 and value10 start and finish, but the other rows are in the wrong 
order. Without ttl(value) the results are returned value1 to value10 in the 
correct order.

Running the same test using C* 2.0.16.678 there is no need to turn off paging. 
The results are returned with the wrong order when querying with ttl(value).




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


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

2015-10-20 Thread snazy
Merge branch 'cassandra-3.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/f8fa3a42
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f8fa3a42
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f8fa3a42

Branch: refs/heads/trunk
Commit: f8fa3a42712e0f8498180b062c421426189e3ddc
Parents: 881e2da 615945d
Author: Robert Stupp 
Authored: Tue Oct 20 17:45:43 2015 +0200
Committer: Robert Stupp 
Committed: Tue Oct 20 17:45:43 2015 +0200

--
 CHANGES.txt |   1 +
 ...ore-3.0.0-alpha3-093a692-SNAPSHOT-shaded.jar | Bin 2281177 -> 0 bytes
 ...assandra-driver-core-3.0.0-alpha4-shaded.jar | Bin 0 -> 2275541 bytes
 .../cassandra/cql3/functions/UDFunction.java|   4 +--
 .../cassandra/cql3/functions/UDHelper.java  |  15 +++
 .../validation/operations/AggregationTest.java  |  26 +++
 6 files changed, 39 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f8fa3a42/CHANGES.txt
--
diff --cc CHANGES.txt
index 5cd268b,6c97ffb..88c439e
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,9 -1,5 +1,10 @@@
 +3.2
 + * Abort in-progress queries that time out (CASSANDRA-7392)
 + * Add transparent data encryption core classes (CASSANDRA-9945)
 +
 +
  3.0
+  * Aggregate with Initial Condition fails with C* 3.0 (CASSANDRA-10367)
  Merged from 2.2:
   * Expose phi values from failure detector via JMX and tweak debug
 and trace logging (CASSANDRA-9526)



[1/2] cassandra git commit: Aggregate with Initial Condition fails with C* 3.0

2015-10-20 Thread snazy
Repository: cassandra
Updated Branches:
  refs/heads/trunk 881e2da0a -> f8fa3a427


Aggregate with Initial Condition fails with C* 3.0

patch by Robert Stupp; reviewed by Sylvain Lebresne for CASSANDRA-10367


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

Branch: refs/heads/trunk
Commit: 615945d275efe1899634f7db6f240f4c1f90b495
Parents: 1b5e3a9
Author: Robert Stupp 
Authored: Tue Oct 20 17:45:30 2015 +0200
Committer: Robert Stupp 
Committed: Tue Oct 20 17:45:30 2015 +0200

--
 CHANGES.txt |   1 +
 ...ore-3.0.0-alpha3-093a692-SNAPSHOT-shaded.jar | Bin 2281177 -> 0 bytes
 ...assandra-driver-core-3.0.0-alpha4-shaded.jar | Bin 0 -> 2275541 bytes
 .../cassandra/cql3/functions/UDFunction.java|   4 +--
 .../cassandra/cql3/functions/UDHelper.java  |  15 +++
 .../validation/operations/AggregationTest.java  |  26 +++
 6 files changed, 39 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/615945d2/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 616ff47..6c97ffb 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0
+ * Aggregate with Initial Condition fails with C* 3.0 (CASSANDRA-10367)
 Merged from 2.2:
  * Expose phi values from failure detector via JMX and tweak debug
and trace logging (CASSANDRA-9526)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/615945d2/lib/cassandra-driver-core-3.0.0-alpha3-093a692-SNAPSHOT-shaded.jar
--
diff --git a/lib/cassandra-driver-core-3.0.0-alpha3-093a692-SNAPSHOT-shaded.jar 
b/lib/cassandra-driver-core-3.0.0-alpha3-093a692-SNAPSHOT-shaded.jar
deleted file mode 100644
index daf7837..000
Binary files 
a/lib/cassandra-driver-core-3.0.0-alpha3-093a692-SNAPSHOT-shaded.jar and 
/dev/null differ

http://git-wip-us.apache.org/repos/asf/cassandra/blob/615945d2/lib/cassandra-driver-core-3.0.0-alpha4-shaded.jar
--
diff --git a/lib/cassandra-driver-core-3.0.0-alpha4-shaded.jar 
b/lib/cassandra-driver-core-3.0.0-alpha4-shaded.jar
new file mode 100644
index 000..9a4921e
Binary files /dev/null and b/lib/cassandra-driver-core-3.0.0-alpha4-shaded.jar 
differ

http://git-wip-us.apache.org/repos/asf/cassandra/blob/615945d2/src/java/org/apache/cassandra/cql3/functions/UDFunction.java
--
diff --git a/src/java/org/apache/cassandra/cql3/functions/UDFunction.java 
b/src/java/org/apache/cassandra/cql3/functions/UDFunction.java
index 36cdb15..5f7c024 100644
--- a/src/java/org/apache/cassandra/cql3/functions/UDFunction.java
+++ b/src/java/org/apache/cassandra/cql3/functions/UDFunction.java
@@ -300,8 +300,8 @@ public abstract class UDFunction extends AbstractFunction 
implements ScalarFunct
 {
 // Get the TypeCodec stuff in Java Driver initialized.
 // This is to get the classes loaded outside of the restricted 
sandbox's security context of a UDF.
-
UDHelper.codecRegistry.codecFor(DataType.inet()).format(InetAddress.getLoopbackAddress());
-UDHelper.codecRegistry.codecFor(DataType.ascii()).format("");
+
UDHelper.codecFor(DataType.inet()).format(InetAddress.getLoopbackAddress());
+UDHelper.codecFor(DataType.ascii()).format("");
 }
 
 private static final class ThreadIdAndCpuTime extends 
CompletableFuture

http://git-wip-us.apache.org/repos/asf/cassandra/blob/615945d2/src/java/org/apache/cassandra/cql3/functions/UDHelper.java
--
diff --git a/src/java/org/apache/cassandra/cql3/functions/UDHelper.java 
b/src/java/org/apache/cassandra/cql3/functions/UDHelper.java
index df6ca1f..d7700c4 100644
--- a/src/java/org/apache/cassandra/cql3/functions/UDHelper.java
+++ b/src/java/org/apache/cassandra/cql3/functions/UDHelper.java
@@ -38,8 +38,8 @@ import org.apache.cassandra.transport.Server;
 public final class UDHelper
 {
 // TODO make these c'tors and methods public in Java-Driver - see 
https://datastax-oss.atlassian.net/browse/JAVA-502
-static final MethodHandle methodParseOne;
-static final CodecRegistry codecRegistry;
+private static final MethodHandle methodParseOne;
+private static final CodecRegistry codecRegistry;
 static
 {
 try
@@ -56,6 +56,11 @@ public final class UDHelper
 }
 }
 
+static TypeCodec codecFor(DataType dataType)
+{
+return codecRegistry.cod

cassandra git commit: Aggregate with Initial Condition fails with C* 3.0

2015-10-20 Thread snazy
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.0 1b5e3a9b1 -> 615945d27


Aggregate with Initial Condition fails with C* 3.0

patch by Robert Stupp; reviewed by Sylvain Lebresne for CASSANDRA-10367


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

Branch: refs/heads/cassandra-3.0
Commit: 615945d275efe1899634f7db6f240f4c1f90b495
Parents: 1b5e3a9
Author: Robert Stupp 
Authored: Tue Oct 20 17:45:30 2015 +0200
Committer: Robert Stupp 
Committed: Tue Oct 20 17:45:30 2015 +0200

--
 CHANGES.txt |   1 +
 ...ore-3.0.0-alpha3-093a692-SNAPSHOT-shaded.jar | Bin 2281177 -> 0 bytes
 ...assandra-driver-core-3.0.0-alpha4-shaded.jar | Bin 0 -> 2275541 bytes
 .../cassandra/cql3/functions/UDFunction.java|   4 +--
 .../cassandra/cql3/functions/UDHelper.java  |  15 +++
 .../validation/operations/AggregationTest.java  |  26 +++
 6 files changed, 39 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/615945d2/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 616ff47..6c97ffb 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0
+ * Aggregate with Initial Condition fails with C* 3.0 (CASSANDRA-10367)
 Merged from 2.2:
  * Expose phi values from failure detector via JMX and tweak debug
and trace logging (CASSANDRA-9526)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/615945d2/lib/cassandra-driver-core-3.0.0-alpha3-093a692-SNAPSHOT-shaded.jar
--
diff --git a/lib/cassandra-driver-core-3.0.0-alpha3-093a692-SNAPSHOT-shaded.jar 
b/lib/cassandra-driver-core-3.0.0-alpha3-093a692-SNAPSHOT-shaded.jar
deleted file mode 100644
index daf7837..000
Binary files 
a/lib/cassandra-driver-core-3.0.0-alpha3-093a692-SNAPSHOT-shaded.jar and 
/dev/null differ

http://git-wip-us.apache.org/repos/asf/cassandra/blob/615945d2/lib/cassandra-driver-core-3.0.0-alpha4-shaded.jar
--
diff --git a/lib/cassandra-driver-core-3.0.0-alpha4-shaded.jar 
b/lib/cassandra-driver-core-3.0.0-alpha4-shaded.jar
new file mode 100644
index 000..9a4921e
Binary files /dev/null and b/lib/cassandra-driver-core-3.0.0-alpha4-shaded.jar 
differ

http://git-wip-us.apache.org/repos/asf/cassandra/blob/615945d2/src/java/org/apache/cassandra/cql3/functions/UDFunction.java
--
diff --git a/src/java/org/apache/cassandra/cql3/functions/UDFunction.java 
b/src/java/org/apache/cassandra/cql3/functions/UDFunction.java
index 36cdb15..5f7c024 100644
--- a/src/java/org/apache/cassandra/cql3/functions/UDFunction.java
+++ b/src/java/org/apache/cassandra/cql3/functions/UDFunction.java
@@ -300,8 +300,8 @@ public abstract class UDFunction extends AbstractFunction 
implements ScalarFunct
 {
 // Get the TypeCodec stuff in Java Driver initialized.
 // This is to get the classes loaded outside of the restricted 
sandbox's security context of a UDF.
-
UDHelper.codecRegistry.codecFor(DataType.inet()).format(InetAddress.getLoopbackAddress());
-UDHelper.codecRegistry.codecFor(DataType.ascii()).format("");
+
UDHelper.codecFor(DataType.inet()).format(InetAddress.getLoopbackAddress());
+UDHelper.codecFor(DataType.ascii()).format("");
 }
 
 private static final class ThreadIdAndCpuTime extends 
CompletableFuture

http://git-wip-us.apache.org/repos/asf/cassandra/blob/615945d2/src/java/org/apache/cassandra/cql3/functions/UDHelper.java
--
diff --git a/src/java/org/apache/cassandra/cql3/functions/UDHelper.java 
b/src/java/org/apache/cassandra/cql3/functions/UDHelper.java
index df6ca1f..d7700c4 100644
--- a/src/java/org/apache/cassandra/cql3/functions/UDHelper.java
+++ b/src/java/org/apache/cassandra/cql3/functions/UDHelper.java
@@ -38,8 +38,8 @@ import org.apache.cassandra.transport.Server;
 public final class UDHelper
 {
 // TODO make these c'tors and methods public in Java-Driver - see 
https://datastax-oss.atlassian.net/browse/JAVA-502
-static final MethodHandle methodParseOne;
-static final CodecRegistry codecRegistry;
+private static final MethodHandle methodParseOne;
+private static final CodecRegistry codecRegistry;
 static
 {
 try
@@ -56,6 +56,11 @@ public final class UDHelper
 }
 }
 
+static TypeCodec codecFor(DataType dataType)
+{
+return c

[jira] [Resolved] (CASSANDRA-7046) Update nodetool commands to output the date and time they were run on

2015-10-20 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne resolved CASSANDRA-7046.
-
Resolution: Won't Fix

I agree with Brandon here: you can get this with either a trivial shell script 
or by checking {{~/.cassandra/nodetool.history}}. I'll add that printing that 
by default could potentially break scripts (and makes it painful for scripts in 
general) and adding a option for something that can trivially be done otherwise 
strongly feels like clutter. Sorry but closing.

> Update nodetool commands to output the date and time they were run on
> -
>
> Key: CASSANDRA-7046
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7046
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Johnny Miller
>Assignee: Clément Lardeur
>Priority: Trivial
>  Labels: lhf
> Attachments: trunk-7046-v1.patch
>
>
> It would help if the various nodetool commands also outputted the system date 
> time they were run. Often these commands are executed and then we look at the 
> cassandra log files to try and find out what was happening at that time. 
> This is certainly just a convenience feature, but it would be nice to have 
> the information in there to aid with diagnostics.



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


[jira] [Updated] (CASSANDRA-10555) ReadCommandTest should truncate between test cases

2015-10-20 Thread Joshua McKenzie (JIRA)

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

Joshua McKenzie updated CASSANDRA-10555:

Fix Version/s: 3.1

> ReadCommandTest should truncate between test cases 
> ---
>
> Key: CASSANDRA-10555
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10555
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tests
>Reporter: Jeff Jirsa
>Assignee: Jeff Jirsa
>Priority: Minor
> Fix For: 3.1
>
>
> ReadCommandTest writes to the same CF in multiple unit tests, and then counts 
> the results in a partition. This can lead to tests failing in some 
> circumstances:
> {noformat}
> [junit] Testcase: 
> testSinglePartitionNamesAbort(org.apache.cassandra.db.ReadCommandTest): FAILED
> [junit] expected:<2> but was:<1>
> [junit] junit.framework.AssertionFailedError: expected:<2> but was:<1>
> [junit]   at 
> org.apache.cassandra.db.ReadCommandTest.testSinglePartitionNamesAbort(ReadCommandTest.java:140)
> [junit] 
> [junit] 
> [junit] Testcase: 
> testSinglePartitionSliceAbort(org.apache.cassandra.db.ReadCommandTest): FAILED
> [junit] expected:<2> but was:<3>
> [junit] junit.framework.AssertionFailedError: expected:<2> but was:<3>
> [junit]   at 
> org.apache.cassandra.db.ReadCommandTest.testSinglePartitionSliceAbort(ReadCommandTest.java:111)
> {noformat}
> This can be fixed trivially by truncating the CF at the beginning of 
> {{testSinglePartitionSliceAbort}} and {{testSinglePartitionNamesAbort}} 
> Also, once the truncate is in place, a potential typo is exposed in 
> {{testSinglePartitionNamesAbort}}, where the partition is written with 
> clustering column {{cc}} and {{cdd}}, but the read command reads {{cc}} and 
> {{dd}} 



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


[jira] [Assigned] (CASSANDRA-10554) Auto Bootstraping a new node fails

2015-10-20 Thread Yuki Morishita (JIRA)

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

Yuki Morishita reassigned CASSANDRA-10554:
--

Assignee: Yuki Morishita

> Auto Bootstraping a new node fails
> --
>
> Key: CASSANDRA-10554
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10554
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Alan Boudreault
>Assignee: Yuki Morishita
> Fix For: 3.0.0
>
> Attachments: 0001-Add-debug.txt
>
>
> I've been trying to add a new node in my 3.0 cluster and it seems to fail. 
> All my nodes are using apache/cassandra-3.0.0 branch. At the beginning, I can 
> see the following error:
> {code}
> INFO  18:45:55 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a ID#0] Prepare 
> completed. Receiving 42 files(1910066622 bytes), sending 0 files(0 bytes)
> WARN  18:45:55 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a] Retrying for 
> following error
> java.lang.RuntimeException: Unknown column added_time during deserialization
> at 
> org.apache.cassandra.db.SerializationHeader$Component.toHeader(SerializationHeader.java:331)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.StreamReader.createWriter(StreamReader.java:136)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.compress.CompressedStreamReader.read(CompressedStreamReader.java:77)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.messages.IncomingFileMessage$1.deserialize(IncomingFileMessage.java:50)
>  [main/:na]
> at 
> org.apache.cassandra.streaming.messages.IncomingFileMessage$1.deserialize(IncomingFileMessage.java:39)
>  [main/:na]
> at 
> org.apache.cassandra.streaming.messages.StreamMessage.deserialize(StreamMessage.java:59)
>  [main/:na]
> at 
> org.apache.cassandra.streaming.ConnectionHandler$IncomingMessageHandler.run(ConnectionHandler.java:261)
>  [main/:na]
> at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
> ERROR 18:45:55 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a] Streaming error 
> occurred
> java.lang.IllegalArgumentException: Unknown type 0
> at 
> org.apache.cassandra.streaming.messages.StreamMessage$Type.get(StreamMessage.java:97)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.messages.StreamMessage.deserialize(StreamMessage.java:58)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.ConnectionHandler$IncomingMessageHandler.run(ConnectionHandler.java:261)
>  ~[main/:na]
> at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
> INFO  18:45:55 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a] Session with 
> /54.210.187.114 is complete
> INFO  18:45:56 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a ID#0] Prepare 
> completed. Receiving 38 files(2323537628 bytes), sending 0 files(0 bytes)
> WARN  18:45:56 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a] Retrying for 
> following error
> java.lang.RuntimeException: Unknown column added_time during deserialization
> at 
> org.apache.cassandra.db.SerializationHeader$Component.toHeader(SerializationHeader.java:331)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.StreamReader.createWriter(StreamReader.java:136)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.compress.CompressedStreamReader.read(CompressedStreamReader.java:77)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.messages.IncomingFileMessage$1.deserialize(IncomingFileMessage.java:50)
>  [main/:na]
> at 
> org.apache.cassandra.streaming.messages.IncomingFileMessage$1.deserialize(IncomingFileMessage.java:39)
>  [main/:na]
> at 
> org.apache.cassandra.streaming.messages.StreamMessage.deserialize(StreamMessage.java:59)
>  [main/:na]
> at 
> org.apache.cassandra.streaming.ConnectionHandler$IncomingMessageHandler.run(ConnectionHandler.java:261)
>  [main/:na]
> at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
> ERROR 18:45:56 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a] Streaming error 
> occurred
> java.lang.IllegalArgumentException: Unknown type 0
> at 
> org.apache.cassandra.streaming.messages.StreamMessage$Type.get(StreamMessage.java:97)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.messages.StreamMessage.deserialize(StreamMessage.java:58)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.ConnectionHandler$IncomingMessageHandler.run(ConnectionHandler.java:261)
>  ~[main/:na]
> at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
> INFO  18:45:56 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a] Session with 
> /54.210.184.198 is complete
> INFO  18:45:56 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a ID#0] Prepare 
> completed. Receiving 35 files(2069893759 bytes), sending 0 files(0 bytes)
> WARN  18:45:57 [Stream #9f95fa90-7691-11e5-931f-5b7358

[jira] [Resolved] (CASSANDRA-9943) nodetool repair error: "nodetool failed, check server logs"

2015-10-20 Thread Blake Atkinson (JIRA)

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

Blake Atkinson resolved CASSANDRA-9943.
---
Resolution: Cannot Reproduce

Closing since I could not reproduce. In any case, the exception did not seem to 
have any negative effects. 

> nodetool repair error: "nodetool failed, check server logs"
> ---
>
> Key: CASSANDRA-9943
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9943
> Project: Cassandra
>  Issue Type: Bug
> Environment: Ubuntu 14.04
> AWS m3.xlarge
> Cassandra 2.1.8
>Reporter: Blake Atkinson
>Priority: Minor
> Attachments: system.log
>
>
> Rolling a "nodetool repair -pr" through a 5 node cluster and got the 
> following error at the end of the repair:
> {noformat}
> [2015-07-30 19:04:46,136] Repair session d7bd3ac0-36ed-11e5-b5e9-fbf3677ba4be 
> for range (7944740144028661,11828837077287116] finished
> [2015-07-30 19:04:46,136] Repair session d7c09620-36ed-11e5-b5e9-fbf3677ba4be 
> for range (1732339538045103946,1747616566950087006] finished
> [2015-07-30 19:04:46,136] Repair session d7c502f1-36ed-11e5-b5e9-fbf3677ba4be 
> for range (-6749979629629406618,-6744383949129926802] finished
> [2015-07-30 19:04:46,137] Repair session d7c8fa90-36ed-11e5-b5e9-fbf3677ba4be 
> for range (4123273621202200825,4151984034998723255] finished
> [2015-07-30 19:04:46,137] Repair command #8 finished
> error: nodetool failed, check server logs
> -- StackTrace --
> java.lang.RuntimeException: nodetool failed, check server logs
> at 
> org.apache.cassandra.tools.NodeTool$NodeToolCmd.run(NodeTool.java:290)
> at org.apache.cassandra.tools.NodeTool.main(NodeTool.java:202)
> {noformat}
> I've seen it before with repairs on previous versions of 2.1, but can't repro 
> it consistently.  Right after the repair "finishes", it spits out many "LEAK 
> DETECTED", but not sure if it's related.



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


[jira] [Commented] (CASSANDRA-10555) ReadCommandTest should truncate between test cases

2015-10-20 Thread Joshua McKenzie (JIRA)

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

Joshua McKenzie commented on CASSANDRA-10555:
-

Committed as {{881e2da0a4c37f54fbd52ed66f080e33af02b978}}

> ReadCommandTest should truncate between test cases 
> ---
>
> Key: CASSANDRA-10555
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10555
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tests
>Reporter: Jeff Jirsa
>Assignee: Jeff Jirsa
>Priority: Minor
> Fix For: 3.1
>
>
> ReadCommandTest writes to the same CF in multiple unit tests, and then counts 
> the results in a partition. This can lead to tests failing in some 
> circumstances:
> {noformat}
> [junit] Testcase: 
> testSinglePartitionNamesAbort(org.apache.cassandra.db.ReadCommandTest): FAILED
> [junit] expected:<2> but was:<1>
> [junit] junit.framework.AssertionFailedError: expected:<2> but was:<1>
> [junit]   at 
> org.apache.cassandra.db.ReadCommandTest.testSinglePartitionNamesAbort(ReadCommandTest.java:140)
> [junit] 
> [junit] 
> [junit] Testcase: 
> testSinglePartitionSliceAbort(org.apache.cassandra.db.ReadCommandTest): FAILED
> [junit] expected:<2> but was:<3>
> [junit] junit.framework.AssertionFailedError: expected:<2> but was:<3>
> [junit]   at 
> org.apache.cassandra.db.ReadCommandTest.testSinglePartitionSliceAbort(ReadCommandTest.java:111)
> {noformat}
> This can be fixed trivially by truncating the CF at the beginning of 
> {{testSinglePartitionSliceAbort}} and {{testSinglePartitionNamesAbort}} 
> Also, once the truncate is in place, a potential typo is exposed in 
> {{testSinglePartitionNamesAbort}}, where the partition is written with 
> clustering column {{cc}} and {{cdd}}, but the read command reads {{cc}} and 
> {{dd}} 



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


cassandra git commit: Fix ReadCommandTest

2015-10-20 Thread jmckenzie
Repository: cassandra
Updated Branches:
  refs/heads/trunk e017d89a6 -> 881e2da0a


Fix ReadCommandTest

Patch by jjirsa; reviewed by stefania for CASSANDRA-10555


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

Branch: refs/heads/trunk
Commit: 881e2da0a4c37f54fbd52ed66f080e33af02b978
Parents: e017d89
Author: Jeff Jirsa 
Authored: Tue Oct 20 11:32:52 2015 -0400
Committer: Joshua McKenzie 
Committed: Tue Oct 20 11:32:52 2015 -0400

--
 test/unit/org/apache/cassandra/db/ReadCommandTest.java | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/881e2da0/test/unit/org/apache/cassandra/db/ReadCommandTest.java
--
diff --git a/test/unit/org/apache/cassandra/db/ReadCommandTest.java 
b/test/unit/org/apache/cassandra/db/ReadCommandTest.java
index fcaa92f..663080b 100644
--- a/test/unit/org/apache/cassandra/db/ReadCommandTest.java
+++ b/test/unit/org/apache/cassandra/db/ReadCommandTest.java
@@ -90,6 +90,8 @@ public class ReadCommandTest
 {
 ColumnFamilyStore cfs = 
Keyspace.open(KEYSPACE).getColumnFamilyStore(CF2);
 
+cfs.truncateBlocking();
+
 new RowUpdateBuilder(cfs.metadata, 0, ByteBufferUtil.bytes("key"))
 .clustering("cc")
 .add("a", ByteBufferUtil.bytes("abcd"))
@@ -119,6 +121,8 @@ public class ReadCommandTest
 {
 ColumnFamilyStore cfs = 
Keyspace.open(KEYSPACE).getColumnFamilyStore(CF2);
 
+cfs.truncateBlocking();
+
 new RowUpdateBuilder(cfs.metadata, 0, ByteBufferUtil.bytes("key"))
 .clustering("cc")
 .add("a", ByteBufferUtil.bytes("abcd"))
@@ -128,7 +132,7 @@ public class ReadCommandTest
 cfs.forceBlockingFlush();
 
 new RowUpdateBuilder(cfs.metadata, 0, ByteBufferUtil.bytes("key"))
-.clustering("cdd")
+.clustering("dd")
 .add("a", ByteBufferUtil.bytes("abcd"))
 .build()
 .apply();



[jira] [Comment Edited] (CASSANDRA-10264) Unable to use conditions on static columns for DELETE

2015-10-20 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer edited comment on CASSANDRA-10264 at 10/20/15 3:14 PM:
--

For the moment I cannot because cqlshlib tests do not work on Windows 
(CASSANDRA-10541). 
When the issue is fixed I will work on it.


was (Author: blerer):
For the moment I cannot because cqlshlib tests do not work on Windows 
(CASSANDRA-10541). 

> Unable to use conditions on static columns for DELETE
> -
>
> Key: CASSANDRA-10264
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10264
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
> Environment: Cassandra 2.2.0
>Reporter: DOAN DuyHai
>Assignee: Benjamin Lerer
> Fix For: 2.2.4, 2.1.12, 3.0.0
>
> Attachments: 10264-2.1-V2.txt, 10264-2.1.txt, 10264-3.0-V2.txt, 
> 10264-3.0.txt
>
>
> {noformat}
> cqlsh:test> create table static_table(id int, stat int static, ord int, val 
> text, primary key(id,ord));
> cqlsh:test> insert into static_table (id,stat,ord,val) VALUES ( 1, 1, 1, '1');
> cqlsh:test> delete from static_table where id=1 and ord=1 if stat != 1;
> Invalid syntax at line 1, char 55
>   delete from static_table where id=1 and ord=1 if stat != 1;
> ^
> {noformat}
> Same error if using =, <, <=, >= or > condition
> According to [~thobbs] the syntax should work. Plus, the error message is 
> wrong



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


[jira] [Commented] (CASSANDRA-8821) Errors in JVM_OPTS and cassandra_parms environment vars

2015-10-20 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-8821:
-

[~mshuler] ping (have you seen Eric's comments?).

> Errors in JVM_OPTS and cassandra_parms environment vars
> ---
>
> Key: CASSANDRA-8821
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8821
> Project: Cassandra
>  Issue Type: Bug
> Environment: Ubuntu 14.04 LTS amd64
>Reporter: Terry Moschou
>Assignee: Michael Shuler
>Priority: Minor
> Fix For: 2.1.x, 2.2.x
>
> Attachments: 8821_2.0.txt, 8821_2.1.txt
>
>
> Repos:
> deb http://www.apache.org/dist/cassandra/debian 21x main
> deb-src http://www.apache.org/dist/cassandra/debian 21x main
> The cassandra init script
>   /etc/init.d/cassandra
> is sourcing the environment file
>   /etc/cassandra/cassandra-env.sh
> twice. Once directly from the init script, and again inside
>   /usr/sbin/cassandra
> The result is arguments in JVM_OPTS are duplicated.
> Further the JVM opt
>   -XX:CMSWaitDuration=1
> is defined twice if jvm >= 1.7.60.
> Also, for the environment variable CASSANDRA_CONF used in this context
>   -XX:CompileCommandFile=$CASSANDRA_CONF/hotspot_compiler"
> is undefined when
>   /etc/cassandra/cassandra-env.sh
> is sourced from the init script.
> Lastly the variable cassandra_storagedir is undefined in
>   /usr/sbin/cassandra
> when used in this context
>   -Dcassandra.storagedir=$cassandra_storagedir



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


[jira] [Commented] (CASSANDRA-10264) Unable to use conditions on static columns for DELETE

2015-10-20 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer commented on CASSANDRA-10264:


For the moment I cannot because cqlshlib tests do not work on Windows 
(CASSANDRA-10541). 

> Unable to use conditions on static columns for DELETE
> -
>
> Key: CASSANDRA-10264
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10264
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
> Environment: Cassandra 2.2.0
>Reporter: DOAN DuyHai
>Assignee: Benjamin Lerer
> Fix For: 2.2.4, 2.1.12, 3.0.0
>
> Attachments: 10264-2.1-V2.txt, 10264-2.1.txt, 10264-3.0-V2.txt, 
> 10264-3.0.txt
>
>
> {noformat}
> cqlsh:test> create table static_table(id int, stat int static, ord int, val 
> text, primary key(id,ord));
> cqlsh:test> insert into static_table (id,stat,ord,val) VALUES ( 1, 1, 1, '1');
> cqlsh:test> delete from static_table where id=1 and ord=1 if stat != 1;
> Invalid syntax at line 1, char 55
>   delete from static_table where id=1 and ord=1 if stat != 1;
> ^
> {noformat}
> Same error if using =, <, <=, >= or > condition
> According to [~thobbs] the syntax should work. Plus, the error message is 
> wrong



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


[jira] [Commented] (CASSANDRA-10264) Unable to use conditions on static columns for DELETE

2015-10-20 Thread Tyler Hobbs (JIRA)

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

Tyler Hobbs commented on CASSANDRA-10264:
-

[~blerer] can you also add a test case in 
{{pylib/cqlshlib/test/test_cqlsh_completion.py}}?  It looks like the new tests 
only cover C*.

> Unable to use conditions on static columns for DELETE
> -
>
> Key: CASSANDRA-10264
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10264
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
> Environment: Cassandra 2.2.0
>Reporter: DOAN DuyHai
>Assignee: Benjamin Lerer
> Fix For: 2.2.4, 2.1.12, 3.0.0
>
> Attachments: 10264-2.1-V2.txt, 10264-2.1.txt, 10264-3.0-V2.txt, 
> 10264-3.0.txt
>
>
> {noformat}
> cqlsh:test> create table static_table(id int, stat int static, ord int, val 
> text, primary key(id,ord));
> cqlsh:test> insert into static_table (id,stat,ord,val) VALUES ( 1, 1, 1, '1');
> cqlsh:test> delete from static_table where id=1 and ord=1 if stat != 1;
> Invalid syntax at line 1, char 55
>   delete from static_table where id=1 and ord=1 if stat != 1;
> ^
> {noformat}
> Same error if using =, <, <=, >= or > condition
> According to [~thobbs] the syntax should work. Plus, the error message is 
> wrong



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


[jira] [Updated] (CASSANDRA-9975) Flatten Iterator call hierarchy with a shared Transformer

2015-10-20 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-9975:
-
Reviewer: Branimir Lambov  (was: Aleksey Yeschenko)

> Flatten Iterator call hierarchy with a shared Transformer
> -
>
> Key: CASSANDRA-9975
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9975
> Project: Cassandra
>  Issue Type: Sub-task
>  Components: Core
>Reporter: Benedict
>Assignee: Benedict
> Fix For: 3.0.0
>
>
> Stepping through a read response is made exceedingly difficult by the sheer 
> depth of the call hierarchy, and how rapidly your context jumps around. This 
> ticket intend to partially address that, by flattening one of the main causes 
> of this: iterator transformations.
> I have a patch that attempts to mitigate (but not entirely eliminate) this, 
> through the introduction of a {{RowTransformer}} class that all 
> transformations are applied through. If a transformation has already been 
> applied, the {{RowTransformer}} class does not wrap a new iterator, but 
> instead returns a new {{RowTransformer}} that wraps the original underlying 
> (untransformed) iterator and both transformations. This can accumulate an 
> arbitrary number of transformations and, quite importantly, can apply the 
> filtration step {{Unfiltered -> Row}}  in the same instance as well. The 
> intention being that a majority of control flow happens inside this 
> {{RowTransformer}}, so there is far less context jumping to cope with.



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


[jira] [Commented] (CASSANDRA-10363) NullPointerException returned with select ttl(value), IN, ORDER BY and paging off

2015-10-20 Thread Jeremiah Jordan (JIRA)

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

Jeremiah Jordan commented on CASSANDRA-10363:
-

This should probably get a CHANGES.txt entry.

> NullPointerException returned with select ttl(value), IN, ORDER BY and paging 
> off
> -
>
> Key: CASSANDRA-10363
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10363
> Project: Cassandra
>  Issue Type: Bug
> Environment: Apache Cassandra 2.1.8.689
>Reporter: Sucwinder Bassi
>Assignee: Benjamin Lerer
>Priority: Minor
> Fix For: 3.0.0 rc2, 2.2.4, 2.1.12
>
> Attachments: 10363-2.0-c4de752.txt
>
>
> Running this query with paging off returns a NullPointerException:
> cqlsh:test> SELECT value, ttl(value), last_modified FROM test where 
> useruid='userid1' AND direction IN ('out','in') ORDER BY last_modified; 
> ServerError:  message="java.lang.NullPointerException">
> Here's the stack trace from the system.log:
> ERROR [SharedPool-Worker-1] 2015-09-17 13:11:03,937  ErrorMessage.java:251 - 
> Unexpected exception during request
> java.lang.NullPointerException: null
> at 
> org.apache.cassandra.db.marshal.LongType.compareLongs(LongType.java:41) 
> ~[cassandra-all-2.1.8.689.jar:2.1.8.689]
> at 
> org.apache.cassandra.db.marshal.TimestampType.compare(TimestampType.java:48) 
> ~[cassandra-all-2.1.8.689.jar:2.1.8.689]
> at 
> org.apache.cassandra.db.marshal.TimestampType.compare(TimestampType.java:38) 
> ~[cassandra-all-2.1.8.689.jar:2.1.8.689]
> at 
> org.apache.cassandra.cql3.statements.SelectStatement$SingleColumnComparator.compare(SelectStatement.java:2419)
>  ~[cassandra-all-2.1.8.689.jar:2.1.8.689]
> at 
> org.apache.cassandra.cql3.statements.SelectStatement$SingleColumnComparator.compare(SelectStatement.java:2406)
>  ~[cassandra-all-2.1.8.689.jar:2.1.8.689]
> at java.util.TimSort.countRunAndMakeAscending(TimSort.java:351) 
> ~[na:1.8.0_40]
> at java.util.TimSort.sort(TimSort.java:216) ~[na:1.8.0_40]
> at java.util.Arrays.sort(Arrays.java:1512) ~[na:1.8.0_40]
> at java.util.ArrayList.sort(ArrayList.java:1454) ~[na:1.8.0_40]
> at java.util.Collections.sort(Collections.java:175) ~[na:1.8.0_40]
> at 
> org.apache.cassandra.cql3.statements.SelectStatement.orderResults(SelectStatement.java:1400)
>  ~[cassandra-all-2.1.8.689.jar:2.1.8.689]
> at 
> org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:1255)
>  ~[cassandra-all-2.1.8.689.jar:2.1.8.689]
> at 
> org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:299)
>  ~[cassandra-all-2.1.8.689.jar:2.1.8.689]
> at 
> org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:276)
>  ~[cassandra-all-2.1.8.689.jar:2.1.8.689]
> at 
> org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:224)
>  ~[cassandra-all-2.1.8.689.jar:2.1.8.689]
> at 
> org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:67)
>  ~[cassandra-all-2.1.8.689.jar:2.1.8.689]
> at 
> org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:238)
>  ~[cassandra-all-2.1.8.689.jar:2.1.8.689]
> at 
> com.datastax.bdp.cassandra.cql3.DseQueryHandler$StatementExecution.execute(DseQueryHandler.java:291)
>  ~[dse.jar:4.7.3]
> at 
> com.datastax.bdp.cassandra.cql3.DseQueryHandler$Operation.executeWithTiming(DseQueryHandler.java:223)
>  ~[dse.jar:4.7.3]
> at 
> com.datastax.bdp.cassandra.cql3.DseQueryHandler$Operation.executeWithAuditLogging(DseQueryHandler.java:259)
>  ~[dse.jar:4.7.3]
> at 
> com.datastax.bdp.cassandra.cql3.DseQueryHandler.process(DseQueryHandler.java:94)
>  ~[dse.jar:4.7.3]
> at 
> org.apache.cassandra.transport.messages.QueryMessage.execute(QueryMessage.java:122)
>  ~[cassandra-all-2.1.8.689.jar:2.1.8.689]
> at 
> org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:439)
>  [cassandra-all-2.1.8.689.jar:2.1.8.689]
> at 
> org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:335)
>  [cassandra-all-2.1.8.689.jar:2.1.8.689]
> at 
> io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
>  [netty-all-4.0.23.Final.jar:4.0.23.Final]
> at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
>  [netty-all-4.0.23.Final.jar:4.0.23.Final]
> at 
> io.netty.channel.AbstractChannelHandlerContext.access$700(AbstractChannelHandlerContext.java:32)
>  [netty-all-4.0.23.Final.jar:4.0.23.

[jira] [Updated] (CASSANDRA-10005) Streaming not enough bytes error

2015-10-20 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-10005:
-
Assignee: Yuki Morishita

> Streaming not enough bytes error
> 
>
> Key: CASSANDRA-10005
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10005
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Chris Moos
>Assignee: Yuki Morishita
>Priority: Minor
>  Labels: triaged
> Fix For: 2.2.x
>
> Attachments: deadlock.txt, errors.txt
>
>
> I'm adding a new node to the cluster and I'm seeing a bunch of the errors 
> below and the node never joins. It looks like a deadlock.
> After looking through the code it looks like IncomingFileMessage will tell 
> the session to retry on Exceptions (except IOException) but the 
> CompressedInputStream thread is still running and then the retry happens and 
> the deadlock ensues. It might be best to close the StreamReader (and stop the 
> thread) if an Exception happens before retrying.
> I'm not sure why I am getting this error to begin with though, might it have 
> something to do with not being able to upgrade my SSTables after going from 
> 2.1.2 -> 2.2.0?
> {code}
> error: null
> -- StackTrace --
> java.lang.AssertionError
> at 
> org.apache.cassandra.db.lifecycle.LifecycleTransaction.checkUnused(LifecycleTransaction.java:428)
> at 
> org.apache.cassandra.db.lifecycle.LifecycleTransaction.split(LifecycleTransaction.java:408)
> at 
> org.apache.cassandra.db.compaction.CompactionManager.parallelAllSSTableOperation(CompactionManager.java:268)
> at 
> org.apache.cassandra.db.compaction.CompactionManager.performSSTableRewrite(CompactionManager.java:373)
> at 
> org.apache.cassandra.db.ColumnFamilyStore.sstablesRewrite(ColumnFamilyStore.java:1524)
> at 
> org.apache.cassandra.service.StorageService.upgradeSSTables(StorageService.java:2521)
> {code}



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


[jira] [Commented] (CASSANDRA-10005) Streaming not enough bytes error

2015-10-20 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-10005:
--

[~yukim] should this be closed as duplicate of CASSANDRA-10012?

> Streaming not enough bytes error
> 
>
> Key: CASSANDRA-10005
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10005
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Chris Moos
>Priority: Minor
>  Labels: triaged
> Fix For: 2.2.x
>
> Attachments: deadlock.txt, errors.txt
>
>
> I'm adding a new node to the cluster and I'm seeing a bunch of the errors 
> below and the node never joins. It looks like a deadlock.
> After looking through the code it looks like IncomingFileMessage will tell 
> the session to retry on Exceptions (except IOException) but the 
> CompressedInputStream thread is still running and then the retry happens and 
> the deadlock ensues. It might be best to close the StreamReader (and stop the 
> thread) if an Exception happens before retrying.
> I'm not sure why I am getting this error to begin with though, might it have 
> something to do with not being able to upgrade my SSTables after going from 
> 2.1.2 -> 2.2.0?
> {code}
> error: null
> -- StackTrace --
> java.lang.AssertionError
> at 
> org.apache.cassandra.db.lifecycle.LifecycleTransaction.checkUnused(LifecycleTransaction.java:428)
> at 
> org.apache.cassandra.db.lifecycle.LifecycleTransaction.split(LifecycleTransaction.java:408)
> at 
> org.apache.cassandra.db.compaction.CompactionManager.parallelAllSSTableOperation(CompactionManager.java:268)
> at 
> org.apache.cassandra.db.compaction.CompactionManager.performSSTableRewrite(CompactionManager.java:373)
> at 
> org.apache.cassandra.db.ColumnFamilyStore.sstablesRewrite(ColumnFamilyStore.java:1524)
> at 
> org.apache.cassandra.service.StorageService.upgradeSSTables(StorageService.java:2521)
> {code}



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


[jira] [Updated] (CASSANDRA-10383) Disable auto snapshot on selected tables.

2015-10-20 Thread Robert Stupp (JIRA)

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

Robert Stupp updated CASSANDRA-10383:
-
Fix Version/s: (was: 2.1.x)
   3.x

> Disable auto snapshot on selected tables.
> -
>
> Key: CASSANDRA-10383
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10383
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Tommy Stendahl
>Assignee: Tommy Stendahl
>  Labels: doc-impacting
> Fix For: 3.x
>
> Attachments: 10383.txt
>
>
> I have a use case where I would like to turn off auto snapshot for selected 
> tables, I don't want to turn it off completely since its a good feature. 
> Looking at the code I think it would be relatively easy to fix.
> My plan is to create a new table property named something like 
> "disable_auto_snapshot". If set to false it will prevent auto snapshot on the 
> table, if set to true auto snapshot will be controlled by the "auto_snapshot" 
> property in the cassandra.yaml. Default would be true.



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


[jira] [Commented] (CASSANDRA-10360) UnsupportedOperationException when compacting system.size_estimates after 2.1 -> 2.2 -> 3.0 upgrade

2015-10-20 Thread Branimir Lambov (JIRA)

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

Branimir Lambov commented on CASSANDRA-10360:
-

It _is_ much clearer now. Thank you.

One problem left in {{UnfilteredIterator.next/peek}} and 
{{AtomIterator.next/peek}}: {{assert hasNext()}} changes the code's behavior 
when asserts are on. Call {{hasNext()}} separately and then {{assert next != 
null}} or {{!isDone}}.

Is the code being tested already?

> UnsupportedOperationException when compacting system.size_estimates after 2.1 
> -> 2.2 -> 3.0 upgrade
> ---
>
> Key: CASSANDRA-10360
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10360
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Andrew Hust
>Assignee: Sylvain Lebresne
>Priority: Blocker
> Fix For: 3.0.0
>
> Attachments: size_estimates.2.tar.bz2, size_estimates.tar.bz2, 
> system.log.2.bz2, system.log.bz2
>
>
> When upgrading from 2.1 -> 2.2 -> 3.0 the system.size_estimates table will 
> get stuck in a compaction loop throwing:
> {code}
> java.lang.UnsupportedOperationException
> at 
> org.apache.cassandra.db.UnfilteredDeserializer$OldFormatDeserializer.readNext(UnfilteredDeserializer.java:382)
> at 
> org.apache.cassandra.io.sstable.SSTableSimpleIterator$OldFormatIterator.computeNext(SSTableSimpleIterator.java:147)
> at 
> org.apache.cassandra.io.sstable.SSTableSimpleIterator$OldFormatIterator.computeNext(SSTableSimpleIterator.java:96)
> at 
> org.apache.cassandra.utils.AbstractIterator.hasNext(AbstractIterator.java:47)
> at 
> org.apache.cassandra.io.sstable.SSTableIdentityIterator.computeNext(SSTableIdentityIterator.java:100)
> at 
> org.apache.cassandra.io.sstable.SSTableIdentityIterator.computeNext(SSTableIdentityIterator.java:30)
> at 
> org.apache.cassandra.utils.AbstractIterator.hasNext(AbstractIterator.java:47)
> at 
> org.apache.cassandra.db.rows.LazilyInitializedUnfilteredRowIterator.computeNext(LazilyInitializedUnfilteredRowIterator.java:95)
> at 
> org.apache.cassandra.db.rows.LazilyInitializedUnfilteredRowIterator.computeNext(LazilyInitializedUnfilteredRowIterator.java:32)
> at 
> org.apache.cassandra.utils.AbstractIterator.hasNext(AbstractIterator.java:47)
> at 
> org.apache.cassandra.utils.MergeIterator$TrivialOneToOne.computeNext(MergeIterator.java:460)
> at 
> org.apache.cassandra.utils.AbstractIterator.hasNext(AbstractIterator.java:47)
> at 
> org.apache.cassandra.db.rows.UnfilteredRowIterators$UnfilteredRowMergeIterator.computeNext(UnfilteredRowIterators.java:503)
> at 
> org.apache.cassandra.db.rows.UnfilteredRowIterators$UnfilteredRowMergeIterator.computeNext(UnfilteredRowIterators.java:363)
> at 
> org.apache.cassandra.utils.AbstractIterator.hasNext(AbstractIterator.java:47)
> at 
> org.apache.cassandra.db.rows.WrappingUnfilteredRowIterator.hasNext(WrappingUnfilteredRowIterator.java:80)
> at 
> org.apache.cassandra.db.rows.AlteringUnfilteredRowIterator.hasNext(AlteringUnfilteredRowIterator.java:72)
> at 
> org.apache.cassandra.db.rows.UnfilteredRowIterator.isEmpty(UnfilteredRowIterator.java:100)
> at 
> org.apache.cassandra.db.partitions.PurgingPartitionIterator.hasNext(PurgingPartitionIterator.java:72)
> at 
> org.apache.cassandra.db.compaction.CompactionIterator.hasNext(CompactionIterator.java:223)
> at 
> org.apache.cassandra.db.compaction.CompactionTask.runMayThrow(CompactionTask.java:177)
> at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
> at 
> org.apache.cassandra.db.compaction.CompactionTask.executeInternal(CompactionTask.java:78)
> at 
> org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(AbstractCompactionTask.java:60)
> at 
> org.apache.cassandra.db.compaction.CompactionManager$8.runMayThrow(CompactionManager.java:539)
> at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> {code}
> It will only occur when upgrading thru 2.2.  Going from 2.1 -> 3.0 will not 
> surface the issue.  It can be reproduced with the following (note -- changing 
> jdks will need to be altered if you aren't on OSX)
> {code}
> #!/bin/sh
> echo "using java7 for cassandra-2.1 instance"
> export JAVA_HOME=$(/usr/libexec/java_home -v 1.7)
> ccm stop
> ccm remove upgrade_nodes
>

[jira] [Commented] (CASSANDRA-10367) Aggregate with Initial Condition fails with C* 3.0

2015-10-20 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-10367:
--

+1 on the patch and using alpha4 (we can always update once newer versions are 
available, but we're currently using alpha3 so alpha4 is still progress).

> Aggregate with Initial Condition fails with C* 3.0
> --
>
> Key: CASSANDRA-10367
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10367
> Project: Cassandra
>  Issue Type: Bug
> Environment: Cassandra 3.0 branch
> https://github.com/apache/cassandra/tree/cassandra-3.0
>Reporter: Greg Bestland
>Assignee: Robert Stupp
> Fix For: 3.0.0
>
>
> I'm seeing some inconsistent behavior between  2.2 and 3.0 C* with regards to 
> UDF, Aggregates and Initial Conditions. I have a scenario, which I think is 
> valid. It works in C* 2.2 but not in 3.0
> Using the following user defined function
> {code:sql}
> CREATE OR REPLACE FUNCTION extend_list(s list, i int)
>   CALLED ON NULL INPUT
>   RETURNS list
>   LANGUAGE java AS 'if (i != null) 
> s.add(String.valueOf(i)); return s;';
> {code}
> With the aggregate below
> {code:sql}
> CREATE AGGREGATE aggregatemetadata.test_init_cond_aggregate(int) SFUNC 
> extend_list STYPE list INITCOND [  ]
> {code}
> When I attempt to exercise the aggregate on from a simple key value table.
> {code:sql}
> SELECT test_init_cond_aggregate(v) AS list_res FROM t
> {code}
> in 2.2 it works fine and returns the aggregate.
> The exact same test ran against the 3.0 branch produces the following 
> exception from the server.
> {code:java}
> InvalidRequest: code=2200 [Invalid query] message="ERROR FUNCTION_FAILURE: 
> execution of 'aggregatemetadata.extend_list[list, int]' failed: 
> java.lang.UnsupportedOperationException"
> {code}
> I've grepped through the C* logs but I couldn't find a more verbose stack 
> trace, or any errors. 
> Robert Stupp suggested I open a ticket.
> I am able to reproduce both in the python driver manually using cql.



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


[jira] [Updated] (CASSANDRA-10554) Auto Bootstraping a new node fails

2015-10-20 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-10554:
-
Attachment: 0001-Add-debug.txt

I'm not sure this has anything to do with the column type. That error would 
typically happen if the node receiving is not up to date on the schema for the 
table streamed, but a bootstrapping node should be waiting on being up to date 
on schema before doing any streaming in theory (or has that changed?).

In any case, if you can reproduce, can you apply the simple patch I attach 
(that only provide some additional logging) on the boostrapped node, reproduce, 
and attach the full log for that bootstrapped node? More details on what the 
test does would help too (if you could make it a reproducible dtest that would 
be the best thing since sliced bread).

> Auto Bootstraping a new node fails
> --
>
> Key: CASSANDRA-10554
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10554
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Alan Boudreault
> Fix For: 3.0.0
>
> Attachments: 0001-Add-debug.txt
>
>
> I've been trying to add a new node in my 3.0 cluster and it seems to fail. 
> All my nodes are using apache/cassandra-3.0.0 branch. At the beginning, I can 
> see the following error:
> {code}
> INFO  18:45:55 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a ID#0] Prepare 
> completed. Receiving 42 files(1910066622 bytes), sending 0 files(0 bytes)
> WARN  18:45:55 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a] Retrying for 
> following error
> java.lang.RuntimeException: Unknown column added_time during deserialization
> at 
> org.apache.cassandra.db.SerializationHeader$Component.toHeader(SerializationHeader.java:331)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.StreamReader.createWriter(StreamReader.java:136)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.compress.CompressedStreamReader.read(CompressedStreamReader.java:77)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.messages.IncomingFileMessage$1.deserialize(IncomingFileMessage.java:50)
>  [main/:na]
> at 
> org.apache.cassandra.streaming.messages.IncomingFileMessage$1.deserialize(IncomingFileMessage.java:39)
>  [main/:na]
> at 
> org.apache.cassandra.streaming.messages.StreamMessage.deserialize(StreamMessage.java:59)
>  [main/:na]
> at 
> org.apache.cassandra.streaming.ConnectionHandler$IncomingMessageHandler.run(ConnectionHandler.java:261)
>  [main/:na]
> at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
> ERROR 18:45:55 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a] Streaming error 
> occurred
> java.lang.IllegalArgumentException: Unknown type 0
> at 
> org.apache.cassandra.streaming.messages.StreamMessage$Type.get(StreamMessage.java:97)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.messages.StreamMessage.deserialize(StreamMessage.java:58)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.ConnectionHandler$IncomingMessageHandler.run(ConnectionHandler.java:261)
>  ~[main/:na]
> at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
> INFO  18:45:55 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a] Session with 
> /54.210.187.114 is complete
> INFO  18:45:56 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a ID#0] Prepare 
> completed. Receiving 38 files(2323537628 bytes), sending 0 files(0 bytes)
> WARN  18:45:56 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a] Retrying for 
> following error
> java.lang.RuntimeException: Unknown column added_time during deserialization
> at 
> org.apache.cassandra.db.SerializationHeader$Component.toHeader(SerializationHeader.java:331)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.StreamReader.createWriter(StreamReader.java:136)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.compress.CompressedStreamReader.read(CompressedStreamReader.java:77)
>  ~[main/:na]
> at 
> org.apache.cassandra.streaming.messages.IncomingFileMessage$1.deserialize(IncomingFileMessage.java:50)
>  [main/:na]
> at 
> org.apache.cassandra.streaming.messages.IncomingFileMessage$1.deserialize(IncomingFileMessage.java:39)
>  [main/:na]
> at 
> org.apache.cassandra.streaming.messages.StreamMessage.deserialize(StreamMessage.java:59)
>  [main/:na]
> at 
> org.apache.cassandra.streaming.ConnectionHandler$IncomingMessageHandler.run(ConnectionHandler.java:261)
>  [main/:na]
> at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
> ERROR 18:45:56 [Stream #9f95fa90-7691-11e5-931f-5b735851f84a] Streaming error 
> occurred
> java.lang.IllegalArgumentException: Unknown type 0
> at 
> org.apache.cassandra.streaming.messages.StreamMessage$Type.get(StreamMessage.java:97)
>  ~[main/:na]
>

[jira] [Commented] (CASSANDRA-10367) Aggregate with Initial Condition fails with C* 3.0

2015-10-20 Thread Robert Stupp (JIRA)

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

Robert Stupp commented on CASSANDRA-10367:
--

Recently released java-driver 3.0.0-alpha4 works fine. Updated the git branch 
([diff 
here|https://github.com/apache/cassandra/compare/trunk...snazy:10367-uda-unmod-3.0?expand=1]).
 We could review and commit it now or wait until 3.0.0-beta1 (or even a newer 
version) is available.

> Aggregate with Initial Condition fails with C* 3.0
> --
>
> Key: CASSANDRA-10367
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10367
> Project: Cassandra
>  Issue Type: Bug
> Environment: Cassandra 3.0 branch
> https://github.com/apache/cassandra/tree/cassandra-3.0
>Reporter: Greg Bestland
>Assignee: Robert Stupp
> Fix For: 3.0.0
>
>
> I'm seeing some inconsistent behavior between  2.2 and 3.0 C* with regards to 
> UDF, Aggregates and Initial Conditions. I have a scenario, which I think is 
> valid. It works in C* 2.2 but not in 3.0
> Using the following user defined function
> {code:sql}
> CREATE OR REPLACE FUNCTION extend_list(s list, i int)
>   CALLED ON NULL INPUT
>   RETURNS list
>   LANGUAGE java AS 'if (i != null) 
> s.add(String.valueOf(i)); return s;';
> {code}
> With the aggregate below
> {code:sql}
> CREATE AGGREGATE aggregatemetadata.test_init_cond_aggregate(int) SFUNC 
> extend_list STYPE list INITCOND [  ]
> {code}
> When I attempt to exercise the aggregate on from a simple key value table.
> {code:sql}
> SELECT test_init_cond_aggregate(v) AS list_res FROM t
> {code}
> in 2.2 it works fine and returns the aggregate.
> The exact same test ran against the 3.0 branch produces the following 
> exception from the server.
> {code:java}
> InvalidRequest: code=2200 [Invalid query] message="ERROR FUNCTION_FAILURE: 
> execution of 'aggregatemetadata.extend_list[list, int]' failed: 
> java.lang.UnsupportedOperationException"
> {code}
> I've grepped through the C* logs but I couldn't find a more verbose stack 
> trace, or any errors. 
> Robert Stupp suggested I open a ticket.
> I am able to reproduce both in the python driver manually using cql.



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


[jira] [Commented] (CASSANDRA-10550) NPE on null 'highestSelectivityIndex()'

2015-10-20 Thread Sam Tunnicliffe (JIRA)

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

Sam Tunnicliffe commented on CASSANDRA-10550:
-

Thanks, that LGTM. I'll commit once CI is happy (the NPE isn't possible with 
3.0+, so I'm only running 2.1/2.2):

||2.1||2.2||
|[branch|https://github.com/beobal/cassandra/tree/10550-2.1]|[branch|https://github.com/beobal/cassandra/tree/10550-2.2]|
|[testall|http://cassci.datastax.com/view/Dev/view/beobal/job/beobal-10550-2.1-testall/]|[testall|http://cassci.datastax.com/view/Dev/view/beobal/job/beobal-10550-2.2-testall/]|
|[dtests|http://cassci.datastax.com/view/Dev/view/beobal/job/beobal-10550-2.1-dtest/]|[dtests|http://cassci.datastax.com/view/Dev/view/beobal/job/beobal-10550-2.2-dtest/]|

> NPE on null 'highestSelectivityIndex()'
> ---
>
> Key: CASSANDRA-10550
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10550
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Berenguer Blasi
>Assignee: Berenguer Blasi
> Fix For: 2.1.x
>
> Attachments: cassandra-2.1-10550.txt
>
>
> {{org.apache.cassandra.db.index.SecondaryIndexSearcher.highestSelectivityIndex()}}
>  might return 'null' which makes 
> {{org.apache.cassandra.service.StorageProxy.estimateResultRowsPerRange()}} 
> NPE on some custom index implementations.



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


[jira] [Commented] (CASSANDRA-10376) Fix upgrade_tests/paging_test.py:TestPagingData.static_columns_paging_test

2015-10-20 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-10376:
--

So pushed the change above 
[here|https://github.com/pcmanus/cassandra/commits/10376], and now that the 
patch for CASSANDRA-10381 has been committed, I can confirm that this fixes the 
test in question, so calling that branch officially ready for review.

> Fix upgrade_tests/paging_test.py:TestPagingData.static_columns_paging_test
> --
>
> Key: CASSANDRA-10376
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10376
> Project: Cassandra
>  Issue Type: Sub-task
>Reporter: Aleksey Yeschenko
>Assignee: Blake Eggleston
> Fix For: 3.0.0
>
>
> Follow-up to CASSANDRA-10354 to fix the related upgrade issue.
> To quote [~bdeggleston]:
> {quote}
> So the failure is caused by an edge case where a names filter is used in a 
> paging query against a table that needs SinglePartitionNamesCommand instances 
> converted to SinglePartitionSliceCommand instances in order to be converted 
> to legacy read commands.
> If the previous read returned all requested clusterings and a number of rows 
> equal to the page size, the subsequent read would have an empty clustering 
> names filter. When an empty clustering names filter is converted to a slice 
> filter, the slice filter is created with Slices.ALL.
> {quote}



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


[jira] [Updated] (CASSANDRA-10376) Fix upgrade_tests/paging_test.py:TestPagingData.static_columns_paging_test

2015-10-20 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-10376:
-
Reviewer: Benjamin Lerer  (was: Sylvain Lebresne)

> Fix upgrade_tests/paging_test.py:TestPagingData.static_columns_paging_test
> --
>
> Key: CASSANDRA-10376
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10376
> Project: Cassandra
>  Issue Type: Sub-task
>Reporter: Aleksey Yeschenko
>Assignee: Sylvain Lebresne
> Fix For: 3.0.0
>
>
> Follow-up to CASSANDRA-10354 to fix the related upgrade issue.
> To quote [~bdeggleston]:
> {quote}
> So the failure is caused by an edge case where a names filter is used in a 
> paging query against a table that needs SinglePartitionNamesCommand instances 
> converted to SinglePartitionSliceCommand instances in order to be converted 
> to legacy read commands.
> If the previous read returned all requested clusterings and a number of rows 
> equal to the page size, the subsequent read would have an empty clustering 
> names filter. When an empty clustering names filter is converted to a slice 
> filter, the slice filter is created with Slices.ALL.
> {quote}



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


[jira] [Assigned] (CASSANDRA-10376) Fix upgrade_tests/paging_test.py:TestPagingData.static_columns_paging_test

2015-10-20 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne reassigned CASSANDRA-10376:


Assignee: Sylvain Lebresne  (was: Blake Eggleston)

> Fix upgrade_tests/paging_test.py:TestPagingData.static_columns_paging_test
> --
>
> Key: CASSANDRA-10376
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10376
> Project: Cassandra
>  Issue Type: Sub-task
>Reporter: Aleksey Yeschenko
>Assignee: Sylvain Lebresne
> Fix For: 3.0.0
>
>
> Follow-up to CASSANDRA-10354 to fix the related upgrade issue.
> To quote [~bdeggleston]:
> {quote}
> So the failure is caused by an edge case where a names filter is used in a 
> paging query against a table that needs SinglePartitionNamesCommand instances 
> converted to SinglePartitionSliceCommand instances in order to be converted 
> to legacy read commands.
> If the previous read returned all requested clusterings and a number of rows 
> equal to the page size, the subsequent read would have an empty clustering 
> names filter. When an empty clustering names filter is converted to a slice 
> filter, the slice filter is created with Slices.ALL.
> {quote}



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


[jira] [Commented] (CASSANDRA-10360) UnsupportedOperationException when compacting system.size_estimates after 2.1 -> 2.2 -> 3.0 upgrade

2015-10-20 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-10360:
--

bq. hasNext is hard to follow.

Agreed. I've actually gave a shot to a slightly more extensive refactor (pushed 
to the same branch) where I've separated some of the steps, creating first an 
iterator of atom from the input, then an iterator of {{Unfiltered}} from that, 
leaving mostly just the handling of the last special cases to {{hasNext}}. This 
takes a bit more lines of code, but I think this is overall easier to follow.

The rest of the remarks were all on point and I included fixes for them in the 
new patch too.


> UnsupportedOperationException when compacting system.size_estimates after 2.1 
> -> 2.2 -> 3.0 upgrade
> ---
>
> Key: CASSANDRA-10360
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10360
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Andrew Hust
>Assignee: Sylvain Lebresne
>Priority: Blocker
> Fix For: 3.0.0
>
> Attachments: size_estimates.2.tar.bz2, size_estimates.tar.bz2, 
> system.log.2.bz2, system.log.bz2
>
>
> When upgrading from 2.1 -> 2.2 -> 3.0 the system.size_estimates table will 
> get stuck in a compaction loop throwing:
> {code}
> java.lang.UnsupportedOperationException
> at 
> org.apache.cassandra.db.UnfilteredDeserializer$OldFormatDeserializer.readNext(UnfilteredDeserializer.java:382)
> at 
> org.apache.cassandra.io.sstable.SSTableSimpleIterator$OldFormatIterator.computeNext(SSTableSimpleIterator.java:147)
> at 
> org.apache.cassandra.io.sstable.SSTableSimpleIterator$OldFormatIterator.computeNext(SSTableSimpleIterator.java:96)
> at 
> org.apache.cassandra.utils.AbstractIterator.hasNext(AbstractIterator.java:47)
> at 
> org.apache.cassandra.io.sstable.SSTableIdentityIterator.computeNext(SSTableIdentityIterator.java:100)
> at 
> org.apache.cassandra.io.sstable.SSTableIdentityIterator.computeNext(SSTableIdentityIterator.java:30)
> at 
> org.apache.cassandra.utils.AbstractIterator.hasNext(AbstractIterator.java:47)
> at 
> org.apache.cassandra.db.rows.LazilyInitializedUnfilteredRowIterator.computeNext(LazilyInitializedUnfilteredRowIterator.java:95)
> at 
> org.apache.cassandra.db.rows.LazilyInitializedUnfilteredRowIterator.computeNext(LazilyInitializedUnfilteredRowIterator.java:32)
> at 
> org.apache.cassandra.utils.AbstractIterator.hasNext(AbstractIterator.java:47)
> at 
> org.apache.cassandra.utils.MergeIterator$TrivialOneToOne.computeNext(MergeIterator.java:460)
> at 
> org.apache.cassandra.utils.AbstractIterator.hasNext(AbstractIterator.java:47)
> at 
> org.apache.cassandra.db.rows.UnfilteredRowIterators$UnfilteredRowMergeIterator.computeNext(UnfilteredRowIterators.java:503)
> at 
> org.apache.cassandra.db.rows.UnfilteredRowIterators$UnfilteredRowMergeIterator.computeNext(UnfilteredRowIterators.java:363)
> at 
> org.apache.cassandra.utils.AbstractIterator.hasNext(AbstractIterator.java:47)
> at 
> org.apache.cassandra.db.rows.WrappingUnfilteredRowIterator.hasNext(WrappingUnfilteredRowIterator.java:80)
> at 
> org.apache.cassandra.db.rows.AlteringUnfilteredRowIterator.hasNext(AlteringUnfilteredRowIterator.java:72)
> at 
> org.apache.cassandra.db.rows.UnfilteredRowIterator.isEmpty(UnfilteredRowIterator.java:100)
> at 
> org.apache.cassandra.db.partitions.PurgingPartitionIterator.hasNext(PurgingPartitionIterator.java:72)
> at 
> org.apache.cassandra.db.compaction.CompactionIterator.hasNext(CompactionIterator.java:223)
> at 
> org.apache.cassandra.db.compaction.CompactionTask.runMayThrow(CompactionTask.java:177)
> at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
> at 
> org.apache.cassandra.db.compaction.CompactionTask.executeInternal(CompactionTask.java:78)
> at 
> org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(AbstractCompactionTask.java:60)
> at 
> org.apache.cassandra.db.compaction.CompactionManager$8.runMayThrow(CompactionManager.java:539)
> at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> {code}
> It will only occur when upgrading thru 2.2.  Going from 2.1 -> 3.0 will not 
> surface the issue.  It can be reproduced with the following (note -- cha

Git Push Summary

2015-10-20 Thread slebresne
Repository: cassandra
Updated Branches:
  refs/heads/10360 [deleted] e3c5245a0


[jira] [Resolved] (CASSANDRA-10479) Handling partially written sstables on node crashes

2015-10-20 Thread Sharvanath Pathak (JIRA)

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

Sharvanath Pathak resolved CASSANDRA-10479.
---
Resolution: Invalid

On more investigation it seems that the real issue was 
https://issues.apache.org/jira/browse/CASSANDRA-10534.

> Handling partially written sstables on node crashes
> ---
>
> Key: CASSANDRA-10479
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10479
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Sharvanath Pathak
>
> Currently a power loss can potentially require manual intervention to bring 
> Cassandra back up. Essentially, these partially written SStables are 
> considered as corrupt, and we see the following trace quite often on hard 
> reboots:
> {noformat}
> INFO  [SSTableBatchOpen:1] 2015-09-29 19:24:39,170 SSTableReader.java:478 - 
> Opening 
> /var/lib/cassandra/data/system/compactions_in_progress-55080ab05d9c388690a4acb25fe1f77b/system-compactions_in_progress-ka-13368
>  (79 bytes)
> ERROR [SSTableBatchOpen:1] 2015-09-29 19:24:39,177 FileUtils.java:447 - 
> Exiting forcefully due to file system exception on startup, disk failure 
> policy "stop"
> org.apache.cassandra.io.sstable.CorruptSSTableException: java.io.EOFException
> at 
> org.apache.cassandra.io.compress.CompressionMetadata.(CompressionMetadata.java:131)
>  ~[apache-cassandra-2.1.9.jar:2.1.9]
> at 
> org.apache.cassandra.io.compress.CompressionMetadata.create(CompressionMetadata.java:85)
>  ~[apache-cassandra-2.1.9.jar:2.1.9]
> at 
> org.apache.cassandra.io.util.CompressedSegmentedFile$Builder.metadata(CompressedSegmentedFile.java:79)
>  ~[apache-cassandra-2.1.9.jar:2.1.9]
> at 
> org.apache.cassandra.io.util.CompressedPoolingSegmentedFile$Builder.complete(CompressedPoolingSegmentedFile.java:72)
>  ~[apache-cassandra-2.1.9.jar:2.1.9]
> at 
> org.apache.cassandra.io.util.SegmentedFile$Builder.complete(SegmentedFile.java:168)
>  ~[apache-cassandra-2.1.9.jar:2.1.9]
> at 
> org.apache.cassandra.io.sstable.SSTableReader.load(SSTableReader.java:752) 
> ~[apache-cassandra-2.1.9.jar:2.1.9]
> at 
> org.apache.cassandra.io.sstable.SSTableReader.load(SSTableReader.java:703) 
> ~[apache-cassandra-2.1.9.jar:2.1.9]
> at 
> org.apache.cassandra.io.sstable.SSTableReader.open(SSTableReader.java:491) 
> ~[apache-cassandra-2.1.9.jar:2.1.9]
> at 
> org.apache.cassandra.io.sstable.SSTableReader.open(SSTableReader.java:387) 
> ~[apache-cassandra-2.1.9.jar:2.1.9]
> at 
> org.apache.cassandra.io.sstable.SSTableReader$4.run(SSTableReader.java:534) 
> ~[apache-cassandra-2.1.9.jar:2.1.9]
> at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) 
> [na:1.7.0_80]
> at java.util.concurrent.FutureTask.run(FutureTask.java:262) 
> [na:1.7.0_80]
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>  [na:1.7.0_80]
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>  [na:1.7.0_80]
> at java.lang.Thread.run(Thread.java:745) [na:1.7.0_80]
> Caused by: java.io.EOFException: null
> at 
> java.io.DataInputStream.readUnsignedShort(DataInputStream.java:340) 
> ~[na:1.7.0_80]
> at java.io.DataInputStream.readUTF(DataInputStream.java:589) 
> ~[na:1.7.0_80]
> at java.io.DataInputStream.readUTF(DataInputStream.java:564) 
> ~[na:1.7.0_80]
> at 
> org.apache.cassandra.io.compress.CompressionMetadata.(CompressionMetadata.java:106)
>  ~[apache-cassandra-2.1.9.jar:2.1.9]
> ... 14 common frames omitted
> {noformat}
> Deleting partially written SStables might be a perfectly valid thing to do 
> (given that the data is present in commitlogs).



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


[1/3] cassandra git commit: Fix regression from CASSANDRA-10136

2015-10-20 Thread slebresne
Repository: cassandra
Updated Branches:
  refs/heads/10360 [created] e3c5245a0


Fix regression from CASSANDRA-10136

When a read crossed a column index boundary (reading old sstable), we
have to mark the beginning of the index block and so we seek back
to said index block start, mark, and seek back to where we were to
continue reading. The problem was that the seekToPosition() method was
clearing the deserialization state which, in that case, is not what
we wanted.

The patch move the clearing out of the seek method and only call it
when that's actually what we want to do.


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

Branch: refs/heads/10360
Commit: 228b8020e5329de0b75f9dca9a6706b784afce26
Parents: fd5e474
Author: Sylvain Lebresne 
Authored: Fri Oct 16 13:47:40 2015 +0200
Committer: Sylvain Lebresne 
Committed: Mon Oct 19 11:00:34 2015 +0200

--
 .../cassandra/db/columniterator/AbstractSSTableIterator.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/228b8020/src/java/org/apache/cassandra/db/columniterator/AbstractSSTableIterator.java
--
diff --git 
a/src/java/org/apache/cassandra/db/columniterator/AbstractSSTableIterator.java 
b/src/java/org/apache/cassandra/db/columniterator/AbstractSSTableIterator.java
index 837f0a0..8900b31 100644
--- 
a/src/java/org/apache/cassandra/db/columniterator/AbstractSSTableIterator.java
+++ 
b/src/java/org/apache/cassandra/db/columniterator/AbstractSSTableIterator.java
@@ -323,7 +323,6 @@ abstract class AbstractSSTableIterator implements 
SliceableUnfilteredRowIterator
 else
 {
 file.seek(position);
-deserializer.clearState();
 }
 }
 
@@ -438,7 +437,10 @@ abstract class AbstractSSTableIterator implements 
SliceableUnfilteredRowIterator
 public void setToBlock(int blockIdx) throws IOException
 {
 if (blockIdx >= 0 && blockIdx < indexes.size())
+{
 reader.seekToPosition(columnOffset(blockIdx));
+reader.deserializer.clearState();
+}
 
 currentIndexIdx = blockIdx;
 reader.openMarker = blockIdx > 0 ? indexes.get(blockIdx - 
1).endOpenMarker : null;



[3/3] cassandra git commit: Post review modifications

2015-10-20 Thread slebresne
Post review modifications


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

Branch: refs/heads/10360
Commit: e3c5245a0592958edee3ffcb673e0e02023fb38f
Parents: 228b802
Author: Sylvain Lebresne 
Authored: Mon Oct 19 18:17:40 2015 +0200
Committer: Sylvain Lebresne 
Committed: Tue Oct 20 12:30:05 2015 +0200

--
 .../cassandra/db/UnfilteredDeserializer.java| 312 ---
 1 file changed, 197 insertions(+), 115 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e3c5245a/src/java/org/apache/cassandra/db/UnfilteredDeserializer.java
--
diff --git a/src/java/org/apache/cassandra/db/UnfilteredDeserializer.java 
b/src/java/org/apache/cassandra/db/UnfilteredDeserializer.java
index 6be587b..a158047 100644
--- a/src/java/org/apache/cassandra/db/UnfilteredDeserializer.java
+++ b/src/java/org/apache/cassandra/db/UnfilteredDeserializer.java
@@ -18,8 +18,12 @@
 package org.apache.cassandra.db;
 
 import java.io.IOException;
+import java.io.IOError;
 import java.util.*;
 
+import com.google.common.collect.Iterables;
+import com.google.common.collect.PeekingIterator;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.apache.cassandra.config.CFMetaData;
@@ -219,18 +223,18 @@ public abstract class UnfilteredDeserializer
 private final boolean readAllAsDynamic;
 private boolean skipStatic;
 
-private boolean inputExhausted;
-
 // The next Unfiltered to return, computed by hasNext()
 private Unfiltered next;
+// A temporary storage for an unfiltered that isn't returned next but 
should be looked at just afterwards
+private Unfiltered saved;
 
-// In some condition, we don't use the last atom read from the input 
for the current iteration
-// (typically, because we need to close an open tombstone range 
first). In that case we use
-// nextAtom to save the read but still unused atom. It is then pick up 
by the next iteration before
-// reaching into the input.
-private LegacyLayout.LegacyAtom nextAtom;
+private boolean isFirst = true;
 
-private final LegacyLayout.CellGrouper grouper;
+// The Unfiltered as read from the old format input
+private final UnfilteredIterator iterator;
+
+// Tracks which tombstone are opened at any given point of the 
deserialization. Note that this
+// is directly populated by UnfilteredIterator.
 private final TombstoneTracker tombstoneTracker;
 
 private OldFormatDeserializer(CFMetaData metadata,
@@ -240,9 +244,9 @@ public abstract class UnfilteredDeserializer
   boolean readAllAsDynamic)
 {
 super(metadata, in, helper);
-this.readAllAsDynamic = readAllAsDynamic;
-this.grouper = new LegacyLayout.CellGrouper(metadata, helper);
 this.tombstoneTracker = new TombstoneTracker(partitionDeletion);
+this.iterator = new UnfilteredIterator();
+this.readAllAsDynamic = readAllAsDynamic;
 }
 
 public void setSkipStatic()
@@ -250,115 +254,61 @@ public abstract class UnfilteredDeserializer
 this.skipStatic = true;
 }
 
-public boolean hasNext() throws IOException
+private boolean isStatic(Unfiltered unfiltered)
 {
-LegacyLayout.LegacyAtom atom = null;
+return unfiltered.isRow() && ((Row)unfiltered).isStatic();
+}
 
-while (next == null)
+public boolean hasNext() throws IOException
+{
+try
 {
-// Deserialize the next Unfiltered to return, updating the 
'next' field.
-if (atom == null)
-{
-if (nextAtom == null)
-{
-atom = readNextAtom();
-if (atom == null)
-return false;
-}
-else
-{
-atom = nextAtom;
-nextAtom = null;
-}
-}
-
-// If a range tombstone closes strictly before this atom, we 
need to return that close (or boundary) marker first.
-if (tombstoneTracker.hasClosingMarkerBefore(atom))
-{
-nextAtom = atom;
-next = tombstoneTracker.popClosingMarker();
-return true;
-}
-
-if (isRow(at

[2/3] cassandra git commit: Properly handle range tombstones when reading old format sstables

2015-10-20 Thread slebresne
Properly handle range tombstones when reading old format sstables


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

Branch: refs/heads/10360
Commit: fd5e47426941d21fefbe5d412b8bc2004deb780b
Parents: 10c65d4
Author: Sylvain Lebresne 
Authored: Fri Oct 2 10:39:09 2015 +0200
Committer: Sylvain Lebresne 
Committed: Mon Oct 19 11:00:34 2015 +0200

--
 .../org/apache/cassandra/db/LegacyLayout.java   |  50 ---
 .../cassandra/db/UnfilteredDeserializer.java| 361 ---
 .../columniterator/SSTableReversedIterator.java |  18 +-
 3 files changed, 253 insertions(+), 176 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/fd5e4742/src/java/org/apache/cassandra/db/LegacyLayout.java
--
diff --git a/src/java/org/apache/cassandra/db/LegacyLayout.java 
b/src/java/org/apache/cassandra/db/LegacyLayout.java
index 194b6e8..6cfd5d9 100644
--- a/src/java/org/apache/cassandra/db/LegacyLayout.java
+++ b/src/java/org/apache/cassandra/db/LegacyLayout.java
@@ -2200,54 +2200,4 @@ public abstract class LegacyLayout
 return size;
 }
 }
-
-public static class TombstoneTracker
-{
-private final CFMetaData metadata;
-private final DeletionTime partitionDeletion;
-private final List openTombstones = new 
ArrayList<>();
-
-public TombstoneTracker(CFMetaData metadata, DeletionTime 
partitionDeletion)
-{
-this.metadata = metadata;
-this.partitionDeletion = partitionDeletion;
-}
-
-public void update(LegacyAtom atom)
-{
-if (atom.isCell())
-{
-if (openTombstones.isEmpty())
-return;
-
-Iterator iter = 
openTombstones.iterator();
-while (iter.hasNext())
-{
-LegacyRangeTombstone tombstone = iter.next();
-if (metadata.comparator.compare(atom.clustering(), 
tombstone.stop.bound) >= 0)
-iter.remove();
-}
-}
-
-LegacyRangeTombstone tombstone = atom.asRangeTombstone();
-if (tombstone.deletionTime.supersedes(partitionDeletion) && 
!tombstone.isRowDeletion(metadata) && !tombstone.isCollectionTombstone())
-openTombstones.add(tombstone);
-}
-
-public boolean isShadowed(LegacyAtom atom)
-{
-long timestamp = atom.isCell() ? atom.asCell().timestamp : 
atom.asRangeTombstone().deletionTime.markedForDeleteAt();
-
-if (partitionDeletion.deletes(timestamp))
-return true;
-
-for (LegacyRangeTombstone tombstone : openTombstones)
-{
-if (tombstone.deletionTime.deletes(timestamp))
-return true;
-}
-
-return false;
-}
-}
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fd5e4742/src/java/org/apache/cassandra/db/UnfilteredDeserializer.java
--
diff --git a/src/java/org/apache/cassandra/db/UnfilteredDeserializer.java 
b/src/java/org/apache/cassandra/db/UnfilteredDeserializer.java
index ef30289..6be587b 100644
--- a/src/java/org/apache/cassandra/db/UnfilteredDeserializer.java
+++ b/src/java/org/apache/cassandra/db/UnfilteredDeserializer.java
@@ -18,6 +18,7 @@
 package org.apache.cassandra.db;
 
 import java.io.IOException;
+import java.util.*;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -218,18 +219,19 @@ public abstract class UnfilteredDeserializer
 private final boolean readAllAsDynamic;
 private boolean skipStatic;
 
-private boolean isDone;
-private boolean isStart = true;
-
-private final LegacyLayout.CellGrouper grouper;
-private LegacyLayout.LegacyAtom nextAtom;
+private boolean inputExhausted;
 
-private boolean staticFinished;
-private LegacyLayout.LegacyAtom savedAtom;
+// The next Unfiltered to return, computed by hasNext()
+private Unfiltered next;
 
-private final LegacyLayout.TombstoneTracker tombstoneTracker;
+// In some condition, we don't use the last atom read from the input 
for the current iteration
+// (typically, because we need to close an open tombstone range 
first). In that case we use
+// nextAtom to save the read but still unused atom. It is then pick up 
by the next iteration before
+// reaching into the input.
+private LegacyLayout.LegacyAtom nextAt

[jira] [Commented] (CASSANDRA-10381) NullPointerException in cqlsh paging through CF with static columns

2015-10-20 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer commented on CASSANDRA-10381:


Committed in 2.1 at 328916d1591be69f217f6519304651d3757d9e1d. Merged into 2.2, 
3.0 and trunk

> NullPointerException in cqlsh paging through CF with static columns
> ---
>
> Key: CASSANDRA-10381
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10381
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Michael Keeney
>Assignee: Benjamin Lerer
>  Labels: cqlsh, nullpointerexception, range
> Fix For: 2.2.4, 2.1.12, 3.0.0
>
>
> When running select count( * ) from cqlsh with limit, the following NPE 
> occurs:
> select count( * ) from tbl1 limit 5 ; 
> {code}
> ERROR [SharedPool-Worker-4] 2015-09-16 14:49:43,480 QueryMessage.java:132 - 
> Unexpected error during query
> java.lang.NullPointerException: null
> at 
> org.apache.cassandra.service.pager.RangeSliceQueryPager.containsPreviousLast(RangeSliceQueryPager.java:99)
>  ~[cassandra-all-2.1.8.621.jar:2.1.8.621]
> at 
> org.apache.cassandra.service.pager.AbstractQueryPager.fetchPage(AbstractQueryPager.java:119)
>  ~[cassandra-all-2.1.8.621.jar:2.1.8.621]
> at 
> org.apache.cassandra.service.pager.RangeSliceQueryPager.fetchPage(RangeSliceQueryPager.java:37)
>  ~[cassandra-all-2.1.8.621.jar:2.1.8.621]
> at 
> org.apache.cassandra.cql3.statements.SelectStatement.pageCountQuery(SelectStatement.java:286)
>  ~[cassandra-all-2.1.8.621.jar:2.1.8.621]
> at 
> org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:230)
>  ~[cassandra-all-2.1.8.621.jar:2.1.8.621]
> at 
> org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:67)
>  ~[cassandra-all-2.1.8.621.jar:2.1.8.621]
> at 
> org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:238)
>  ~[cassandra-all-2.1.8.621.jar:2.1.8.621]
> at 
> com.datastax.bdp.cassandra.cql3.DseQueryHandler$StatementExecution.execute(DseQueryHandler.java:291)
>  ~[dse-4.7.2.jar:4.7.2]
> at 
> com.datastax.bdp.cassandra.cql3.DseQueryHandler$Operation.executeWithTiming(DseQueryHandler.java:223)
>  ~[dse-4.7.2.jar:4.7.2]
> at 
> com.datastax.bdp.cassandra.cql3.DseQueryHandler$Operation.executeWithAuditLogging(DseQueryHandler.java:259)
>  ~[dse-4.7.2.jar:4.7.2]
> at 
> com.datastax.bdp.cassandra.cql3.DseQueryHandler.process(DseQueryHandler.java:94)
>  ~[dse-4.7.2.jar:4.7.2]
> at 
> org.apache.cassandra.transport.messages.QueryMessage.execute(QueryMessage.java:119)
>  ~[cassandra-all-2.1.8.621.jar:2.1.8.621]
> at 
> org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:439)
>  [cassandra-all-2.1.8.621.jar:2.1.8.621]
> at 
> org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:335)
>  [cassandra-all-2.1.8.621.jar:2.1.8.621]
> at 
> io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
>  [netty-all-4.0.23.Final.jar:4.0.23.Final]
> at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
>  [netty-all-4.0.23.Final.jar:4.0.23.Final]
> at 
> io.netty.channel.AbstractChannelHandlerContext.access$700(AbstractChannelHandlerContext.java:32)
>  [netty-all-4.0.23.Final.jar:4.0.23.Final]
> at 
> io.netty.channel.AbstractChannelHandlerContext$8.run(AbstractChannelHandlerContext.java:324)
>  [netty-all-4.0.23.Final.jar:4.0.23.Final]
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) 
> [na:1.7.0_75]
> at 
> org.apache.cassandra.concurrent.AbstractTracingAwareExecutorService$FutureTask.run(AbstractTracingAwareExecutorService.java:164)
>  [cassandra-all-2.1.8.621.jar:2.1.8.621]
> at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:105) 
> [cassandra-all-2.1.8.621.jar:2.1.8.621]
> at java.lang.Thread.run(Thread.java:745) [na:1.7.0_75]
> {code}
> Table definition looks something like:
> {code}
> CREATE TABLE tbl1 (
> field1 bigint,
> field2 int,
> field3 timestamp,
> field4 map,
> field5 text static,
> field6 text static,
> field7 text static
> PRIMARY KEY (field1, field2, field3)
> ) WITH CLUSTERING ORDER BY (field2 ASC, field3 ASC)
> AND bloom_filter_fp_chance = 0.1
> AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
> AND comment = ''
> AND compaction = {'class': 
> 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'}
> AND compression = {'sstable_compression': 
> 'org.apache.cassandra.io.compress.LZ4Compressor'}
>...
> {code}
> Following appears in debug log leading up to the error:
> {code}
> DEBUG [SharedPool-Worker-1] 2015-09-17 15:32:06,484  
> AbstractQueryPager.java

[1/4] cassandra git commit: Fix paging issues with partitions containing only static columns data

2015-10-20 Thread blerer
Repository: cassandra
Updated Branches:
  refs/heads/trunk fcdc4e1d7 -> e017d89a6


Fix paging issues with partitions containing only static columns data

patch by Benjamin Lerer; reviewed by Sylvain Lebresne for CASSANDRA-10381


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

Branch: refs/heads/trunk
Commit: 328916d1591be69f217f6519304651d3757d9e1d
Parents: 9b3b1cb
Author: blerer 
Authored: Tue Oct 20 14:33:50 2015 +0200
Committer: blerer 
Committed: Tue Oct 20 14:33:50 2015 +0200

--
 CHANGES.txt | 2 ++
 .../apache/cassandra/service/pager/AbstractQueryPager.java  | 6 +-
 .../cassandra/service/pager/RangeSliceQueryPager.java   | 8 ++--
 .../org/apache/cassandra/service/pager/SliceQueryPager.java | 9 +++--
 4 files changed, 20 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/328916d1/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index b17929c..dbb3480 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,6 @@
 2.1.12
+ * Fix paging issues with partitions containing only static columns data
+   (CASSANDRA-10381)
  * Fix conditions on static columns (CASSANDRA-10264)
  * AssertionError: attempted to delete non-existing file CommitLog 
(CASSANDRA-10377)
  * Merge range tombstones during compaction (CASSANDRA-7953)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/328916d1/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
--
diff --git 
a/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java 
b/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
index a3991ed..6056b9a 100644
--- a/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
+++ b/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
@@ -345,7 +345,11 @@ abstract class AbstractQueryPager implements QueryPager
 copy.addColumn(iter.next());
 }
 }
-return Math.min(counter.live(), toDiscard);
+int live = counter.live();
+// We want to take into account the row even if it was containing only 
static columns
+if (live == 0 && !staticCells.isEmpty())
+live = 1;
+return Math.min(live, toDiscard);
 }
 
 private int discardTail(ColumnFamily cf, int toDiscard, ColumnFamily copy, 
Iterator iter, DeletionInfo.InOrderTester tester)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/328916d1/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java
--
diff --git 
a/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java 
b/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java
index e02bb46..fd14c82 100644
--- a/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java
+++ b/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java
@@ -98,10 +98,14 @@ public class RangeSliceQueryPager extends AbstractQueryPager
 
 // Same as SliceQueryPager, we ignore a deleted column
 Cell firstCell = isReversed() ? lastCell(first.cf) : 
firstNonStaticCell(first.cf);
+// If the row was containing only static columns it has already been 
returned and we can skip it.
+if (firstCell == null)
+return true;
+
 CFMetaData metadata = Schema.instance.getCFMetaData(command.keyspace, 
command.columnFamily);
 return !first.cf.deletionInfo().isDeleted(firstCell)
-&& firstCell.isLive(timestamp())
-&& firstCell.name().isSameCQL3RowAs(metadata.comparator, 
lastReturnedName);
+&& firstCell.isLive(timestamp())
+&& firstCell.name().isSameCQL3RowAs(metadata.comparator, 
lastReturnedName);
 }
 
 protected boolean recordLast(Row last)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/328916d1/src/java/org/apache/cassandra/service/pager/SliceQueryPager.java
--
diff --git a/src/java/org/apache/cassandra/service/pager/SliceQueryPager.java 
b/src/java/org/apache/cassandra/service/pager/SliceQueryPager.java
index c8572d4..1a2fc6c 100644
--- a/src/java/org/apache/cassandra/service/pager/SliceQueryPager.java
+++ b/src/java/org/apache/cassandra/service/pager/SliceQueryPager.java
@@ -102,12 +102,17 @@ public class SliceQueryPager extends AbstractQueryPager 
implements SinglePartiti
 return fals

[3/4] cassandra git commit: Merge branch cassandra-2.2 into cassandra-3.0

2015-10-20 Thread blerer
Merge branch cassandra-2.2 into cassandra-3.0


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

Branch: refs/heads/trunk
Commit: 1b5e3a9b1be0c945782492e269acb4ea44730ad3
Parents: a880739 98be5de
Author: blerer 
Authored: Tue Oct 20 14:38:51 2015 +0200
Committer: blerer 
Committed: Tue Oct 20 14:39:39 2015 +0200

--
 CHANGES.txt |  1 +
 .../service/pager/AbstractQueryPager.java   | 21 ++--
 .../service/pager/RangeSliceQueryPager.java |  5 +++--
 .../service/pager/SinglePartitionPager.java |  3 +--
 4 files changed, 24 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1b5e3a9b/CHANGES.txt
--
diff --cc CHANGES.txt
index 25ad1fb,458d0d5..616ff47
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,35 -1,20 +1,36 @@@
 -2.2.4
 +3.0
 +Merged from 2.2:
   * Expose phi values from failure detector via JMX and tweak debug
 and trace logging (CASSANDRA-9526)
 - * Fix RangeNamesQueryPager (CASSANDRA-10509)
 - * Deprecate Pig support (CASSANDRA-10542)
 - * Reduce contention getting instances of CompositeType (CASSANDRA-10433)
  Merged from 2.1:
+  * Fix paging issues with partitions containing only static columns data 
(CASSANDRA-10381)
   * Fix conditions on static columns (CASSANDRA-10264)
   * AssertionError: attempted to delete non-existing file CommitLog 
(CASSANDRA-10377)
 - * (cqlsh) Distinguish negative and positive infinity in output 
(CASSANDRA-10523)
 - * (cqlsh) allow custom time_format for COPY TO (CASSANDRA-8970)
 - * Don't allow startup if the node's rack has changed (CASSANDRA-10242)
 - * (cqlsh) show partial trace if incomplete after max_trace_wait 
(CASSANDRA-7645)
  
  
 -2.2.3
 +3.0-rc2
 + * Fix SELECT DISTINCT queries between 2.2.2 nodes and 3.0 nodes 
(CASSANDRA-10473)
 + * Remove circular references in SegmentedFile (CASSANDRA-10543)
 + * Ensure validation of indexed values only occurs once per-partition 
(CASSANDRA-10536)
 + * Fix handling of static columns for range tombstones in thrift 
(CASSANDRA-10174)
 + * Support empty ColumnFilter for backward compatility on empty IN 
(CASSANDRA-10471)
 + * Remove Pig support (CASSANDRA-10542)
 + * Fix LogFile throws Exception when assertion is disabled (CASSANDRA-10522)
 + * Revert CASSANDRA-7486, make CMS default GC, move GC config to
 +   conf/jvm.options (CASSANDRA-10403)
 + * Fix TeeingAppender causing some logs to be truncated/empty 
(CASSANDRA-10447)
 + * Allow EACH_QUORUM for reads (CASSANDRA-9602)
 + * Fix potential ClassCastException while upgrading (CASSANDRA-10468)
 + * Fix NPE in MVs on update (CASSANDRA-10503)
 + * Only include modified cell data in indexing deltas (CASSANDRA-10438)
 + * Do not load keyspace when creating sstable writer (CASSANDRA-10443)
 + * If node is not yet gossiping write all MV updates to batchlog only 
(CASSANDRA-10413)
 + * Re-populate token metadata after commit log recovery (CASSANDRA-10293)
 + * Provide additional metrics for materialized views (CASSANDRA-10323)
 + * Flush system schema tables after local schema changes (CASSANDRA-10429)
 +Merged from 2.2:
 + * Reduce contention getting instances of CompositeType (CASSANDRA-10433)
 + * Fix the regression when using LIMIT with aggregates (CASSANDRA-10487)
   * Avoid NoClassDefFoundError during DataDescriptor initialization on windows 
(CASSANDRA-10412)
   * Preserve case of quoted Role & User names (CASSANDRA-10394)
   * cqlsh pg-style-strings broken (CASSANDRA-10484)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/1b5e3a9b/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
--
diff --cc src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
index b92d1e1,2a35e4b..bdebd43
--- a/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
+++ b/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
@@@ -17,179 -17,381 +17,196 @@@
   */
  package org.apache.cassandra.service.pager;
  
 -import java.util.*;
 +import java.util.NoSuchElementException;
  
 -import com.google.common.annotations.VisibleForTesting;
 -
--import org.apache.cassandra.config.CFMetaData;
 -import org.apache.cassandra.config.ColumnDefinition;
 -import org.apache.cassandra.config.Schema;
  import org.apache.cassandra.db.*;
 -import org.apache.cassandra.db.filter.ColumnCounter;
 -import org.apache.cassandra.db.filter.IDiskAtomFilter;
 +import org.apache.cassandra.db.rows.*;
 +import org.apache.cassandra.db.partitions.*;
 +import org.apache.cassandra.db.filter

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

2015-10-20 Thread blerer
Merge branch cassandra-3.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/e017d89a
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e017d89a
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e017d89a

Branch: refs/heads/trunk
Commit: e017d89a6f279098137f5d7c48cd057b56734a14
Parents: fcdc4e1 1b5e3a9
Author: blerer 
Authored: Tue Oct 20 14:41:46 2015 +0200
Committer: blerer 
Committed: Tue Oct 20 14:41:57 2015 +0200

--
 CHANGES.txt |  1 +
 .../service/pager/AbstractQueryPager.java   | 21 ++--
 .../service/pager/RangeSliceQueryPager.java |  5 +++--
 .../service/pager/SinglePartitionPager.java |  3 +--
 4 files changed, 24 insertions(+), 6 deletions(-)
--


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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e017d89a/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
--



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

2015-10-20 Thread blerer
Merge branch cassandra-2.1 into cassandra-2.2

Conflicts:
CHANGES.txt


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

Branch: refs/heads/trunk
Commit: 98be5de7035509fe7160917350e6c401df67d3b0
Parents: a337907 328916d
Author: blerer 
Authored: Tue Oct 20 14:37:10 2015 +0200
Committer: blerer 
Committed: Tue Oct 20 14:37:10 2015 +0200

--
 CHANGES.txt | 1 +
 .../apache/cassandra/service/pager/AbstractQueryPager.java  | 6 +-
 .../cassandra/service/pager/RangeSliceQueryPager.java   | 8 ++--
 .../org/apache/cassandra/service/pager/SliceQueryPager.java | 9 +++--
 4 files changed, 19 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/98be5de7/CHANGES.txt
--
diff --cc CHANGES.txt
index 261a53a,dbb3480..458d0d5
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,12 -1,9 +1,13 @@@
 -2.1.12
 - * Fix paging issues with partitions containing only static columns data
 -   (CASSANDRA-10381)
 +2.2.4
 + * Expose phi values from failure detector via JMX and tweak debug
 +   and trace logging (CASSANDRA-9526)
 + * Fix RangeNamesQueryPager (CASSANDRA-10509)
 + * Deprecate Pig support (CASSANDRA-10542)
 + * Reduce contention getting instances of CompositeType (CASSANDRA-10433)
 +Merged from 2.1:
++ * Fix paging issues with partitions containing only static columns data 
(CASSANDRA-10381)
   * Fix conditions on static columns (CASSANDRA-10264)
   * AssertionError: attempted to delete non-existing file CommitLog 
(CASSANDRA-10377)
 - * Merge range tombstones during compaction (CASSANDRA-7953)
   * (cqlsh) Distinguish negative and positive infinity in output 
(CASSANDRA-10523)
   * (cqlsh) allow custom time_format for COPY TO (CASSANDRA-8970)
   * Don't allow startup if the node's rack has changed (CASSANDRA-10242)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/98be5de7/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
--



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

2015-10-20 Thread blerer
Merge branch cassandra-2.1 into cassandra-2.2

Conflicts:
CHANGES.txt


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

Branch: refs/heads/cassandra-3.0
Commit: 98be5de7035509fe7160917350e6c401df67d3b0
Parents: a337907 328916d
Author: blerer 
Authored: Tue Oct 20 14:37:10 2015 +0200
Committer: blerer 
Committed: Tue Oct 20 14:37:10 2015 +0200

--
 CHANGES.txt | 1 +
 .../apache/cassandra/service/pager/AbstractQueryPager.java  | 6 +-
 .../cassandra/service/pager/RangeSliceQueryPager.java   | 8 ++--
 .../org/apache/cassandra/service/pager/SliceQueryPager.java | 9 +++--
 4 files changed, 19 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/98be5de7/CHANGES.txt
--
diff --cc CHANGES.txt
index 261a53a,dbb3480..458d0d5
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,12 -1,9 +1,13 @@@
 -2.1.12
 - * Fix paging issues with partitions containing only static columns data
 -   (CASSANDRA-10381)
 +2.2.4
 + * Expose phi values from failure detector via JMX and tweak debug
 +   and trace logging (CASSANDRA-9526)
 + * Fix RangeNamesQueryPager (CASSANDRA-10509)
 + * Deprecate Pig support (CASSANDRA-10542)
 + * Reduce contention getting instances of CompositeType (CASSANDRA-10433)
 +Merged from 2.1:
++ * Fix paging issues with partitions containing only static columns data 
(CASSANDRA-10381)
   * Fix conditions on static columns (CASSANDRA-10264)
   * AssertionError: attempted to delete non-existing file CommitLog 
(CASSANDRA-10377)
 - * Merge range tombstones during compaction (CASSANDRA-7953)
   * (cqlsh) Distinguish negative and positive infinity in output 
(CASSANDRA-10523)
   * (cqlsh) allow custom time_format for COPY TO (CASSANDRA-8970)
   * Don't allow startup if the node's rack has changed (CASSANDRA-10242)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/98be5de7/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
--



[1/3] cassandra git commit: Fix paging issues with partitions containing only static columns data

2015-10-20 Thread blerer
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.0 a88073918 -> 1b5e3a9b1


Fix paging issues with partitions containing only static columns data

patch by Benjamin Lerer; reviewed by Sylvain Lebresne for CASSANDRA-10381


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

Branch: refs/heads/cassandra-3.0
Commit: 328916d1591be69f217f6519304651d3757d9e1d
Parents: 9b3b1cb
Author: blerer 
Authored: Tue Oct 20 14:33:50 2015 +0200
Committer: blerer 
Committed: Tue Oct 20 14:33:50 2015 +0200

--
 CHANGES.txt | 2 ++
 .../apache/cassandra/service/pager/AbstractQueryPager.java  | 6 +-
 .../cassandra/service/pager/RangeSliceQueryPager.java   | 8 ++--
 .../org/apache/cassandra/service/pager/SliceQueryPager.java | 9 +++--
 4 files changed, 20 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/328916d1/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index b17929c..dbb3480 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,6 @@
 2.1.12
+ * Fix paging issues with partitions containing only static columns data
+   (CASSANDRA-10381)
  * Fix conditions on static columns (CASSANDRA-10264)
  * AssertionError: attempted to delete non-existing file CommitLog 
(CASSANDRA-10377)
  * Merge range tombstones during compaction (CASSANDRA-7953)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/328916d1/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
--
diff --git 
a/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java 
b/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
index a3991ed..6056b9a 100644
--- a/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
+++ b/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
@@ -345,7 +345,11 @@ abstract class AbstractQueryPager implements QueryPager
 copy.addColumn(iter.next());
 }
 }
-return Math.min(counter.live(), toDiscard);
+int live = counter.live();
+// We want to take into account the row even if it was containing only 
static columns
+if (live == 0 && !staticCells.isEmpty())
+live = 1;
+return Math.min(live, toDiscard);
 }
 
 private int discardTail(ColumnFamily cf, int toDiscard, ColumnFamily copy, 
Iterator iter, DeletionInfo.InOrderTester tester)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/328916d1/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java
--
diff --git 
a/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java 
b/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java
index e02bb46..fd14c82 100644
--- a/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java
+++ b/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java
@@ -98,10 +98,14 @@ public class RangeSliceQueryPager extends AbstractQueryPager
 
 // Same as SliceQueryPager, we ignore a deleted column
 Cell firstCell = isReversed() ? lastCell(first.cf) : 
firstNonStaticCell(first.cf);
+// If the row was containing only static columns it has already been 
returned and we can skip it.
+if (firstCell == null)
+return true;
+
 CFMetaData metadata = Schema.instance.getCFMetaData(command.keyspace, 
command.columnFamily);
 return !first.cf.deletionInfo().isDeleted(firstCell)
-&& firstCell.isLive(timestamp())
-&& firstCell.name().isSameCQL3RowAs(metadata.comparator, 
lastReturnedName);
+&& firstCell.isLive(timestamp())
+&& firstCell.name().isSameCQL3RowAs(metadata.comparator, 
lastReturnedName);
 }
 
 protected boolean recordLast(Row last)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/328916d1/src/java/org/apache/cassandra/service/pager/SliceQueryPager.java
--
diff --git a/src/java/org/apache/cassandra/service/pager/SliceQueryPager.java 
b/src/java/org/apache/cassandra/service/pager/SliceQueryPager.java
index c8572d4..1a2fc6c 100644
--- a/src/java/org/apache/cassandra/service/pager/SliceQueryPager.java
+++ b/src/java/org/apache/cassandra/service/pager/SliceQueryPager.java
@@ -102,12 +102,17 @@ public class SliceQueryPager extends AbstractQueryPager 
implements SinglePartiti

[3/3] cassandra git commit: Merge branch cassandra-2.2 into cassandra-3.0

2015-10-20 Thread blerer
Merge branch cassandra-2.2 into cassandra-3.0


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

Branch: refs/heads/cassandra-3.0
Commit: 1b5e3a9b1be0c945782492e269acb4ea44730ad3
Parents: a880739 98be5de
Author: blerer 
Authored: Tue Oct 20 14:38:51 2015 +0200
Committer: blerer 
Committed: Tue Oct 20 14:39:39 2015 +0200

--
 CHANGES.txt |  1 +
 .../service/pager/AbstractQueryPager.java   | 21 ++--
 .../service/pager/RangeSliceQueryPager.java |  5 +++--
 .../service/pager/SinglePartitionPager.java |  3 +--
 4 files changed, 24 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1b5e3a9b/CHANGES.txt
--
diff --cc CHANGES.txt
index 25ad1fb,458d0d5..616ff47
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,35 -1,20 +1,36 @@@
 -2.2.4
 +3.0
 +Merged from 2.2:
   * Expose phi values from failure detector via JMX and tweak debug
 and trace logging (CASSANDRA-9526)
 - * Fix RangeNamesQueryPager (CASSANDRA-10509)
 - * Deprecate Pig support (CASSANDRA-10542)
 - * Reduce contention getting instances of CompositeType (CASSANDRA-10433)
  Merged from 2.1:
+  * Fix paging issues with partitions containing only static columns data 
(CASSANDRA-10381)
   * Fix conditions on static columns (CASSANDRA-10264)
   * AssertionError: attempted to delete non-existing file CommitLog 
(CASSANDRA-10377)
 - * (cqlsh) Distinguish negative and positive infinity in output 
(CASSANDRA-10523)
 - * (cqlsh) allow custom time_format for COPY TO (CASSANDRA-8970)
 - * Don't allow startup if the node's rack has changed (CASSANDRA-10242)
 - * (cqlsh) show partial trace if incomplete after max_trace_wait 
(CASSANDRA-7645)
  
  
 -2.2.3
 +3.0-rc2
 + * Fix SELECT DISTINCT queries between 2.2.2 nodes and 3.0 nodes 
(CASSANDRA-10473)
 + * Remove circular references in SegmentedFile (CASSANDRA-10543)
 + * Ensure validation of indexed values only occurs once per-partition 
(CASSANDRA-10536)
 + * Fix handling of static columns for range tombstones in thrift 
(CASSANDRA-10174)
 + * Support empty ColumnFilter for backward compatility on empty IN 
(CASSANDRA-10471)
 + * Remove Pig support (CASSANDRA-10542)
 + * Fix LogFile throws Exception when assertion is disabled (CASSANDRA-10522)
 + * Revert CASSANDRA-7486, make CMS default GC, move GC config to
 +   conf/jvm.options (CASSANDRA-10403)
 + * Fix TeeingAppender causing some logs to be truncated/empty 
(CASSANDRA-10447)
 + * Allow EACH_QUORUM for reads (CASSANDRA-9602)
 + * Fix potential ClassCastException while upgrading (CASSANDRA-10468)
 + * Fix NPE in MVs on update (CASSANDRA-10503)
 + * Only include modified cell data in indexing deltas (CASSANDRA-10438)
 + * Do not load keyspace when creating sstable writer (CASSANDRA-10443)
 + * If node is not yet gossiping write all MV updates to batchlog only 
(CASSANDRA-10413)
 + * Re-populate token metadata after commit log recovery (CASSANDRA-10293)
 + * Provide additional metrics for materialized views (CASSANDRA-10323)
 + * Flush system schema tables after local schema changes (CASSANDRA-10429)
 +Merged from 2.2:
 + * Reduce contention getting instances of CompositeType (CASSANDRA-10433)
 + * Fix the regression when using LIMIT with aggregates (CASSANDRA-10487)
   * Avoid NoClassDefFoundError during DataDescriptor initialization on windows 
(CASSANDRA-10412)
   * Preserve case of quoted Role & User names (CASSANDRA-10394)
   * cqlsh pg-style-strings broken (CASSANDRA-10484)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/1b5e3a9b/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
--
diff --cc src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
index b92d1e1,2a35e4b..bdebd43
--- a/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
+++ b/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
@@@ -17,179 -17,381 +17,196 @@@
   */
  package org.apache.cassandra.service.pager;
  
 -import java.util.*;
 +import java.util.NoSuchElementException;
  
 -import com.google.common.annotations.VisibleForTesting;
 -
--import org.apache.cassandra.config.CFMetaData;
 -import org.apache.cassandra.config.ColumnDefinition;
 -import org.apache.cassandra.config.Schema;
  import org.apache.cassandra.db.*;
 -import org.apache.cassandra.db.filter.ColumnCounter;
 -import org.apache.cassandra.db.filter.IDiskAtomFilter;
 +import org.apache.cassandra.db.rows.*;
 +import org.apache.cassandra.db.partitions.*;
 +import org.apache.cassandra.d

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

2015-10-20 Thread blerer
Merge branch cassandra-2.1 into cassandra-2.2

Conflicts:
CHANGES.txt


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

Branch: refs/heads/cassandra-2.2
Commit: 98be5de7035509fe7160917350e6c401df67d3b0
Parents: a337907 328916d
Author: blerer 
Authored: Tue Oct 20 14:37:10 2015 +0200
Committer: blerer 
Committed: Tue Oct 20 14:37:10 2015 +0200

--
 CHANGES.txt | 1 +
 .../apache/cassandra/service/pager/AbstractQueryPager.java  | 6 +-
 .../cassandra/service/pager/RangeSliceQueryPager.java   | 8 ++--
 .../org/apache/cassandra/service/pager/SliceQueryPager.java | 9 +++--
 4 files changed, 19 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/98be5de7/CHANGES.txt
--
diff --cc CHANGES.txt
index 261a53a,dbb3480..458d0d5
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,12 -1,9 +1,13 @@@
 -2.1.12
 - * Fix paging issues with partitions containing only static columns data
 -   (CASSANDRA-10381)
 +2.2.4
 + * Expose phi values from failure detector via JMX and tweak debug
 +   and trace logging (CASSANDRA-9526)
 + * Fix RangeNamesQueryPager (CASSANDRA-10509)
 + * Deprecate Pig support (CASSANDRA-10542)
 + * Reduce contention getting instances of CompositeType (CASSANDRA-10433)
 +Merged from 2.1:
++ * Fix paging issues with partitions containing only static columns data 
(CASSANDRA-10381)
   * Fix conditions on static columns (CASSANDRA-10264)
   * AssertionError: attempted to delete non-existing file CommitLog 
(CASSANDRA-10377)
 - * Merge range tombstones during compaction (CASSANDRA-7953)
   * (cqlsh) Distinguish negative and positive infinity in output 
(CASSANDRA-10523)
   * (cqlsh) allow custom time_format for COPY TO (CASSANDRA-8970)
   * Don't allow startup if the node's rack has changed (CASSANDRA-10242)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/98be5de7/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
--



[1/2] cassandra git commit: Fix paging issues with partitions containing only static columns data

2015-10-20 Thread blerer
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.2 a33790730 -> 98be5de70


Fix paging issues with partitions containing only static columns data

patch by Benjamin Lerer; reviewed by Sylvain Lebresne for CASSANDRA-10381


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

Branch: refs/heads/cassandra-2.2
Commit: 328916d1591be69f217f6519304651d3757d9e1d
Parents: 9b3b1cb
Author: blerer 
Authored: Tue Oct 20 14:33:50 2015 +0200
Committer: blerer 
Committed: Tue Oct 20 14:33:50 2015 +0200

--
 CHANGES.txt | 2 ++
 .../apache/cassandra/service/pager/AbstractQueryPager.java  | 6 +-
 .../cassandra/service/pager/RangeSliceQueryPager.java   | 8 ++--
 .../org/apache/cassandra/service/pager/SliceQueryPager.java | 9 +++--
 4 files changed, 20 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/328916d1/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index b17929c..dbb3480 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,6 @@
 2.1.12
+ * Fix paging issues with partitions containing only static columns data
+   (CASSANDRA-10381)
  * Fix conditions on static columns (CASSANDRA-10264)
  * AssertionError: attempted to delete non-existing file CommitLog 
(CASSANDRA-10377)
  * Merge range tombstones during compaction (CASSANDRA-7953)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/328916d1/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
--
diff --git 
a/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java 
b/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
index a3991ed..6056b9a 100644
--- a/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
+++ b/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
@@ -345,7 +345,11 @@ abstract class AbstractQueryPager implements QueryPager
 copy.addColumn(iter.next());
 }
 }
-return Math.min(counter.live(), toDiscard);
+int live = counter.live();
+// We want to take into account the row even if it was containing only 
static columns
+if (live == 0 && !staticCells.isEmpty())
+live = 1;
+return Math.min(live, toDiscard);
 }
 
 private int discardTail(ColumnFamily cf, int toDiscard, ColumnFamily copy, 
Iterator iter, DeletionInfo.InOrderTester tester)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/328916d1/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java
--
diff --git 
a/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java 
b/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java
index e02bb46..fd14c82 100644
--- a/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java
+++ b/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java
@@ -98,10 +98,14 @@ public class RangeSliceQueryPager extends AbstractQueryPager
 
 // Same as SliceQueryPager, we ignore a deleted column
 Cell firstCell = isReversed() ? lastCell(first.cf) : 
firstNonStaticCell(first.cf);
+// If the row was containing only static columns it has already been 
returned and we can skip it.
+if (firstCell == null)
+return true;
+
 CFMetaData metadata = Schema.instance.getCFMetaData(command.keyspace, 
command.columnFamily);
 return !first.cf.deletionInfo().isDeleted(firstCell)
-&& firstCell.isLive(timestamp())
-&& firstCell.name().isSameCQL3RowAs(metadata.comparator, 
lastReturnedName);
+&& firstCell.isLive(timestamp())
+&& firstCell.name().isSameCQL3RowAs(metadata.comparator, 
lastReturnedName);
 }
 
 protected boolean recordLast(Row last)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/328916d1/src/java/org/apache/cassandra/service/pager/SliceQueryPager.java
--
diff --git a/src/java/org/apache/cassandra/service/pager/SliceQueryPager.java 
b/src/java/org/apache/cassandra/service/pager/SliceQueryPager.java
index c8572d4..1a2fc6c 100644
--- a/src/java/org/apache/cassandra/service/pager/SliceQueryPager.java
+++ b/src/java/org/apache/cassandra/service/pager/SliceQueryPager.java
@@ -102,12 +102,17 @@ public class SliceQueryPager extends AbstractQueryPager 
implements SinglePartiti

cassandra git commit: Fix paging issues with partitions containing only static columns data

2015-10-20 Thread blerer
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 9b3b1cb03 -> 328916d15


Fix paging issues with partitions containing only static columns data

patch by Benjamin Lerer; reviewed by Sylvain Lebresne for CASSANDRA-10381


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

Branch: refs/heads/cassandra-2.1
Commit: 328916d1591be69f217f6519304651d3757d9e1d
Parents: 9b3b1cb
Author: blerer 
Authored: Tue Oct 20 14:33:50 2015 +0200
Committer: blerer 
Committed: Tue Oct 20 14:33:50 2015 +0200

--
 CHANGES.txt | 2 ++
 .../apache/cassandra/service/pager/AbstractQueryPager.java  | 6 +-
 .../cassandra/service/pager/RangeSliceQueryPager.java   | 8 ++--
 .../org/apache/cassandra/service/pager/SliceQueryPager.java | 9 +++--
 4 files changed, 20 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/328916d1/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index b17929c..dbb3480 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,6 @@
 2.1.12
+ * Fix paging issues with partitions containing only static columns data
+   (CASSANDRA-10381)
  * Fix conditions on static columns (CASSANDRA-10264)
  * AssertionError: attempted to delete non-existing file CommitLog 
(CASSANDRA-10377)
  * Merge range tombstones during compaction (CASSANDRA-7953)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/328916d1/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
--
diff --git 
a/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java 
b/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
index a3991ed..6056b9a 100644
--- a/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
+++ b/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
@@ -345,7 +345,11 @@ abstract class AbstractQueryPager implements QueryPager
 copy.addColumn(iter.next());
 }
 }
-return Math.min(counter.live(), toDiscard);
+int live = counter.live();
+// We want to take into account the row even if it was containing only 
static columns
+if (live == 0 && !staticCells.isEmpty())
+live = 1;
+return Math.min(live, toDiscard);
 }
 
 private int discardTail(ColumnFamily cf, int toDiscard, ColumnFamily copy, 
Iterator iter, DeletionInfo.InOrderTester tester)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/328916d1/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java
--
diff --git 
a/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java 
b/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java
index e02bb46..fd14c82 100644
--- a/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java
+++ b/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java
@@ -98,10 +98,14 @@ public class RangeSliceQueryPager extends AbstractQueryPager
 
 // Same as SliceQueryPager, we ignore a deleted column
 Cell firstCell = isReversed() ? lastCell(first.cf) : 
firstNonStaticCell(first.cf);
+// If the row was containing only static columns it has already been 
returned and we can skip it.
+if (firstCell == null)
+return true;
+
 CFMetaData metadata = Schema.instance.getCFMetaData(command.keyspace, 
command.columnFamily);
 return !first.cf.deletionInfo().isDeleted(firstCell)
-&& firstCell.isLive(timestamp())
-&& firstCell.name().isSameCQL3RowAs(metadata.comparator, 
lastReturnedName);
+&& firstCell.isLive(timestamp())
+&& firstCell.name().isSameCQL3RowAs(metadata.comparator, 
lastReturnedName);
 }
 
 protected boolean recordLast(Row last)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/328916d1/src/java/org/apache/cassandra/service/pager/SliceQueryPager.java
--
diff --git a/src/java/org/apache/cassandra/service/pager/SliceQueryPager.java 
b/src/java/org/apache/cassandra/service/pager/SliceQueryPager.java
index c8572d4..1a2fc6c 100644
--- a/src/java/org/apache/cassandra/service/pager/SliceQueryPager.java
+++ b/src/java/org/apache/cassandra/service/pager/SliceQueryPager.java
@@ -102,12 +102,17 @@ public class SliceQueryPager extends AbstractQueryPager 
implements SinglePartiti

[jira] [Updated] (CASSANDRA-10264) Unable to use conditions on static columns for DELETE

2015-10-20 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer updated CASSANDRA-10264:
---
Reproduced In: 3.0 beta 1, 2.2.0, 2.1.9  (was: 2.1.9, 2.2.0, 3.0 beta 1)
Fix Version/s: 3.0.0
   2.1.12
   2.2.4

> Unable to use conditions on static columns for DELETE
> -
>
> Key: CASSANDRA-10264
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10264
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
> Environment: Cassandra 2.2.0
>Reporter: DOAN DuyHai
>Assignee: Benjamin Lerer
> Fix For: 2.2.4, 2.1.12, 3.0.0
>
> Attachments: 10264-2.1-V2.txt, 10264-2.1.txt, 10264-3.0-V2.txt, 
> 10264-3.0.txt
>
>
> {noformat}
> cqlsh:test> create table static_table(id int, stat int static, ord int, val 
> text, primary key(id,ord));
> cqlsh:test> insert into static_table (id,stat,ord,val) VALUES ( 1, 1, 1, '1');
> cqlsh:test> delete from static_table where id=1 and ord=1 if stat != 1;
> Invalid syntax at line 1, char 55
>   delete from static_table where id=1 and ord=1 if stat != 1;
> ^
> {noformat}
> Same error if using =, <, <=, >= or > condition
> According to [~thobbs] the syntax should work. Plus, the error message is 
> wrong



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


[jira] [Commented] (CASSANDRA-10264) Unable to use conditions on static columns for DELETE

2015-10-20 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer commented on CASSANDRA-10264:


Committed in 2.1 at 9b3b1cb03c6536d40adfcfa8f93577079b9a9d1d. Merged into 2.2, 
3.0 and trunk

> Unable to use conditions on static columns for DELETE
> -
>
> Key: CASSANDRA-10264
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10264
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
> Environment: Cassandra 2.2.0
>Reporter: DOAN DuyHai
>Assignee: Benjamin Lerer
> Attachments: 10264-2.1-V2.txt, 10264-2.1.txt, 10264-3.0-V2.txt, 
> 10264-3.0.txt
>
>
> {noformat}
> cqlsh:test> create table static_table(id int, stat int static, ord int, val 
> text, primary key(id,ord));
> cqlsh:test> insert into static_table (id,stat,ord,val) VALUES ( 1, 1, 1, '1');
> cqlsh:test> delete from static_table where id=1 and ord=1 if stat != 1;
> Invalid syntax at line 1, char 55
>   delete from static_table where id=1 and ord=1 if stat != 1;
> ^
> {noformat}
> Same error if using =, <, <=, >= or > condition
> According to [~thobbs] the syntax should work. Plus, the error message is 
> wrong



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


[jira] [Updated] (CASSANDRA-10264) Unable to use conditions on static columns for DELETE

2015-10-20 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer updated CASSANDRA-10264:
---
Attachment: 10264-3.0-V2.txt
10264-2.1-V2.txt

Attached the latest patches

> Unable to use conditions on static columns for DELETE
> -
>
> Key: CASSANDRA-10264
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10264
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
> Environment: Cassandra 2.2.0
>Reporter: DOAN DuyHai
>Assignee: Benjamin Lerer
> Attachments: 10264-2.1-V2.txt, 10264-2.1.txt, 10264-3.0-V2.txt, 
> 10264-3.0.txt
>
>
> {noformat}
> cqlsh:test> create table static_table(id int, stat int static, ord int, val 
> text, primary key(id,ord));
> cqlsh:test> insert into static_table (id,stat,ord,val) VALUES ( 1, 1, 1, '1');
> cqlsh:test> delete from static_table where id=1 and ord=1 if stat != 1;
> Invalid syntax at line 1, char 55
>   delete from static_table where id=1 and ord=1 if stat != 1;
> ^
> {noformat}
> Same error if using =, <, <=, >= or > condition
> According to [~thobbs] the syntax should work. Plus, the error message is 
> wrong



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


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

2015-10-20 Thread blerer
Merge branch cassandra-3.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/fcdc4e1d
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/fcdc4e1d
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/fcdc4e1d

Branch: refs/heads/trunk
Commit: fcdc4e1d70434ddbdf8a0180cb3b15bf501a3dec
Parents: a9060f0 a880739
Author: blerer 
Authored: Tue Oct 20 14:12:26 2015 +0200
Committer: blerer 
Committed: Tue Oct 20 14:12:41 2015 +0200

--
 CHANGES.txt |  1 +
 pylib/cqlshlib/cql3handling.py  |  4 ++--
 .../org/apache/cassandra/cql3/Operations.java   | 16 -
 .../cql3/statements/DeleteStatement.java|  7 +++---
 .../cql3/statements/ModificationStatement.java  | 21 +---
 .../cql3/statements/UpdateStatement.java| 25 ++--
 .../operations/InsertUpdateIfConditionTest.java | 11 +
 7 files changed, 57 insertions(+), 28 deletions(-)
--


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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fcdc4e1d/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
--



[1/4] cassandra git commit: Fix conditions on static columns

2015-10-20 Thread blerer
Repository: cassandra
Updated Branches:
  refs/heads/trunk a9060f033 -> fcdc4e1d7


Fix conditions on static columns

patch by Benjamin Lerer; reviewed by Sylvain Lebresne for CASSANDRA-10264


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

Branch: refs/heads/trunk
Commit: 9b3b1cb03c6536d40adfcfa8f93577079b9a9d1d
Parents: b84ed11
Author: blerer 
Authored: Tue Oct 20 13:54:46 2015 +0200
Committer: blerer 
Committed: Tue Oct 20 13:54:46 2015 +0200

--
 CHANGES.txt |  1 +
 pylib/cqlshlib/cql3handling.py  |  2 +-
 .../cql3/statements/ModificationStatement.java  | 24 ++--
 .../operations/InsertUpdateIfConditionTest.java | 12 +-
 4 files changed, 35 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9b3b1cb0/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 7358689..b17929c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.12
+ * Fix conditions on static columns (CASSANDRA-10264)
  * AssertionError: attempted to delete non-existing file CommitLog 
(CASSANDRA-10377)
  * Merge range tombstones during compaction (CASSANDRA-7953)
  * (cqlsh) Distinguish negative and positive infinity in output 
(CASSANDRA-10523)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9b3b1cb0/pylib/cqlshlib/cql3handling.py
--
diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py
index 5f93003..49970e4 100644
--- a/pylib/cqlshlib/cql3handling.py
+++ b/pylib/cqlshlib/cql3handling.py
@@ -143,7 +143,7 @@ JUNK ::= /([ 
\t\r\f\v]+|(--|[/][/])[^\n\r]*([\n\r]|$)|[/][*].*?[*][/])/ ;
  ::=  "*" ;
  ::=  ";" ;
  ::=/[-+=,().]/ ;
- ::=   /[<>]=?/ ;
+ ::=   /[<>!]=?/ ;
  ::=  /[][{}]/ ;
 
  ::= "-"?  ;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9b3b1cb0/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
--
diff --git 
a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java 
b/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
index 37b46ae..75a3b40 100644
--- a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
@@ -29,7 +29,6 @@ import org.apache.cassandra.config.ColumnDefinition;
 import org.apache.cassandra.config.Schema;
 import org.apache.cassandra.cql3.*;
 import org.apache.cassandra.db.*;
-import org.apache.cassandra.db.composites.AbstractCellNameType;
 import org.apache.cassandra.db.composites.CBuilder;
 import org.apache.cassandra.db.composites.Composite;
 import org.apache.cassandra.db.filter.ColumnSlice;
@@ -339,7 +338,7 @@ public abstract class ModificationStatement implements 
CQLStatement
 //   UPDATE t SET s = 3 WHERE k = 0 AND v = 1
 //   DELETE v FROM t WHERE k = 0 AND v = 1
 // sounds like you don't really understand what your are doing.
-if (setsStaticColumns && !setsRegularColumns)
+if (appliesOnlyToStaticColumns())
 {
 // If we set no non-static columns, then it's fine not to have 
clustering columns
 if (hasNoClusteringColumns)
@@ -361,6 +360,27 @@ public abstract class ModificationStatement implements 
CQLStatement
 return createClusteringPrefixBuilderInternal(options);
 }
 
+/**
+ * Checks that the modification only apply to static columns.
+ * @return true if the modification only apply to static 
columns, false otherwise.
+ */
+private boolean appliesOnlyToStaticColumns()
+{
+return setsStaticColumns && !appliesToRegularColumns();
+}
+
+/**
+ * Checks that the modification apply to regular columns.
+ * @return true if the modification apply to regular columns, 
false otherwise.
+ */
+private boolean appliesToRegularColumns()
+{
+// If we have regular operations, this applies to regular columns.
+// Otherwise, if the statement is a DELETE and columnOperations is 
empty, this means we have no operations,
+// which for a DELETE means a full row deletion. Which means the 
operation applies to all columns and regular ones in particular.
+return setsRegularColumns || (type == StatementType.DELETE && 
columnOperations.isEmpty());
+}
+
 private Composite createClusteringPrefixBuilderInternal(QueryOptions 
options)

[3/4] cassandra git commit: Merge branch cassandra-2.2 into cassandra-3.0

2015-10-20 Thread blerer
Merge branch cassandra-2.2 into cassandra-3.0


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

Branch: refs/heads/trunk
Commit: a880739187ea5521e8e558a19871985a846b330e
Parents: fa909cc a337907
Author: blerer 
Authored: Tue Oct 20 14:09:16 2015 +0200
Committer: blerer 
Committed: Tue Oct 20 14:10:15 2015 +0200

--
 CHANGES.txt |  1 +
 pylib/cqlshlib/cql3handling.py  |  4 ++--
 .../org/apache/cassandra/cql3/Operations.java   | 16 -
 .../cql3/statements/DeleteStatement.java|  7 +++---
 .../cql3/statements/ModificationStatement.java  | 21 +---
 .../cql3/statements/UpdateStatement.java| 25 ++--
 .../operations/InsertUpdateIfConditionTest.java | 11 +
 7 files changed, 57 insertions(+), 28 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a8807391/CHANGES.txt
--
diff --cc CHANGES.txt
index 5a118ca,261a53a..25ad1fb
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,34 -1,19 +1,35 @@@
 -2.2.4
 +3.0
 +Merged from 2.2:
   * Expose phi values from failure detector via JMX and tweak debug
 and trace logging (CASSANDRA-9526)
 - * Fix RangeNamesQueryPager (CASSANDRA-10509)
 - * Deprecate Pig support (CASSANDRA-10542)
 - * Reduce contention getting instances of CompositeType (CASSANDRA-10433)
  Merged from 2.1:
+  * Fix conditions on static columns (CASSANDRA-10264)
   * AssertionError: attempted to delete non-existing file CommitLog 
(CASSANDRA-10377)
 - * (cqlsh) Distinguish negative and positive infinity in output 
(CASSANDRA-10523)
 - * (cqlsh) allow custom time_format for COPY TO (CASSANDRA-8970)
 - * Don't allow startup if the node's rack has changed (CASSANDRA-10242)
 - * (cqlsh) show partial trace if incomplete after max_trace_wait 
(CASSANDRA-7645)
  
  
 -2.2.3
 +3.0-rc2
 + * Fix SELECT DISTINCT queries between 2.2.2 nodes and 3.0 nodes 
(CASSANDRA-10473)
 + * Remove circular references in SegmentedFile (CASSANDRA-10543)
 + * Ensure validation of indexed values only occurs once per-partition 
(CASSANDRA-10536)
 + * Fix handling of static columns for range tombstones in thrift 
(CASSANDRA-10174)
 + * Support empty ColumnFilter for backward compatility on empty IN 
(CASSANDRA-10471)
 + * Remove Pig support (CASSANDRA-10542)
 + * Fix LogFile throws Exception when assertion is disabled (CASSANDRA-10522)
 + * Revert CASSANDRA-7486, make CMS default GC, move GC config to
 +   conf/jvm.options (CASSANDRA-10403)
 + * Fix TeeingAppender causing some logs to be truncated/empty 
(CASSANDRA-10447)
 + * Allow EACH_QUORUM for reads (CASSANDRA-9602)
 + * Fix potential ClassCastException while upgrading (CASSANDRA-10468)
 + * Fix NPE in MVs on update (CASSANDRA-10503)
 + * Only include modified cell data in indexing deltas (CASSANDRA-10438)
 + * Do not load keyspace when creating sstable writer (CASSANDRA-10443)
 + * If node is not yet gossiping write all MV updates to batchlog only 
(CASSANDRA-10413)
 + * Re-populate token metadata after commit log recovery (CASSANDRA-10293)
 + * Provide additional metrics for materialized views (CASSANDRA-10323)
 + * Flush system schema tables after local schema changes (CASSANDRA-10429)
 +Merged from 2.2:
 + * Reduce contention getting instances of CompositeType (CASSANDRA-10433)
 + * Fix the regression when using LIMIT with aggregates (CASSANDRA-10487)
   * Avoid NoClassDefFoundError during DataDescriptor initialization on windows 
(CASSANDRA-10412)
   * Preserve case of quoted Role & User names (CASSANDRA-10394)
   * cqlsh pg-style-strings broken (CASSANDRA-10484)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a8807391/pylib/cqlshlib/cql3handling.py
--
diff --cc pylib/cqlshlib/cql3handling.py
index 1398e0d,b4edac1..42e542f
--- a/pylib/cqlshlib/cql3handling.py
+++ b/pylib/cqlshlib/cql3handling.py
@@@ -894,7 -874,7 +894,7 @@@ syntax_rules += r''
 ;
   ::=   ( "AND"  )*
 ;
-- ::=  ( "["  "]" )? ( ( "=" | "<" | ">" | "<=" | 
">=" | "!=" ) 
++ ::=  ( "["  "]" )? (("=" | "<" | ">" | "<=" | ">=" 
| "!=") 
   | "IN" "("  ( ","  
)* ")")
;
  '''

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a8807391/src/java/org/apache/cassandra/cql3/Operations.java
--
diff --cc src/java/org/apache/cassandra/cql3/Operations.java
index c4cade1,000..0ef8517
mode 100644,00..100644
--- a/src/java/org/apache/cassand

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

2015-10-20 Thread blerer
Merge branch cassandra-2.1 into cassandra-2.2

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


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

Branch: refs/heads/trunk
Commit: a33790730a9ef0fd2ef3a6c18f00dfee013a68e3
Parents: 728f94e 9b3b1cb
Author: blerer 
Authored: Tue Oct 20 14:06:45 2015 +0200
Committer: blerer 
Committed: Tue Oct 20 14:06:45 2015 +0200

--
 CHANGES.txt |  1 +
 pylib/cqlshlib/cql3handling.py  |  2 +-
 .../cql3/statements/ModificationStatement.java  | 23 +++-
 .../operations/InsertUpdateIfConditionTest.java | 12 +-
 4 files changed, 35 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a3379073/CHANGES.txt
--
diff --cc CHANGES.txt
index 3eff22c,b17929c..261a53a
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,11 -1,7 +1,12 @@@
 -2.1.12
 +2.2.4
 + * Expose phi values from failure detector via JMX and tweak debug
 +   and trace logging (CASSANDRA-9526)
 + * Fix RangeNamesQueryPager (CASSANDRA-10509)
 + * Deprecate Pig support (CASSANDRA-10542)
 + * Reduce contention getting instances of CompositeType (CASSANDRA-10433)
 +Merged from 2.1:
+  * Fix conditions on static columns (CASSANDRA-10264)
   * AssertionError: attempted to delete non-existing file CommitLog 
(CASSANDRA-10377)
 - * Merge range tombstones during compaction (CASSANDRA-7953)
   * (cqlsh) Distinguish negative and positive infinity in output 
(CASSANDRA-10523)
   * (cqlsh) allow custom time_format for COPY TO (CASSANDRA-8970)
   * Don't allow startup if the node's rack has changed (CASSANDRA-10242)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a3379073/pylib/cqlshlib/cql3handling.py
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a3379073/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a3379073/test/unit/org/apache/cassandra/cql3/validation/operations/InsertUpdateIfConditionTest.java
--



[3/3] cassandra git commit: Merge branch cassandra-2.2 into cassandra-3.0

2015-10-20 Thread blerer
Merge branch cassandra-2.2 into cassandra-3.0


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

Branch: refs/heads/cassandra-3.0
Commit: a880739187ea5521e8e558a19871985a846b330e
Parents: fa909cc a337907
Author: blerer 
Authored: Tue Oct 20 14:09:16 2015 +0200
Committer: blerer 
Committed: Tue Oct 20 14:10:15 2015 +0200

--
 CHANGES.txt |  1 +
 pylib/cqlshlib/cql3handling.py  |  4 ++--
 .../org/apache/cassandra/cql3/Operations.java   | 16 -
 .../cql3/statements/DeleteStatement.java|  7 +++---
 .../cql3/statements/ModificationStatement.java  | 21 +---
 .../cql3/statements/UpdateStatement.java| 25 ++--
 .../operations/InsertUpdateIfConditionTest.java | 11 +
 7 files changed, 57 insertions(+), 28 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a8807391/CHANGES.txt
--
diff --cc CHANGES.txt
index 5a118ca,261a53a..25ad1fb
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,34 -1,19 +1,35 @@@
 -2.2.4
 +3.0
 +Merged from 2.2:
   * Expose phi values from failure detector via JMX and tweak debug
 and trace logging (CASSANDRA-9526)
 - * Fix RangeNamesQueryPager (CASSANDRA-10509)
 - * Deprecate Pig support (CASSANDRA-10542)
 - * Reduce contention getting instances of CompositeType (CASSANDRA-10433)
  Merged from 2.1:
+  * Fix conditions on static columns (CASSANDRA-10264)
   * AssertionError: attempted to delete non-existing file CommitLog 
(CASSANDRA-10377)
 - * (cqlsh) Distinguish negative and positive infinity in output 
(CASSANDRA-10523)
 - * (cqlsh) allow custom time_format for COPY TO (CASSANDRA-8970)
 - * Don't allow startup if the node's rack has changed (CASSANDRA-10242)
 - * (cqlsh) show partial trace if incomplete after max_trace_wait 
(CASSANDRA-7645)
  
  
 -2.2.3
 +3.0-rc2
 + * Fix SELECT DISTINCT queries between 2.2.2 nodes and 3.0 nodes 
(CASSANDRA-10473)
 + * Remove circular references in SegmentedFile (CASSANDRA-10543)
 + * Ensure validation of indexed values only occurs once per-partition 
(CASSANDRA-10536)
 + * Fix handling of static columns for range tombstones in thrift 
(CASSANDRA-10174)
 + * Support empty ColumnFilter for backward compatility on empty IN 
(CASSANDRA-10471)
 + * Remove Pig support (CASSANDRA-10542)
 + * Fix LogFile throws Exception when assertion is disabled (CASSANDRA-10522)
 + * Revert CASSANDRA-7486, make CMS default GC, move GC config to
 +   conf/jvm.options (CASSANDRA-10403)
 + * Fix TeeingAppender causing some logs to be truncated/empty 
(CASSANDRA-10447)
 + * Allow EACH_QUORUM for reads (CASSANDRA-9602)
 + * Fix potential ClassCastException while upgrading (CASSANDRA-10468)
 + * Fix NPE in MVs on update (CASSANDRA-10503)
 + * Only include modified cell data in indexing deltas (CASSANDRA-10438)
 + * Do not load keyspace when creating sstable writer (CASSANDRA-10443)
 + * If node is not yet gossiping write all MV updates to batchlog only 
(CASSANDRA-10413)
 + * Re-populate token metadata after commit log recovery (CASSANDRA-10293)
 + * Provide additional metrics for materialized views (CASSANDRA-10323)
 + * Flush system schema tables after local schema changes (CASSANDRA-10429)
 +Merged from 2.2:
 + * Reduce contention getting instances of CompositeType (CASSANDRA-10433)
 + * Fix the regression when using LIMIT with aggregates (CASSANDRA-10487)
   * Avoid NoClassDefFoundError during DataDescriptor initialization on windows 
(CASSANDRA-10412)
   * Preserve case of quoted Role & User names (CASSANDRA-10394)
   * cqlsh pg-style-strings broken (CASSANDRA-10484)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a8807391/pylib/cqlshlib/cql3handling.py
--
diff --cc pylib/cqlshlib/cql3handling.py
index 1398e0d,b4edac1..42e542f
--- a/pylib/cqlshlib/cql3handling.py
+++ b/pylib/cqlshlib/cql3handling.py
@@@ -894,7 -874,7 +894,7 @@@ syntax_rules += r''
 ;
   ::=   ( "AND"  )*
 ;
-- ::=  ( "["  "]" )? ( ( "=" | "<" | ">" | "<=" | 
">=" | "!=" ) 
++ ::=  ( "["  "]" )? (("=" | "<" | ">" | "<=" | ">=" 
| "!=") 
   | "IN" "("  ( ","  
)* ")")
;
  '''

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a8807391/src/java/org/apache/cassandra/cql3/Operations.java
--
diff --cc src/java/org/apache/cassandra/cql3/Operations.java
index c4cade1,000..0ef8517
mode 100644,00..100644
--- a/src/java/org/apache

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

2015-10-20 Thread blerer
Merge branch cassandra-2.1 into cassandra-2.2

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


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

Branch: refs/heads/cassandra-3.0
Commit: a33790730a9ef0fd2ef3a6c18f00dfee013a68e3
Parents: 728f94e 9b3b1cb
Author: blerer 
Authored: Tue Oct 20 14:06:45 2015 +0200
Committer: blerer 
Committed: Tue Oct 20 14:06:45 2015 +0200

--
 CHANGES.txt |  1 +
 pylib/cqlshlib/cql3handling.py  |  2 +-
 .../cql3/statements/ModificationStatement.java  | 23 +++-
 .../operations/InsertUpdateIfConditionTest.java | 12 +-
 4 files changed, 35 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a3379073/CHANGES.txt
--
diff --cc CHANGES.txt
index 3eff22c,b17929c..261a53a
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,11 -1,7 +1,12 @@@
 -2.1.12
 +2.2.4
 + * Expose phi values from failure detector via JMX and tweak debug
 +   and trace logging (CASSANDRA-9526)
 + * Fix RangeNamesQueryPager (CASSANDRA-10509)
 + * Deprecate Pig support (CASSANDRA-10542)
 + * Reduce contention getting instances of CompositeType (CASSANDRA-10433)
 +Merged from 2.1:
+  * Fix conditions on static columns (CASSANDRA-10264)
   * AssertionError: attempted to delete non-existing file CommitLog 
(CASSANDRA-10377)
 - * Merge range tombstones during compaction (CASSANDRA-7953)
   * (cqlsh) Distinguish negative and positive infinity in output 
(CASSANDRA-10523)
   * (cqlsh) allow custom time_format for COPY TO (CASSANDRA-8970)
   * Don't allow startup if the node's rack has changed (CASSANDRA-10242)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a3379073/pylib/cqlshlib/cql3handling.py
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a3379073/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a3379073/test/unit/org/apache/cassandra/cql3/validation/operations/InsertUpdateIfConditionTest.java
--



[1/3] cassandra git commit: Fix conditions on static columns

2015-10-20 Thread blerer
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.0 fa909cc42 -> a88073918


Fix conditions on static columns

patch by Benjamin Lerer; reviewed by Sylvain Lebresne for CASSANDRA-10264


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

Branch: refs/heads/cassandra-3.0
Commit: 9b3b1cb03c6536d40adfcfa8f93577079b9a9d1d
Parents: b84ed11
Author: blerer 
Authored: Tue Oct 20 13:54:46 2015 +0200
Committer: blerer 
Committed: Tue Oct 20 13:54:46 2015 +0200

--
 CHANGES.txt |  1 +
 pylib/cqlshlib/cql3handling.py  |  2 +-
 .../cql3/statements/ModificationStatement.java  | 24 ++--
 .../operations/InsertUpdateIfConditionTest.java | 12 +-
 4 files changed, 35 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9b3b1cb0/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 7358689..b17929c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.12
+ * Fix conditions on static columns (CASSANDRA-10264)
  * AssertionError: attempted to delete non-existing file CommitLog 
(CASSANDRA-10377)
  * Merge range tombstones during compaction (CASSANDRA-7953)
  * (cqlsh) Distinguish negative and positive infinity in output 
(CASSANDRA-10523)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9b3b1cb0/pylib/cqlshlib/cql3handling.py
--
diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py
index 5f93003..49970e4 100644
--- a/pylib/cqlshlib/cql3handling.py
+++ b/pylib/cqlshlib/cql3handling.py
@@ -143,7 +143,7 @@ JUNK ::= /([ 
\t\r\f\v]+|(--|[/][/])[^\n\r]*([\n\r]|$)|[/][*].*?[*][/])/ ;
  ::=  "*" ;
  ::=  ";" ;
  ::=/[-+=,().]/ ;
- ::=   /[<>]=?/ ;
+ ::=   /[<>!]=?/ ;
  ::=  /[][{}]/ ;
 
  ::= "-"?  ;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9b3b1cb0/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
--
diff --git 
a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java 
b/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
index 37b46ae..75a3b40 100644
--- a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
@@ -29,7 +29,6 @@ import org.apache.cassandra.config.ColumnDefinition;
 import org.apache.cassandra.config.Schema;
 import org.apache.cassandra.cql3.*;
 import org.apache.cassandra.db.*;
-import org.apache.cassandra.db.composites.AbstractCellNameType;
 import org.apache.cassandra.db.composites.CBuilder;
 import org.apache.cassandra.db.composites.Composite;
 import org.apache.cassandra.db.filter.ColumnSlice;
@@ -339,7 +338,7 @@ public abstract class ModificationStatement implements 
CQLStatement
 //   UPDATE t SET s = 3 WHERE k = 0 AND v = 1
 //   DELETE v FROM t WHERE k = 0 AND v = 1
 // sounds like you don't really understand what your are doing.
-if (setsStaticColumns && !setsRegularColumns)
+if (appliesOnlyToStaticColumns())
 {
 // If we set no non-static columns, then it's fine not to have 
clustering columns
 if (hasNoClusteringColumns)
@@ -361,6 +360,27 @@ public abstract class ModificationStatement implements 
CQLStatement
 return createClusteringPrefixBuilderInternal(options);
 }
 
+/**
+ * Checks that the modification only apply to static columns.
+ * @return true if the modification only apply to static 
columns, false otherwise.
+ */
+private boolean appliesOnlyToStaticColumns()
+{
+return setsStaticColumns && !appliesToRegularColumns();
+}
+
+/**
+ * Checks that the modification apply to regular columns.
+ * @return true if the modification apply to regular columns, 
false otherwise.
+ */
+private boolean appliesToRegularColumns()
+{
+// If we have regular operations, this applies to regular columns.
+// Otherwise, if the statement is a DELETE and columnOperations is 
empty, this means we have no operations,
+// which for a DELETE means a full row deletion. Which means the 
operation applies to all columns and regular ones in particular.
+return setsRegularColumns || (type == StatementType.DELETE && 
columnOperations.isEmpty());
+}
+
 private Composite createClusteringPrefixBuilderInternal(QueryOption

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

2015-10-20 Thread blerer
Merge branch cassandra-2.1 into cassandra-2.2

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


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

Branch: refs/heads/cassandra-2.2
Commit: a33790730a9ef0fd2ef3a6c18f00dfee013a68e3
Parents: 728f94e 9b3b1cb
Author: blerer 
Authored: Tue Oct 20 14:06:45 2015 +0200
Committer: blerer 
Committed: Tue Oct 20 14:06:45 2015 +0200

--
 CHANGES.txt |  1 +
 pylib/cqlshlib/cql3handling.py  |  2 +-
 .../cql3/statements/ModificationStatement.java  | 23 +++-
 .../operations/InsertUpdateIfConditionTest.java | 12 +-
 4 files changed, 35 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a3379073/CHANGES.txt
--
diff --cc CHANGES.txt
index 3eff22c,b17929c..261a53a
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,11 -1,7 +1,12 @@@
 -2.1.12
 +2.2.4
 + * Expose phi values from failure detector via JMX and tweak debug
 +   and trace logging (CASSANDRA-9526)
 + * Fix RangeNamesQueryPager (CASSANDRA-10509)
 + * Deprecate Pig support (CASSANDRA-10542)
 + * Reduce contention getting instances of CompositeType (CASSANDRA-10433)
 +Merged from 2.1:
+  * Fix conditions on static columns (CASSANDRA-10264)
   * AssertionError: attempted to delete non-existing file CommitLog 
(CASSANDRA-10377)
 - * Merge range tombstones during compaction (CASSANDRA-7953)
   * (cqlsh) Distinguish negative and positive infinity in output 
(CASSANDRA-10523)
   * (cqlsh) allow custom time_format for COPY TO (CASSANDRA-8970)
   * Don't allow startup if the node's rack has changed (CASSANDRA-10242)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a3379073/pylib/cqlshlib/cql3handling.py
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a3379073/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a3379073/test/unit/org/apache/cassandra/cql3/validation/operations/InsertUpdateIfConditionTest.java
--



[1/2] cassandra git commit: Fix conditions on static columns

2015-10-20 Thread blerer
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.2 728f94e79 -> a33790730


Fix conditions on static columns

patch by Benjamin Lerer; reviewed by Sylvain Lebresne for CASSANDRA-10264


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

Branch: refs/heads/cassandra-2.2
Commit: 9b3b1cb03c6536d40adfcfa8f93577079b9a9d1d
Parents: b84ed11
Author: blerer 
Authored: Tue Oct 20 13:54:46 2015 +0200
Committer: blerer 
Committed: Tue Oct 20 13:54:46 2015 +0200

--
 CHANGES.txt |  1 +
 pylib/cqlshlib/cql3handling.py  |  2 +-
 .../cql3/statements/ModificationStatement.java  | 24 ++--
 .../operations/InsertUpdateIfConditionTest.java | 12 +-
 4 files changed, 35 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9b3b1cb0/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 7358689..b17929c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.12
+ * Fix conditions on static columns (CASSANDRA-10264)
  * AssertionError: attempted to delete non-existing file CommitLog 
(CASSANDRA-10377)
  * Merge range tombstones during compaction (CASSANDRA-7953)
  * (cqlsh) Distinguish negative and positive infinity in output 
(CASSANDRA-10523)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9b3b1cb0/pylib/cqlshlib/cql3handling.py
--
diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py
index 5f93003..49970e4 100644
--- a/pylib/cqlshlib/cql3handling.py
+++ b/pylib/cqlshlib/cql3handling.py
@@ -143,7 +143,7 @@ JUNK ::= /([ 
\t\r\f\v]+|(--|[/][/])[^\n\r]*([\n\r]|$)|[/][*].*?[*][/])/ ;
  ::=  "*" ;
  ::=  ";" ;
  ::=/[-+=,().]/ ;
- ::=   /[<>]=?/ ;
+ ::=   /[<>!]=?/ ;
  ::=  /[][{}]/ ;
 
  ::= "-"?  ;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9b3b1cb0/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
--
diff --git 
a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java 
b/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
index 37b46ae..75a3b40 100644
--- a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
@@ -29,7 +29,6 @@ import org.apache.cassandra.config.ColumnDefinition;
 import org.apache.cassandra.config.Schema;
 import org.apache.cassandra.cql3.*;
 import org.apache.cassandra.db.*;
-import org.apache.cassandra.db.composites.AbstractCellNameType;
 import org.apache.cassandra.db.composites.CBuilder;
 import org.apache.cassandra.db.composites.Composite;
 import org.apache.cassandra.db.filter.ColumnSlice;
@@ -339,7 +338,7 @@ public abstract class ModificationStatement implements 
CQLStatement
 //   UPDATE t SET s = 3 WHERE k = 0 AND v = 1
 //   DELETE v FROM t WHERE k = 0 AND v = 1
 // sounds like you don't really understand what your are doing.
-if (setsStaticColumns && !setsRegularColumns)
+if (appliesOnlyToStaticColumns())
 {
 // If we set no non-static columns, then it's fine not to have 
clustering columns
 if (hasNoClusteringColumns)
@@ -361,6 +360,27 @@ public abstract class ModificationStatement implements 
CQLStatement
 return createClusteringPrefixBuilderInternal(options);
 }
 
+/**
+ * Checks that the modification only apply to static columns.
+ * @return true if the modification only apply to static 
columns, false otherwise.
+ */
+private boolean appliesOnlyToStaticColumns()
+{
+return setsStaticColumns && !appliesToRegularColumns();
+}
+
+/**
+ * Checks that the modification apply to regular columns.
+ * @return true if the modification apply to regular columns, 
false otherwise.
+ */
+private boolean appliesToRegularColumns()
+{
+// If we have regular operations, this applies to regular columns.
+// Otherwise, if the statement is a DELETE and columnOperations is 
empty, this means we have no operations,
+// which for a DELETE means a full row deletion. Which means the 
operation applies to all columns and regular ones in particular.
+return setsRegularColumns || (type == StatementType.DELETE && 
columnOperations.isEmpty());
+}
+
 private Composite createClusteringPrefixBuilderInternal(QueryOption

cassandra git commit: Fix conditions on static columns

2015-10-20 Thread blerer
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 b84ed1176 -> 9b3b1cb03


Fix conditions on static columns

patch by Benjamin Lerer; reviewed by Sylvain Lebresne for CASSANDRA-10264


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

Branch: refs/heads/cassandra-2.1
Commit: 9b3b1cb03c6536d40adfcfa8f93577079b9a9d1d
Parents: b84ed11
Author: blerer 
Authored: Tue Oct 20 13:54:46 2015 +0200
Committer: blerer 
Committed: Tue Oct 20 13:54:46 2015 +0200

--
 CHANGES.txt |  1 +
 pylib/cqlshlib/cql3handling.py  |  2 +-
 .../cql3/statements/ModificationStatement.java  | 24 ++--
 .../operations/InsertUpdateIfConditionTest.java | 12 +-
 4 files changed, 35 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9b3b1cb0/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 7358689..b17929c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.12
+ * Fix conditions on static columns (CASSANDRA-10264)
  * AssertionError: attempted to delete non-existing file CommitLog 
(CASSANDRA-10377)
  * Merge range tombstones during compaction (CASSANDRA-7953)
  * (cqlsh) Distinguish negative and positive infinity in output 
(CASSANDRA-10523)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9b3b1cb0/pylib/cqlshlib/cql3handling.py
--
diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py
index 5f93003..49970e4 100644
--- a/pylib/cqlshlib/cql3handling.py
+++ b/pylib/cqlshlib/cql3handling.py
@@ -143,7 +143,7 @@ JUNK ::= /([ 
\t\r\f\v]+|(--|[/][/])[^\n\r]*([\n\r]|$)|[/][*].*?[*][/])/ ;
  ::=  "*" ;
  ::=  ";" ;
  ::=/[-+=,().]/ ;
- ::=   /[<>]=?/ ;
+ ::=   /[<>!]=?/ ;
  ::=  /[][{}]/ ;
 
  ::= "-"?  ;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9b3b1cb0/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
--
diff --git 
a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java 
b/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
index 37b46ae..75a3b40 100644
--- a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java
@@ -29,7 +29,6 @@ import org.apache.cassandra.config.ColumnDefinition;
 import org.apache.cassandra.config.Schema;
 import org.apache.cassandra.cql3.*;
 import org.apache.cassandra.db.*;
-import org.apache.cassandra.db.composites.AbstractCellNameType;
 import org.apache.cassandra.db.composites.CBuilder;
 import org.apache.cassandra.db.composites.Composite;
 import org.apache.cassandra.db.filter.ColumnSlice;
@@ -339,7 +338,7 @@ public abstract class ModificationStatement implements 
CQLStatement
 //   UPDATE t SET s = 3 WHERE k = 0 AND v = 1
 //   DELETE v FROM t WHERE k = 0 AND v = 1
 // sounds like you don't really understand what your are doing.
-if (setsStaticColumns && !setsRegularColumns)
+if (appliesOnlyToStaticColumns())
 {
 // If we set no non-static columns, then it's fine not to have 
clustering columns
 if (hasNoClusteringColumns)
@@ -361,6 +360,27 @@ public abstract class ModificationStatement implements 
CQLStatement
 return createClusteringPrefixBuilderInternal(options);
 }
 
+/**
+ * Checks that the modification only apply to static columns.
+ * @return true if the modification only apply to static 
columns, false otherwise.
+ */
+private boolean appliesOnlyToStaticColumns()
+{
+return setsStaticColumns && !appliesToRegularColumns();
+}
+
+/**
+ * Checks that the modification apply to regular columns.
+ * @return true if the modification apply to regular columns, 
false otherwise.
+ */
+private boolean appliesToRegularColumns()
+{
+// If we have regular operations, this applies to regular columns.
+// Otherwise, if the statement is a DELETE and columnOperations is 
empty, this means we have no operations,
+// which for a DELETE means a full row deletion. Which means the 
operation applies to all columns and regular ones in particular.
+return setsRegularColumns || (type == StatementType.DELETE && 
columnOperations.isEmpty());
+}
+
 private Composite createClusteringPrefixBuilderInternal(QueryOption

[jira] [Updated] (CASSANDRA-10552) Pluggable IResources

2015-10-20 Thread Sam Tunnicliffe (JIRA)

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

Sam Tunnicliffe updated CASSANDRA-10552:

Fix Version/s: (was: 3.0.0)
   3.x

> Pluggable IResources
> 
>
> Key: CASSANDRA-10552
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10552
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Anthony Cozzie
>Assignee: Anthony Cozzie
> Fix For: 3.x
>
> Attachments: cassandra-3.0.0-10552.txt
>
>
> It is impossible to add new IResources because of the static method 
> Resources.fromName(), which creates IResources from the text values in the 
> authentication tables.  This patch replaces the static list of checks with a 
> hash table that can be extended.



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


[jira] [Commented] (CASSANDRA-10552) Pluggable IResources

2015-10-20 Thread Sam Tunnicliffe (JIRA)

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

Sam Tunnicliffe commented on CASSANDRA-10552:
-

I can see that making {{IResource}} a more accessible extension point might 
have benefits for integration. What this patch alone won't do is provide a 
means to manage permissions on custom resources via CQL. As it stands, the 
grammar only permits the existing implementations in {{GRANT}} and {{REVOKE}} 
statements. That could be extended to support something like {{GRANT ALL ON 
CUSTOM RESOURCE foos/foo1 TO }}, otherwise permissions will only be able 
to be granted/revoked programatically.

CQL syntax aside, there's also a bug in the patch. Because {{IResource}} 
implementations are lazily registered, attempting to create one from its 
representation in the system table will fail if the class hasn't already been 
loaded. A simple repro is to login as the default super user & create a 
keyspace, then restart C*, login again & run {{LIST ALL PERMISSIONS}}. The 
permissions representing data resources are ok as the class is referenced in 
the static initializer of {{ClientState}}, but {{FunctionResource}} hasn't been 
registered yet and so an {{IllegalArgumentException}} is thrown. For this to 
work, we'll need some means of discovering all of the available IResource 
implementations at startup and ensuring they're registered. While we're doing 
that, it could be worth adding a {{StartupCheck}} to ensure that if auth is 
enabled, there's a registered factory for every resource listed in 
{{system_auth.role_permissions}}, in case a jar containing a custom 
implementation is missing etc. The check could also verify that there are no 
conflicts on resource prefixes.

I'd also like to formalize the structure of resource names a little, to make 
the registration & factory stuff a little bit cleaner. Extracting the {{/}} 
separator out into a constant on {{IResource}} would let us split out the root 
element from a resource name & look up the factory for a given name directly, 
rather than iterating & checking {{startsWith}}. It would also enforce a bit 
more structure & consistency on custom implementations. It would also be good 
to add something to the class level javadoc for {{IResource}} which explains 
about registration & details the requirement for a static initializer etc I 
notice that that doc is already outdated as it asserts that {{DataResource}} is 
the only implementation, that's my bad so I'll update that on commit.

Lastly, it would be nice to get some test coverage for this. Aside from the 
discovery bug, most regressions should be covered by the existing dtests, but I 
think it'll be possible to add a unit test which exercises custom resource 
impls. This would be valuable not least because it would require providing 
custom resource impl, which may highlight assumptions we've previously made, 
particularly in the case of CQL syntax etc.

> Pluggable IResources
> 
>
> Key: CASSANDRA-10552
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10552
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Anthony Cozzie
>Assignee: Anthony Cozzie
> Fix For: 3.0.0
>
> Attachments: cassandra-3.0.0-10552.txt
>
>
> It is impossible to add new IResources because of the static method 
> Resources.fromName(), which creates IResources from the text values in the 
> authentication tables.  This patch replaces the static list of checks with a 
> hash table that can be extended.



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


[jira] [Commented] (CASSANDRA-7313) SecondaryIndex not deleting column definition

2015-10-20 Thread JIRA

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

Andrés de la Peña commented on CASSANDRA-7313:
--

[~beobal] no objections to close it, I had forgotten this, sorry for the 
inconvenience.

> SecondaryIndex not deleting column definition
> -
>
> Key: CASSANDRA-7313
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7313
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Andrés de la Peña
>Priority: Minor
>  Labels: 2i, columnDefinition, secondaryIndex
> Attachments: dSecondaryIndex-removeColumnDef.diff.txt
>
>
> The method _SecondaryIndex#removeColumnDef_ does not delete the requested 
> column definition. I think this may be due to the iterator's remove method:
> {code:java}
> void removeColumnDef(ByteBuffer name)
> {
> Iterator it = columnDefs.iterator();
> while (it.hasNext())
> {
> if (it.next().name.bytes.equals(name))
> it.remove();
> }
> }
> {code}
> For me it has been problematic when deleting a per row index in a column 
> family and then creating a new one.
> I attach a patch that may solve the problem.



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


[jira] [Updated] (CASSANDRA-10257) InvertedIndex trigger example has not been updated post 8099

2015-10-20 Thread Mike Adamson (JIRA)

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

Mike Adamson updated CASSANDRA-10257:
-
Attachment: (was: 10257.txt)

> InvertedIndex trigger example has not been updated post 8099
> 
>
> Key: CASSANDRA-10257
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10257
> Project: Cassandra
>  Issue Type: Bug
>  Components: Examples
>Reporter: Mike Adamson
>Assignee: Mike Adamson
>Priority: Minor
> Fix For: 3.0.x
>
> Attachments: 10257.txt
>
>
> The {{InvertedIndex}} example is still using pre-8099 code.



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


[jira] [Updated] (CASSANDRA-10257) InvertedIndex trigger example has not been updated post 8099

2015-10-20 Thread Mike Adamson (JIRA)

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

Mike Adamson updated CASSANDRA-10257:
-
Attachment: 10257.txt

> InvertedIndex trigger example has not been updated post 8099
> 
>
> Key: CASSANDRA-10257
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10257
> Project: Cassandra
>  Issue Type: Bug
>  Components: Examples
>Reporter: Mike Adamson
>Assignee: Mike Adamson
>Priority: Minor
> Fix For: 3.0.x
>
> Attachments: 10257.txt
>
>
> The {{InvertedIndex}} example is still using pre-8099 code.



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


[jira] [Updated] (CASSANDRA-10257) InvertedIndex trigger example has not been updated post 8099

2015-10-20 Thread Mike Adamson (JIRA)

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

Mike Adamson updated CASSANDRA-10257:
-
Attachment: 10257.txt

> InvertedIndex trigger example has not been updated post 8099
> 
>
> Key: CASSANDRA-10257
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10257
> Project: Cassandra
>  Issue Type: Bug
>  Components: Examples
>Reporter: Mike Adamson
>Assignee: Mike Adamson
>Priority: Minor
> Fix For: 3.0.x
>
> Attachments: 10257.txt
>
>
> The {{InvertedIndex}} example is still using pre-8099 code.



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


[jira] [Updated] (CASSANDRA-10257) InvertedIndex trigger example has not been updated post 8099

2015-10-20 Thread Mike Adamson (JIRA)

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

Mike Adamson updated CASSANDRA-10257:
-
Attachment: (was: 10257.text)

> InvertedIndex trigger example has not been updated post 8099
> 
>
> Key: CASSANDRA-10257
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10257
> Project: Cassandra
>  Issue Type: Bug
>  Components: Examples
>Reporter: Mike Adamson
>Assignee: Mike Adamson
>Priority: Minor
> Fix For: 3.0.x
>
>
> The {{InvertedIndex}} example is still using pre-8099 code.



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


[jira] [Updated] (CASSANDRA-10257) InvertedIndex trigger example has not been updated post 8099

2015-10-20 Thread Mike Adamson (JIRA)

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

Mike Adamson updated CASSANDRA-10257:
-
Attachment: 10257.text

> InvertedIndex trigger example has not been updated post 8099
> 
>
> Key: CASSANDRA-10257
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10257
> Project: Cassandra
>  Issue Type: Bug
>  Components: Examples
>Reporter: Mike Adamson
>Assignee: Mike Adamson
>Priority: Minor
> Fix For: 3.0.x
>
> Attachments: 10257.text
>
>
> The {{InvertedIndex}} example is still using pre-8099 code.



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


[jira] [Commented] (CASSANDRA-10381) NullPointerException in cqlsh paging through CF with static columns

2015-10-20 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-10381:
--

Alright, +1.

> NullPointerException in cqlsh paging through CF with static columns
> ---
>
> Key: CASSANDRA-10381
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10381
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Michael Keeney
>Assignee: Benjamin Lerer
>  Labels: cqlsh, nullpointerexception, range
> Fix For: 2.1.x, 2.2.x, 3.0.x
>
>
> When running select count( * ) from cqlsh with limit, the following NPE 
> occurs:
> select count( * ) from tbl1 limit 5 ; 
> {code}
> ERROR [SharedPool-Worker-4] 2015-09-16 14:49:43,480 QueryMessage.java:132 - 
> Unexpected error during query
> java.lang.NullPointerException: null
> at 
> org.apache.cassandra.service.pager.RangeSliceQueryPager.containsPreviousLast(RangeSliceQueryPager.java:99)
>  ~[cassandra-all-2.1.8.621.jar:2.1.8.621]
> at 
> org.apache.cassandra.service.pager.AbstractQueryPager.fetchPage(AbstractQueryPager.java:119)
>  ~[cassandra-all-2.1.8.621.jar:2.1.8.621]
> at 
> org.apache.cassandra.service.pager.RangeSliceQueryPager.fetchPage(RangeSliceQueryPager.java:37)
>  ~[cassandra-all-2.1.8.621.jar:2.1.8.621]
> at 
> org.apache.cassandra.cql3.statements.SelectStatement.pageCountQuery(SelectStatement.java:286)
>  ~[cassandra-all-2.1.8.621.jar:2.1.8.621]
> at 
> org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:230)
>  ~[cassandra-all-2.1.8.621.jar:2.1.8.621]
> at 
> org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:67)
>  ~[cassandra-all-2.1.8.621.jar:2.1.8.621]
> at 
> org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:238)
>  ~[cassandra-all-2.1.8.621.jar:2.1.8.621]
> at 
> com.datastax.bdp.cassandra.cql3.DseQueryHandler$StatementExecution.execute(DseQueryHandler.java:291)
>  ~[dse-4.7.2.jar:4.7.2]
> at 
> com.datastax.bdp.cassandra.cql3.DseQueryHandler$Operation.executeWithTiming(DseQueryHandler.java:223)
>  ~[dse-4.7.2.jar:4.7.2]
> at 
> com.datastax.bdp.cassandra.cql3.DseQueryHandler$Operation.executeWithAuditLogging(DseQueryHandler.java:259)
>  ~[dse-4.7.2.jar:4.7.2]
> at 
> com.datastax.bdp.cassandra.cql3.DseQueryHandler.process(DseQueryHandler.java:94)
>  ~[dse-4.7.2.jar:4.7.2]
> at 
> org.apache.cassandra.transport.messages.QueryMessage.execute(QueryMessage.java:119)
>  ~[cassandra-all-2.1.8.621.jar:2.1.8.621]
> at 
> org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:439)
>  [cassandra-all-2.1.8.621.jar:2.1.8.621]
> at 
> org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:335)
>  [cassandra-all-2.1.8.621.jar:2.1.8.621]
> at 
> io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
>  [netty-all-4.0.23.Final.jar:4.0.23.Final]
> at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
>  [netty-all-4.0.23.Final.jar:4.0.23.Final]
> at 
> io.netty.channel.AbstractChannelHandlerContext.access$700(AbstractChannelHandlerContext.java:32)
>  [netty-all-4.0.23.Final.jar:4.0.23.Final]
> at 
> io.netty.channel.AbstractChannelHandlerContext$8.run(AbstractChannelHandlerContext.java:324)
>  [netty-all-4.0.23.Final.jar:4.0.23.Final]
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) 
> [na:1.7.0_75]
> at 
> org.apache.cassandra.concurrent.AbstractTracingAwareExecutorService$FutureTask.run(AbstractTracingAwareExecutorService.java:164)
>  [cassandra-all-2.1.8.621.jar:2.1.8.621]
> at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:105) 
> [cassandra-all-2.1.8.621.jar:2.1.8.621]
> at java.lang.Thread.run(Thread.java:745) [na:1.7.0_75]
> {code}
> Table definition looks something like:
> {code}
> CREATE TABLE tbl1 (
> field1 bigint,
> field2 int,
> field3 timestamp,
> field4 map,
> field5 text static,
> field6 text static,
> field7 text static
> PRIMARY KEY (field1, field2, field3)
> ) WITH CLUSTERING ORDER BY (field2 ASC, field3 ASC)
> AND bloom_filter_fp_chance = 0.1
> AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
> AND comment = ''
> AND compaction = {'class': 
> 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'}
> AND compression = {'sstable_compression': 
> 'org.apache.cassandra.io.compress.LZ4Compressor'}
>...
> {code}
> Following appears in debug log leading up to the error:
> {code}
> DEBUG [SharedPool-Worker-1] 2015-09-17 15:32:06,484  
> AbstractQueryPager.java:95 - Fetched 101 live rows
> DEBUG [SharedPool-Worker-1] 2015-09-17 15:32:06,

[jira] [Commented] (CASSANDRA-10264) Unable to use conditions on static columns for DELETE

2015-10-20 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-10264:
--

That actually makes more sense to me :). +1 then.

> Unable to use conditions on static columns for DELETE
> -
>
> Key: CASSANDRA-10264
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10264
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
> Environment: Cassandra 2.2.0
>Reporter: DOAN DuyHai
>Assignee: Benjamin Lerer
> Attachments: 10264-2.1.txt, 10264-3.0.txt
>
>
> {noformat}
> cqlsh:test> create table static_table(id int, stat int static, ord int, val 
> text, primary key(id,ord));
> cqlsh:test> insert into static_table (id,stat,ord,val) VALUES ( 1, 1, 1, '1');
> cqlsh:test> delete from static_table where id=1 and ord=1 if stat != 1;
> Invalid syntax at line 1, char 55
>   delete from static_table where id=1 and ord=1 if stat != 1;
> ^
> {noformat}
> Same error if using =, <, <=, >= or > condition
> According to [~thobbs] the syntax should work. Plus, the error message is 
> wrong



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


[jira] [Commented] (CASSANDRA-10264) Unable to use conditions on static columns for DELETE

2015-10-20 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer commented on CASSANDRA-10264:


I new patch for 2.1 is 
[here|https://github.com/apache/cassandra/compare/trunk...blerer:10264-2.1] and 
the one for 
[3.0|https://github.com/apache/cassandra/compare/trunk...blerer:10264-3.0] is 
here.

I missunderstood how cqlsh validation was working. I tested the new fix and it 
works as well as auto-completion. 

> Unable to use conditions on static columns for DELETE
> -
>
> Key: CASSANDRA-10264
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10264
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
> Environment: Cassandra 2.2.0
>Reporter: DOAN DuyHai
>Assignee: Benjamin Lerer
> Attachments: 10264-2.1.txt, 10264-3.0.txt
>
>
> {noformat}
> cqlsh:test> create table static_table(id int, stat int static, ord int, val 
> text, primary key(id,ord));
> cqlsh:test> insert into static_table (id,stat,ord,val) VALUES ( 1, 1, 1, '1');
> cqlsh:test> delete from static_table where id=1 and ord=1 if stat != 1;
> Invalid syntax at line 1, char 55
>   delete from static_table where id=1 and ord=1 if stat != 1;
> ^
> {noformat}
> Same error if using =, <, <=, >= or > condition
> According to [~thobbs] the syntax should work. Plus, the error message is 
> wrong



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


[jira] [Commented] (CASSANDRA-10421) Potential issue with LogTransaction as it only checks in a single directory for files

2015-10-20 Thread Stefania (JIRA)

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

Stefania commented on CASSANDRA-10421:
--

We had another timeout problem, albeit in a different test. I think we need to 
take a look as these timeouts do not occur on 3.0. I'll post another update 
once I've had a chance to look at the logs.

> Potential issue with LogTransaction as it only checks in a single directory 
> for files
> -
>
> Key: CASSANDRA-10421
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10421
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Marcus Eriksson
>Assignee: Stefania
>Priority: Blocker
> Fix For: 3.0.0
>
>
> When creating a new LogTransaction we try to create the new logfile in the 
> same directory as the one we are writing to, but as we use 
> {{[directories.getDirectoryForNewSSTables()|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/lifecycle/LogTransaction.java#L125]}}
>  this might end up in "any" of the configured data directories. If it does, 
> we will not be able to clean up leftovers as we check for files in the same 
> directory as the logfile was created: 
> https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/lifecycle/LogRecord.java#L163
> cc [~Stefania]



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


[jira] [Commented] (CASSANDRA-9304) COPY TO improvements

2015-10-20 Thread Stefania (JIRA)

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

Stefania commented on CASSANDRA-9304:
-

[~thobbs] I've resumed this today, sorry for the delay. To retry in 
{{err_callback()}} when we get an {{OperationTimedOut}}, we either have to 
create a fresh new query being careful to avoid passing data for the pages that 
we already retrieved, or use the protected methods and properties of 
{{ReponseFuture}} to retry the current page, which is more efficient. Do you 
have any preferences? We should perhaps go with the second choice and log a 
driver enhancement request? Ideally the retry policy should cover 
{{OperationTimedOut}} as well, so we only have one path of execution?

> COPY TO improvements
> 
>
> Key: CASSANDRA-9304
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9304
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Jonathan Ellis
>Assignee: Stefania
>Priority: Minor
>  Labels: cqlsh
> Fix For: 3.x, 2.1.x, 2.2.x
>
>
> COPY FROM has gotten a lot of love.  COPY TO not so much.  One obvious 
> improvement could be to parallelize reading and writing (write one page of 
> data while fetching the next).



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


[jira] [Resolved] (CASSANDRA-4458) PerRowSecondaryIndex will call buildIndexAsync multiple times for the same index

2015-10-20 Thread Sam Tunnicliffe (JIRA)

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

Sam Tunnicliffe resolved CASSANDRA-4458.

Resolution: Not A Problem

The PerRowSecondaryIndex is removed from 3.0, with all indexes being associated 
with the table rather than a specific column.

> PerRowSecondaryIndex will call buildIndexAsync multiple times for the same 
> index
> 
>
> Key: CASSANDRA-4458
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4458
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Jonathan Ellis
>Assignee: Sam Tunnicliffe
>Priority: Minor
> Fix For: 3.x
>
>
> Mailing list thread: 
> http://www.mail-archive.com/dev@cassandra.apache.org/msg04624.html



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


[jira] [Commented] (CASSANDRA-10555) ReadCommandTest should truncate between test cases

2015-10-20 Thread Stefania (JIRA)

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

Stefania commented on CASSANDRA-10555:
--

CI looks good.

> ReadCommandTest should truncate between test cases 
> ---
>
> Key: CASSANDRA-10555
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10555
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tests
>Reporter: Jeff Jirsa
>Assignee: Jeff Jirsa
>Priority: Minor
>
> ReadCommandTest writes to the same CF in multiple unit tests, and then counts 
> the results in a partition. This can lead to tests failing in some 
> circumstances:
> {noformat}
> [junit] Testcase: 
> testSinglePartitionNamesAbort(org.apache.cassandra.db.ReadCommandTest): FAILED
> [junit] expected:<2> but was:<1>
> [junit] junit.framework.AssertionFailedError: expected:<2> but was:<1>
> [junit]   at 
> org.apache.cassandra.db.ReadCommandTest.testSinglePartitionNamesAbort(ReadCommandTest.java:140)
> [junit] 
> [junit] 
> [junit] Testcase: 
> testSinglePartitionSliceAbort(org.apache.cassandra.db.ReadCommandTest): FAILED
> [junit] expected:<2> but was:<3>
> [junit] junit.framework.AssertionFailedError: expected:<2> but was:<3>
> [junit]   at 
> org.apache.cassandra.db.ReadCommandTest.testSinglePartitionSliceAbort(ReadCommandTest.java:111)
> {noformat}
> This can be fixed trivially by truncating the CF at the beginning of 
> {{testSinglePartitionSliceAbort}} and {{testSinglePartitionNamesAbort}} 
> Also, once the truncate is in place, a potential typo is exposed in 
> {{testSinglePartitionNamesAbort}}, where the partition is written with 
> clustering column {{cc}} and {{cdd}}, but the read command reads {{cc}} and 
> {{dd}} 



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


  1   2   >