cassandra git commit: Remove duplicate offline compaction tracking

2016-02-15 Thread marcuse
Repository: cassandra
Updated Branches:
  refs/heads/trunk f7d6ac7e4 -> f9a1a80af


Remove duplicate offline compaction tracking

Patch by marcuse; reviewed by Stefania for CASSANDRA-11148


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

Branch: refs/heads/trunk
Commit: f9a1a80af181e568240bb8a005cd53af8de00648
Parents: f7d6ac7
Author: Marcus Eriksson 
Authored: Wed Feb 10 13:47:00 2016 +0100
Committer: Marcus Eriksson 
Committed: Tue Feb 16 07:22:40 2016 +0100

--
 CHANGES.txt |  1 +
 .../db/compaction/CompactionManager.java|  6 ++---
 .../cassandra/db/compaction/CompactionTask.java | 14 ++
 .../db/compaction/LeveledCompactionTask.java|  4 +--
 .../db/compaction/SSTableSplitter.java  |  4 +--
 .../cassandra/db/compaction/Scrubber.java   |  2 +-
 .../writers/CompactionAwareWriter.java  | 12 -
 .../writers/DefaultCompactionWriter.java| 12 ++---
 .../writers/MajorLeveledCompactionWriter.java   | 17 +---
 .../writers/MaxSSTableSizeWriter.java   | 18 ++---
 .../cassandra/io/sstable/SSTableRewriter.java   | 28 +---
 .../db/lifecycle/RealTransactionsTest.java  |  2 +-
 .../io/sstable/SSTableRewriterTest.java | 28 ++--
 13 files changed, 101 insertions(+), 47 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f9a1a80a/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index c337825..c3bfdc3 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.4
+ * Remove duplicate offline compaction tracking (CASSANDRA-11148)
  * fix EQ semantics of analyzed SASI indexes (CASSANDRA-11130)
  * Support long name output for nodetool commands (CASSANDRA-7950)
  * Encrypted hints (CASSANDRA-11040)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f9a1a80a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
--
diff --git a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java 
b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
index 9f7abf1..e9fa325 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
@@ -961,7 +961,7 @@ public class CompactionManager implements 
CompactionManagerMBean
 
 List finished;
 int nowInSec = FBUtilities.nowInSeconds();
-try (SSTableRewriter writer = new SSTableRewriter(txn, 
sstable.maxDataAge, false);
+try (SSTableRewriter writer = 
SSTableRewriter.constructKeepingOriginals(txn, false, sstable.maxDataAge);
  ISSTableScanner scanner = cleanupStrategy.getScanner(sstable, 
getRateLimiter());
  CompactionController controller = new CompactionController(cfs, 
txn.originals(), getDefaultGcBefore(cfs, nowInSec));
  CompactionIterator ci = new 
CompactionIterator(OperationType.CLEANUP, Collections.singletonList(scanner), 
controller, nowInSec, UUIDGen.getTimeUUID(), metrics))
@@ -1337,8 +1337,8 @@ public class CompactionManager implements 
CompactionManagerMBean
 int nowInSec = FBUtilities.nowInSeconds();
 
 CompactionStrategyManager strategy = 
cfs.getCompactionStrategyManager();
-try (SSTableRewriter repairedSSTableWriter = new 
SSTableRewriter(anticompactionGroup, groupMaxDataAge, false, false);
- SSTableRewriter unRepairedSSTableWriter = new 
SSTableRewriter(anticompactionGroup, groupMaxDataAge, false, false);
+try (SSTableRewriter repairedSSTableWriter = 
SSTableRewriter.constructWithoutEarlyOpening(anticompactionGroup, false, 
groupMaxDataAge);
+ SSTableRewriter unRepairedSSTableWriter = 
SSTableRewriter.constructWithoutEarlyOpening(anticompactionGroup, false, 
groupMaxDataAge);
  AbstractCompactionStrategy.ScannerList scanners = 
strategy.getScanners(anticompactionGroup.originals());
  CompactionController controller = new CompactionController(cfs, 
sstableAsSet, getDefaultGcBefore(cfs, nowInSec));
  CompactionIterator ci = new 
CompactionIterator(OperationType.ANTICOMPACTION, scanners.scanners, controller, 
nowInSec, UUIDGen.getTimeUUID(), metrics))

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f9a1a80a/src/java/org/apache/cassandra/db/compaction/CompactionTask.java
--
diff --git 

[jira] [Commented] (CASSANDRA-11171) conditional update without paxos

2016-02-15 Thread stuart (JIRA)

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

stuart commented on CASSANDRA-11171:


Sorry I should have elaborated a bit. I'm not by any means suggesting any form 
of performance improvement over paxos. Im developing a platform running on MS 
Project Orleans and so I have external means to control concurrency. (Infact 
I'm using cassandras lightweight transactions to guarantee single activation of 
actors). So having guarantees over actor isolation and single threaded 
execution already in place I'd like to be able to perform conditional updates 
for certain use cases. I do not have to worry about contention because I know 
these updates will be executed in a coordinated manner. Thererfore the 
atomicity of the conditional update operation currently provided by Cassandra, 
should not be required and I was wondering if there could be a means to turn it 
off? I'm not an expert in distributed programming so may well be missing 
something in my thinking here,

Thanks,
Stuart. 

> conditional update without paxos
> 
>
> Key: CASSANDRA-11171
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11171
> Project: Cassandra
>  Issue Type: Wish
>Reporter: stuart
>Priority: Minor
>
> I realise that currently conditional updates use lightweight transactions to 
> provide an atomic check and set operation but that this comes at a non 
> trivial performance cost. I have a solution where synchronised access is 
> ensured by an external mechanism therefore I don't think paxos would be 
> required. It would be nice to be able to run an update command or script that 
> could conditionally update without the performance hit. Currently I'd have to 
> retrieve each row first at the application level before deciding whether or 
> not to perform the update. Would it be possible to add a switch for the 
> conditional updates to turn paxos on or off? Thanks.



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


[jira] [Updated] (CASSANDRA-11158) AssertionError: null in Slice$Bound.create

2016-02-15 Thread Samu Kallio (JIRA)

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

Samu Kallio updated CASSANDRA-11158:

Fix Version/s: 3.0.x

> AssertionError: null in Slice$Bound.create
> --
>
> Key: CASSANDRA-11158
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11158
> Project: Cassandra
>  Issue Type: Bug
>  Components: Compaction, Local Write-Read Paths
>Reporter: Samu Kallio
> Fix For: 3.0.x
>
>
> We've been running Cassandra 3.0.2 for around a week now. Yesterday, we had a 
> network event that briefly isolated one node from others in a 3 node cluster. 
> Since then, we've been seeing a constant stream of "Finished hinted handoff" 
> messages, as well as:
> {noformat}
> WARN  16:34:39 Uncaught exception on thread 
> Thread[SharedPool-Worker-1,5,main]: {}
> java.lang.AssertionError: null
> at org.apache.cassandra.db.Slice$Bound.create(Slice.java:365) 
> ~[apache-cassandra-3.0.2.jar:3.0.2]
> at 
> org.apache.cassandra.db.Slice$Bound$Serializer.deserializeValues(Slice.java:553)
>  ~[apache-cassandra-3.0.2.jar:3.0.2]
> at 
> org.apache.cassandra.db.ClusteringPrefix$Serializer.deserialize(ClusteringPrefix.java:274)
>  ~[apache-cassandra-3.0.2.jar:3.0.2]
> at org.apache.cassandra.db.Serializers$2.deserialize(Serializers.java:115) 
> ~[apache-cassandra-3.0.2.jar:3.0.2]
> at org.apache.cassandra.db.Serializers$2.deserialize(Serializers.java:107) 
> ~[apache-cassandra-3.0.2.jar:3.0.2]
> at 
> org.apache.cassandra.io.sstable.IndexHelper$IndexInfo$Serializer.deserialize(IndexHelper.java:149)
>  ~[apache-cassandra-3.0.2.jar:3.0.2]
> at 
> org.apache.cassandra.db.RowIndexEntry$Serializer.deserialize(RowIndexEntry.java:218)
>  ~[apache-cassandra-3.0.2.jar:3.0.2]
> at 
> org.apache.cassandra.io.sstable.format.big.BigTableReader.getPosition(BigTableReader.java:216)
>  ~[apache-cassandra-3.0.2.jar:3.0.2]
> at 
> org.apache.cassandra.io.sstable.format.SSTableReader.getPosition(SSTableReader.java:1568)
>  ~[apache-cassandra-3.0.2.jar:3.0.2]
> at 
> org.apache.cassandra.db.columniterator.SSTableIterator.(SSTableIterator.java:36)
>  ~[apache-cassandra-3.0.2.jar:3.0.2]
> at 
> org.apache.cassandra.io.sstable.format.big.BigTableReader.iterator(BigTableReader.java:62)
>  ~[apache-cassandra-3.0.2.jar:3.0.2]
> at 
> org.apache.cassandra.db.SinglePartitionReadCommand.queryMemtableAndSSTablesInTimestampOrder(SinglePartitionReadCommand.java:715)
>  ~[apache-cassandra-3.0.2.jar:3.0.2]
> at 
> org.apache.cassandra.db.SinglePartitionReadCommand.queryMemtableAndDiskInternal(SinglePartitionReadCommand.java:482)
>  ~[apache-cassandra-3.0.2.jar:3.0.2]
> at 
> org.apache.cassandra.db.SinglePartitionReadCommand.queryMemtableAndDisk(SinglePartitionReadCommand.java:459)
>  ~[apache-cassandra-3.0.2.jar:3.0.2]
> at 
> org.apache.cassandra.db.SinglePartitionReadCommand.queryStorage(SinglePartitionReadCommand.java:325)
>  ~[apache-cassandra-3.0.2.jar:3.0.2]
> at org.apache.cassandra.db.ReadCommand.executeLocally(ReadCommand.java:350) 
> ~[apache-cassandra-3.0.2.jar:3.0.2]
> at 
> org.apache.cassandra.db.ReadCommandVerbHandler.doVerb(ReadCommandVerbHandler.java:45)
>  ~[apache-cassandra-3.0.2.jar:3.0.2]
> at 
> org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:67) 
> ~[apache-cassandra-3.0.2.jar:3.0.2]
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
> ~[na:1.8.0_72]
> at 
> org.apache.cassandra.concurrent.AbstractTracingAwareExecutorService$FutureTask.run(AbstractTracingAwareExecutorService.java:164)
>  ~[apache-cassandra-3.0.2.jar:3.0.2]
> at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:105) 
> [apache-cassandra-3.0.2.jar:3.0.2]
> at java.lang.Thread.run(Thread.java:745) [na:1.8.0_72]
> {noformat}
> and also
> {noformat}
> ERROR 06:10:11 Exception in thread Thread[CompactionExecutor:1,1,main]
> java.lang.AssertionError: null
> at org.apache.cassandra.db.Slice$Bound.create(Slice.java:365) 
> ~[apache-cassandra-3.0.3.jar:3.0.3]
> at 
> org.apache.cassandra.db.Slice$Bound$Serializer.deserializeValues(Slice.java:553)
>  ~[apache-cassandra-3.0.3.jar:3.0.3]
> at 
> org.apache.cassandra.db.ClusteringPrefix$Serializer.deserialize(ClusteringPrefix.java:274)
>  ~[apache-cassandra-3.0.3.jar:3.0.3]
> at org.apache.cassandra.db.Serializers$2.deserialize(Serializers.java:115) 
> ~[apache-cassandra-3.0.3.jar:3.0.3]
> at org.apache.cassandra.db.Serializers$2.deserialize(Serializers.java:107) 
> ~[apache-cassandra-3.0.3.jar:3.0.3]
> at 
> org.apache.cassandra.io.sstable.IndexHelper$IndexInfo$Serializer.deserialize(IndexHelper.java:149)
>  ~[apache-cassandra-3.0.3.jar:3.0.3]
> at 
> org.apache.cassandra.db.RowIndexEntry$Serializer.deserialize(RowIndexEntry.java:218)
>  ~[apache-cassandra-3.0.3.jar:3.0.3]
> at 
> 

[jira] [Commented] (CASSANDRA-10625) Problem of year 10000: Dates too far in the future can be saved but not read back using cqlsh

2016-02-15 Thread Paulo Motta (JIRA)

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

Paulo Motta commented on CASSANDRA-10625:
-

bq. How about a single warning, the first time it happens?

Sounds good! Will mark as ready to commit when CI is happy:

||3.0||trunk||
|[branch|https://github.com/apache/cassandra/compare/cassandra-3.0...pauloricardomg:3.0-10625]|[branch|https://github.com/apache/cassandra/compare/trunk...pauloricardomg:trunk-10625]|
|[testall|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-3.0-10625-testall/lastCompletedBuild/testReport/]|[testall|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-trunk-10625-testall/lastCompletedBuild/testReport/]|
|[dtest|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-3.0-10625-dtest/lastCompletedBuild/testReport/]|[dtest|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-trunk-10625-dtest/lastCompletedBuild/testReport/]|

committer: patch merges cleanly upwards.

> Problem of year 1: Dates too far in the future can be saved but not read 
> back using cqlsh
> -
>
> Key: CASSANDRA-10625
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10625
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Piotr Kołaczkowski
>Assignee: Adam Holmberg
>Priority: Minor
> Fix For: 3.0.x, 3.x
>
>
> {noformat}
> cqlsh> insert into test.timestamp_test (pkey, ts) VALUES (1, '-12-31 
> 23:59:59+');
> cqlsh> select * from test.timestamp_test ;
>  pkey | ts
> --+--
> 1 | -12-31 23:59:59+
> (1 rows)
> cqlsh> insert into test.timestamp_test (pkey, ts) VALUES (1, '1-01-01 
> 00:00:01+');
> cqlsh> select * from test.timestamp_test ;
> Traceback (most recent call last):
>   File "bin/../resources/cassandra/bin/cqlsh", line 1112, in 
> perform_simple_statement
> rows = self.session.execute(statement, trace=self.tracing_enabled)
>   File 
> "/home/pkolaczk/Projekty/DataStax/bdp/resources/cassandra/bin/../zipfiles/cassandra-driver-internal-only-2.7.2.zip/cassandra-driver-2.7.2/cassandra/cluster.py",
>  line 1602, in execute
> result = future.result()
>   File 
> "/home/pkolaczk/Projekty/DataStax/bdp/resources/cassandra/bin/../zipfiles/cassandra-driver-internal-only-2.7.2.zip/cassandra-driver-2.7.2/cassandra/cluster.py",
>  line 3347, in result
> raise self._final_exception
> OverflowError: date value out of range
> {noformat}
> The connection is broken afterwards:
> {noformat}
> cqlsh> insert into test.timestamp_test (pkey, ts) VALUES (1, '1-01-01 
> 00:00:01+');
> NoHostAvailable: ('Unable to complete the operation against any hosts', 
> {: ConnectionShutdown('Connection to 127.0.0.1 is 
> defunct',)})
> {noformat}
> Expected behaviors (one of):
> - don't allow to insert dates larger than -12-31 and document the 
> limitation
> - handle all dates up to Java Date(MAX_LONG) for writing and reading



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


[jira] [Comment Edited] (CASSANDRA-10070) Automatic repair scheduling

2016-02-15 Thread Paulo Motta (JIRA)

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

Paulo Motta edited comment on CASSANDRA-10070 at 2/15/16 8:07 PM:
--

Starting with a single repair per dc and adding support for parallel repair 
sessions later sounds like a good idea.

bq. I agree and we could probably store the parent repair session id in an 
extra column of the lock table and have a thread wake up periodically to see if 
there are repair sessions without locks. 

Do we intend to reuse the lock table for other maintenance tasks as well? If 
so, we must add a generic "holder" column to the lock table so we can reuse to 
identify resources other than the parent repair session in the future. We could 
also add an "attributes" map in the lock table to store additional attributes 
such as status, or have a separate table to maintain status to keep the lock 
table simple.

bq. But then we must somehow be able to differentiate user-defined and 
automatically scheduled repair sessions. It could be done by having all repairs 
go through this scheduling interface, which also would reduce user mistakes 
with multiple repairs in parallel. Another alternative is to have a custom flag 
in the parent repair that makes the garbage collector ignore it if it's 
user-defined. I think that the garbage collector/cancel repairs when unable to 
lock feature is something that should be included in the first pass.

Ideally all repairs would go through this interface, but this would probably 
add complexity at this stage. So we should probably just add a "lockResource" 
attribute to each repair session object, and each node would go through all 
repairs currently running checking if it still holds the lock in case the 
"lockResource" field is set.

bq. The most basic failure scenarios should be covered by retrying a repair if 
it fails and log a warning/error based on how many times it failed. Could the 
retry behaviour cause some unexpected consequences?

It would probably be safe to abort ongoing validation and stream background 
tasks and cleanup repair state on all involved nodes before starting a new 
repair session in the same ranges. This doesn't seem to be done currently. As 
far as I understood, if there are nodes A, B, C running repair, A is the 
coordinator. If validation or streaming fails on node B, the coordinator (A) is 
notified and fails the repair session, but node C will remain doing validation 
and/or streaming, what could cause problems (or increased load) if we start 
another repair session on the same range. 

We will probably need to extend the repair protocol to perform this 
cleanup/abort step on failure. We already have a legacy cleanup message that 
doesn't seem to be used in the current protocol that we could maybe reuse to 
cleanup repair state after a failure. This repair abortion will probably have 
intersection with CASSANDRA-3486. In any case, this is a separate (but related) 
issue and we should address it in an independent ticket, and make this ticket 
dependent on that.

Another unrelated option that we should probably include in the future is a 
timeout, and abort repair sessions running longer than that.


was (Author: pauloricardomg):
Starting with a single repair per dc and adding support for parallel repair 
sessions later sounds like a good idea.

bq. I agree and we could probably store the parent repair session id in an 
extra column of the lock table and have a thread wake up periodically to see if 
there are repair sessions without locks. 

Do we intend to reuse the lock table for other maintenance tasks as well? If 
so, we must add a generic "holder" column to the lock table so we can reuse to 
identify resources other than the parent repair session in the future. We could 
also add an "attributes" map in the lock table to store additional attributes 
such as status, or have a separate table to maintain status to keep the lock 
table simple.

bq. But then we must somehow be able to differentiate user-defined and 
automatically scheduled repair sessions. It could be done by having all repairs 
go through this scheduling interface, which also would reduce user mistakes 
with multiple repairs in parallel. Another alternative is to have a custom flag 
in the parent repair that makes the garbage collector ignore it if it's 
user-defined. I think that the garbage collector/cancel repairs when unable to 
lock feature is something that should be included in the first pass.

Ideally all repairs would go through this interface, but this would probably 
add complexity at this stage. So we should probably just add a "lockResource" 
attribute to each local repair session object (as opposed to only the parent 
repair object), and each node would go through all repairs currently running 
checking if it still holds the lock if the "lockResource" field is 

[jira] [Commented] (CASSANDRA-10070) Automatic repair scheduling

2016-02-15 Thread Paulo Motta (JIRA)

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

Paulo Motta commented on CASSANDRA-10070:
-

Starting with a single repair per dc and adding support for parallel repair 
sessions later sounds like a good idea.

bq. I agree and we could probably store the parent repair session id in an 
extra column of the lock table and have a thread wake up periodically to see if 
there are repair sessions without locks. 

Do we intend to reuse the lock table for other maintenance tasks as well? If 
so, we must add a generic "holder" column to the lock table so we can reuse to 
identify resources other than the parent repair session in the future. We could 
also add an "attributes" map in the lock table to store additional attributes 
such as status, or have a separate table to maintain status to keep the lock 
table simple.

bq. But then we must somehow be able to differentiate user-defined and 
automatically scheduled repair sessions. It could be done by having all repairs 
go through this scheduling interface, which also would reduce user mistakes 
with multiple repairs in parallel. Another alternative is to have a custom flag 
in the parent repair that makes the garbage collector ignore it if it's 
user-defined. I think that the garbage collector/cancel repairs when unable to 
lock feature is something that should be included in the first pass.

Ideally all repairs would go through this interface, but this would probably 
add complexity at this stage. So we should probably just add a "lockResource" 
attribute to each local repair session object (as opposed to only the parent 
repair object), and each node would go through all repairs currently running 
checking if it still holds the lock if the "lockResource" field is set.

bq. The most basic failure scenarios should be covered by retrying a repair if 
it fails and log a warning/error based on how many times it failed. Could the 
retry behaviour cause some unexpected consequences?

It would probably be safe to abort ongoing validation and stream background 
tasks and cleanup repair state on all involved nodes before starting a new 
repair session in the same ranges. This doesn't seem to be done currently. As 
far as I understood, if there are nodes A, B, C running repair, A is the 
coordinator. If validation or streaming fails on node B, the coordinator (A) is 
notified and fails the repair session, but node C will remain doing validation 
and/or streaming, what could cause problems (or increased load) if we start 
another repair session on the same range. 

We will probably need to extend the repair protocol to perform this 
cleanup/abort step on failure. We already have a legacy cleanup message that 
doesn't seem to be used in the current protocol that we could maybe reuse to 
cleanup repair state after a failure. This repair abortion will probably have 
intersection with CASSANDRA-3486. In any case, this is a separate (but related) 
issue and we should address it in an independent ticket, and make this ticket 
dependent on that.

Another unrelated option that we should probably include in the future is a 
timeout, and abort repair sessions running longer than that.

> Automatic repair scheduling
> ---
>
> Key: CASSANDRA-10070
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10070
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Marcus Olsson
>Assignee: Marcus Olsson
>Priority: Minor
> Fix For: 3.x
>
> Attachments: Distributed Repair Scheduling.doc
>
>
> Scheduling and running repairs in a Cassandra cluster is most often a 
> required task, but this can both be hard for new users and it also requires a 
> bit of manual configuration. There are good tools out there that can be used 
> to simplify things, but wouldn't this be a good feature to have inside of 
> Cassandra? To automatically schedule and run repairs, so that when you start 
> up your cluster it basically maintains itself in terms of normal 
> anti-entropy, with the possibility for manual configuration.



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


[jira] [Commented] (CASSANDRA-11171) conditional update without paxos

2016-02-15 Thread DOAN DuyHai (JIRA)

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

DOAN DuyHai commented on CASSANDRA-11171:
-

bq. I have a solution where synchronised access is ensured by an external 
mechanism therefore I don't think paxos would be required

Can you please elaborate about this *external mechanism* ? I'm curious to know 
how it works and how it would grant better perf than the current Paxos

> conditional update without paxos
> 
>
> Key: CASSANDRA-11171
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11171
> Project: Cassandra
>  Issue Type: Wish
>Reporter: stuart
>Priority: Minor
>
> I realise that currently conditional updates use lightweight transactions to 
> provide an atomic check and set operation but that this comes at a non 
> trivial performance cost. I have a solution where synchronised access is 
> ensured by an external mechanism therefore I don't think paxos would be 
> required. It would be nice to be able to run an update command or script that 
> could conditionally update without the performance hit. Currently I'd have to 
> retrieve each row first at the application level before deciding whether or 
> not to perform the update. Would it be possible to add a switch for the 
> conditional updates to turn paxos on or off? Thanks.



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


[jira] [Assigned] (CASSANDRA-11172) Infinite loop bug adding high-level SSTableReader in compaction

2016-02-15 Thread Marcus Eriksson (JIRA)

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

Marcus Eriksson reassigned CASSANDRA-11172:
---

Assignee: Marcus Eriksson

> Infinite loop bug adding high-level SSTableReader in compaction
> ---
>
> Key: CASSANDRA-11172
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11172
> Project: Cassandra
>  Issue Type: Bug
>  Components: Compaction
> Environment: DSE 4.x / Cassandra 2.1.11.969
>Reporter: Jeff Ferland
>Assignee: Marcus Eriksson
>
> Observed that after a large repair on LCS that sometimes the system will 
> enter an infinite loop with vast amounts of logs lines recording, "Adding 
> high-level (L${LEVEL}) SSTableReader(path='${TABLE}') to candidates"
> This results in an outage of the node and eventual crashing. The log spam 
> quickly rotates out possibly useful earlier debugging.



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


[jira] [Commented] (CASSANDRA-11172) Infinite loop bug adding high-level SSTableReader in compaction

2016-02-15 Thread Marcus Eriksson (JIRA)

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

Marcus Eriksson commented on CASSANDRA-11172:
-

could you post logs?

> Infinite loop bug adding high-level SSTableReader in compaction
> ---
>
> Key: CASSANDRA-11172
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11172
> Project: Cassandra
>  Issue Type: Bug
>  Components: Compaction
> Environment: DSE 4.x / Cassandra 2.1.11.969
>Reporter: Jeff Ferland
>
> Observed that after a large repair on LCS that sometimes the system will 
> enter an infinite loop with vast amounts of logs lines recording, "Adding 
> high-level (L${LEVEL}) SSTableReader(path='${TABLE}') to candidates"
> This results in an outage of the node and eventual crashing. The log spam 
> quickly rotates out possibly useful earlier debugging.



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


[jira] [Commented] (CASSANDRA-10397) Add local timezone support to cqlsh

2016-02-15 Thread Paulo Motta (JIRA)

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

Paulo Motta commented on CASSANDRA-10397:
-

bq. Looks like you missed the timezone constructor argument in trunk:

Fixed this and also included subsecond precision support (CASSANDRA-10428) on 
trunk version.

Tests look good now, marking as ready to commit:

Commit info:
- 2.2 patch is compatible with 3.0
- trunk patch is slightly modified due to conflicts
- trunk patch was built on top of CASSANDRA-11135 since it modifies the same 
test, so that needs to be committed first.

Thanks for the contribution [~spo...@gmail.com]!

> Add local timezone support to cqlsh
> ---
>
> Key: CASSANDRA-10397
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10397
> Project: Cassandra
>  Issue Type: Improvement
> Environment: Ubuntu 14.04 LTS
>Reporter: Suleman Rai
>Assignee: Stefan Podkowinski
>Priority: Minor
>  Labels: cqlsh
>
> CQLSH is not adding the timezone offset to the timestamp after it has been 
> inserted into a table.
> create table test(id int PRIMARY KEY, time timestamp);
> INSERT INTO test(id,time) values (1,dateof(now()));
> select *from test;
> id | time
> +-
>   1 | 2015-09-25 13:00:32
> It is just displaying the default UTC timestamp without adding the timezone 
> offset. It should be 2015-09-25 21:00:32 in my case as my timezone offset is 
> +0800.



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


[jira] [Created] (CASSANDRA-11172) Infinite loop bug adding high-level SSTableReader in compaction

2016-02-15 Thread Jeff Ferland (JIRA)
Jeff Ferland created CASSANDRA-11172:


 Summary: Infinite loop bug adding high-level SSTableReader in 
compaction
 Key: CASSANDRA-11172
 URL: https://issues.apache.org/jira/browse/CASSANDRA-11172
 Project: Cassandra
  Issue Type: Bug
  Components: Compaction
 Environment: DSE 4.x / Cassandra 2.1.11.969
Reporter: Jeff Ferland


Observed that after a large repair on LCS that sometimes the system will enter 
an infinite loop with vast amounts of logs lines recording, "Adding high-level 
(L${LEVEL}) SSTableReader(path='${TABLE}') to candidates"

This results in an outage of the node and eventual crashing. The log spam 
quickly rotates out possibly useful earlier debugging.



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


[jira] [Commented] (CASSANDRA-11135) test_timestamp_output in the cqlshlib tests is failing

2016-02-15 Thread Paulo Motta (JIRA)

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

Paulo Motta commented on CASSANDRA-11135:
-

Tested locally and works. No need to setup a cassci run. Marking as ready to 
commit! Thanks!

> test_timestamp_output in the cqlshlib tests is failing
> --
>
> Key: CASSANDRA-11135
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11135
> Project: Cassandra
>  Issue Type: Bug
>  Components: Testing
>Reporter: Stefania
>Assignee: Stefania
> Fix For: 3.x
>
>
> See here:
> http://cassci.datastax.com/view/trunk/job/trunk_cqlshlib/738/testReport/cqlshlib.test.test_cqlsh_output/TestCqlshOutput/test_timestamp_output/



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


[jira] [Commented] (CASSANDRA-11053) COPY FROM on large datasets: fix progress report and debug performance

2016-02-15 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-11053:


bq. I feel that we are reaching a point where our efforts could be better spent 
elsewhere due to diminishing returns.

+1, nice work!

> COPY FROM on large datasets: fix progress report and debug performance
> --
>
> Key: CASSANDRA-11053
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11053
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
>Reporter: Stefania
>Assignee: Stefania
> Fix For: 2.1.x, 2.2.x, 3.0.x, 3.x
>
> Attachments: copy_from_large_benchmark.txt, 
> copy_from_large_benchmark_2.txt, parent_profile.txt, parent_profile_2.txt, 
> worker_profiles.txt, worker_profiles_2.txt
>
>
> Running COPY from on a large dataset (20G divided in 20M records) revealed 
> two issues:
> * The progress report is incorrect, it is very slow until almost the end of 
> the test at which point it catches up extremely quickly.
> * The performance in rows per second is similar to running smaller tests with 
> a smaller cluster locally (approx 35,000 rows per second). As a comparison, 
> cassandra-stress manages 50,000 rows per second under the same set-up, 
> therefore resulting 1.5 times faster. 
> See attached file _copy_from_large_benchmark.txt_ for the benchmark details.



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


[jira] [Commented] (CASSANDRA-10070) Automatic repair scheduling

2016-02-15 Thread Marcus Olsson (JIRA)

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

Marcus Olsson commented on CASSANDRA-10070:
---

{quote}
All data centers involved in a repair must be available for a repair to 
start/succeed, so if we make the lock resource dc-aware and try to create the 
lock by contacting a node in each involved data center with LOCAL_SERIAL 
consistency that should be sufficient to ensure correctness without the need 
for a global lock. This will also play along well with both dc_parallelism 
global option and with the --local or --dcs table repair options.
{quote}

{quote}
The second alternative is probably the most desireable. Actually dc_parallelism 
by itself might cause problems, since we can have a situation where all repairs 
run in a single node or range, overloading those nodes. If we are to support 
concurrent repairs in the first pass, I think we need both dc_parallelism and 
node_parallelism options together.
{quote}

{quote}
This is becoming a bit complex and there probably are some edge cases and/or 
starvation scenarios so we should think carefully about before jumping into 
implementation. What do you think about this approach? Should we stick to a 
simpler non-parallel version in the first pass or think this through and 
already support parallelism in the first version?
{quote}

I like the approach with using local serial for each dc and having specialized 
keys. I think we could include the dc parallelism lock with 
"RepairResource-\{dc}-\{i}" but only allow one repair per data center by 
hardcoding "i" to 1 in the first pass. This should make the upgrades easier 
when we do allow parallel repairs. I like the node locks approach as well, but 
as you say there are probably some edge cases so we could wait with adding them 
until we allow parallel repairs and I don't think it would break the upgrades 
by introducing them later.

{quote}
We should also think better about possible failure scenarios and network 
partitions. What happens if the node cannot renew locks in a remote DC due to a 
temporary network partition but the repair is still running ? We should 
probably cancel a repair if not able to renew the lock and also have some kind 
of garbage collector to kill ongoing repair sessions without associated locks 
to protect from disrespecting the configured dc_parallelism and 
node_paralellism.
{quote}
I agree and we could probably store the parent repair session id in an extra 
column of the lock table and have a thread wake up periodically to see if there 
are repair sessions without locks. But then we must somehow be able to 
differentiate user-defined and automatically scheduled repair sessions. It 
could be done by having all repairs go through this scheduling interface, which 
also would reduce user mistakes with multiple repairs in parallel. Another 
alternative is to have a custom flag in the parent repair that makes the 
garbage collector ignore it if it's user-defined. I think that the garbage 
collector/cancel repairs when unable to lock feature is something that should 
be included in the first pass.

The most basic failure scenarios should be covered by retrying a repair if it 
fails and log a warning/error based on how many times it failed. Could the 
retry behaviour cause some unexpected consequences?

> Automatic repair scheduling
> ---
>
> Key: CASSANDRA-10070
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10070
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Marcus Olsson
>Assignee: Marcus Olsson
>Priority: Minor
> Fix For: 3.x
>
> Attachments: Distributed Repair Scheduling.doc
>
>
> Scheduling and running repairs in a Cassandra cluster is most often a 
> required task, but this can both be hard for new users and it also requires a 
> bit of manual configuration. There are good tools out there that can be used 
> to simplify things, but wouldn't this be a good feature to have inside of 
> Cassandra? To automatically schedule and run repairs, so that when you start 
> up your cluster it basically maintains itself in terms of normal 
> anti-entropy, with the possibility for manual configuration.



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


[jira] [Commented] (CASSANDRA-6588) Add a 'NO EMPTY RESULTS' filter to SELECT

2016-02-15 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-6588:
-

bq.  I just wish this was addressed in 2.1 or maybe even 2.2

I understand, but unfortunately the change required rely heavily on 
CASSANDRA-8099 and doing the same in 2.x is not really reasonable.

> Add a 'NO EMPTY RESULTS' filter to SELECT
> -
>
> Key: CASSANDRA-6588
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6588
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Sylvain Lebresne
>Priority: Minor
>
> It is the semantic of CQL that a (CQL) row exists as long as it has one 
> non-null column (including the PK columns, which, given that no PK columns 
> can be null, means that it's enough to have the PK set for a row to exist). 
> This does means that the result to
> {noformat}
> CREATE TABLE test (k int PRIMARY KEY, v1 int, v2 int);
> INSERT INTO test(k, v1) VALUES (0, 4);
> SELECT v2 FROM test;
> {noformat}
> must be (and is)
> {noformat}
>  v2
> --
>  null
> {noformat}
> That fact does mean however that when we only select a few columns of a row, 
> we still need to find out rows that exist but have no values for the selected 
> columns. Long story short, given how the storage engine works, this means we 
> need to query full (CQL) rows even when only some of the columns are selected 
> because that's the only way to distinguish between "the row exists but have 
> no value for the selected columns" and "the row doesn't exist". I'll note in 
> particular that, due to CASSANDRA-5762, we can't unfortunately rely on the 
> row marker to optimize that out.
> Now, when you selects only a subsets of the columns of a row, there is many 
> cases where you don't care about rows that exists but have no value for the 
> columns you requested and are happy to filter those out. So, for those cases, 
> we could provided a new SELECT filter. Outside the potential convenience (not 
> having to filter empty results client side), one interesting part is that 
> when this filter is provided, we could optimize a bit by only querying the 
> columns selected, since we wouldn't need to return rows that exists but have 
> no values for the selected columns.
> For the exact syntax, there is probably a bunch of options. For instance:
> * {{SELECT NON EMPTY(v2, v3) FROM test}}: the vague rational for putting it 
> in the SELECT part is that such filter is kind of in the spirit to DISTINCT.  
> Possibly a bit ugly outside of that.
> * {{SELECT v2, v3 FROM test NO EMPTY RESULTS}} or {{SELECT v2, v3 FROM test 
> NO EMPTY ROWS}} or {{SELECT v2, v3 FROM test NO EMPTY}}: the last one is 
> shorter but maybe a bit less explicit. As for {{RESULTS}} versus {{ROWS}}, 
> the only small object to {{NO EMPTY ROWS}} could be that it might suggest it 
> is filtering non existing rows (I mean, the fact we never ever return non 
> existing rows should hint that it's not what it does but well...) while we're 
> just filtering empty "resultSet rows".
> Of course, if there is a pre-existing SQL syntax for that, it's even better, 
> though a very quick search didn't turn anything. Other suggestions welcome 
> too.



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


[jira] [Commented] (CASSANDRA-6588) Add a 'NO EMPTY RESULTS' filter to SELECT

2016-02-15 Thread Gianluca Borello (JIRA)

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

Gianluca Borello commented on CASSANDRA-6588:
-

Thanks for the comment. As you predicted, this makes a night and day difference.

Running my benchmark script (the one I explained in the mailing list thread) on 
3.3 gives:

Response time for querying a single column on a large table (column size 10 MB):
10 columns: 236 ms
20 columns: 684 ms
30 columns: 1096 ms
40 columns: 1219 ms
50 columns: 1809 ms
... (heap failure after this)

Running it on the latest trunk as of today:

Response time for querying a single column on a large table (column size 10 MB):
10 columns: 52 ms
20 columns: 59 ms
30 columns: 72 ms
40 columns: 100 ms
50 columns: 109 ms
60 columns: 134 ms
70 columns: 155 ms
80 columns: 165 ms
90 columns: 178 ms
100 columns: 199 ms

That's absolutely perfect, I just wish this was addressed in 2.1 or maybe even 
2.2, moving my production environment to 3.4 is way too scary.


> Add a 'NO EMPTY RESULTS' filter to SELECT
> -
>
> Key: CASSANDRA-6588
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6588
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Sylvain Lebresne
>Priority: Minor
>
> It is the semantic of CQL that a (CQL) row exists as long as it has one 
> non-null column (including the PK columns, which, given that no PK columns 
> can be null, means that it's enough to have the PK set for a row to exist). 
> This does means that the result to
> {noformat}
> CREATE TABLE test (k int PRIMARY KEY, v1 int, v2 int);
> INSERT INTO test(k, v1) VALUES (0, 4);
> SELECT v2 FROM test;
> {noformat}
> must be (and is)
> {noformat}
>  v2
> --
>  null
> {noformat}
> That fact does mean however that when we only select a few columns of a row, 
> we still need to find out rows that exist but have no values for the selected 
> columns. Long story short, given how the storage engine works, this means we 
> need to query full (CQL) rows even when only some of the columns are selected 
> because that's the only way to distinguish between "the row exists but have 
> no value for the selected columns" and "the row doesn't exist". I'll note in 
> particular that, due to CASSANDRA-5762, we can't unfortunately rely on the 
> row marker to optimize that out.
> Now, when you selects only a subsets of the columns of a row, there is many 
> cases where you don't care about rows that exists but have no value for the 
> columns you requested and are happy to filter those out. So, for those cases, 
> we could provided a new SELECT filter. Outside the potential convenience (not 
> having to filter empty results client side), one interesting part is that 
> when this filter is provided, we could optimize a bit by only querying the 
> columns selected, since we wouldn't need to return rows that exists but have 
> no values for the selected columns.
> For the exact syntax, there is probably a bunch of options. For instance:
> * {{SELECT NON EMPTY(v2, v3) FROM test}}: the vague rational for putting it 
> in the SELECT part is that such filter is kind of in the spirit to DISTINCT.  
> Possibly a bit ugly outside of that.
> * {{SELECT v2, v3 FROM test NO EMPTY RESULTS}} or {{SELECT v2, v3 FROM test 
> NO EMPTY ROWS}} or {{SELECT v2, v3 FROM test NO EMPTY}}: the last one is 
> shorter but maybe a bit less explicit. As for {{RESULTS}} versus {{ROWS}}, 
> the only small object to {{NO EMPTY ROWS}} could be that it might suggest it 
> is filtering non existing rows (I mean, the fact we never ever return non 
> existing rows should hint that it's not what it does but well...) while we're 
> just filtering empty "resultSet rows".
> Of course, if there is a pre-existing SQL syntax for that, it's even better, 
> though a very quick search didn't turn anything. Other suggestions welcome 
> too.



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


[jira] [Updated] (CASSANDRA-10715) Allow filtering on NULL

2016-02-15 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer updated CASSANDRA-10715:
---
 Priority: Minor  (was: Major)
Fix Version/s: 3.x
   3.0.x
   Issue Type: Improvement  (was: Bug)
  Summary: Allow filtering on NULL  (was: Filtering on NULL returns 
ReadFailure exception)

I updated the title to reflect the new goal of the ticket

> Allow filtering on NULL
> ---
>
> Key: CASSANDRA-10715
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10715
> Project: Cassandra
>  Issue Type: Improvement
>  Components: CQL
> Environment: C* 3.0.0 | cqlsh | C# driver 3.0.0beta2 | Windows 2012 R2
>Reporter: Kishan Karunaratne
>Assignee: Benjamin Lerer
>Priority: Minor
> Fix For: 3.0.x, 3.x
>
> Attachments: 
> 0001-Allow-null-values-in-filtered-searches-reuse-Operato.patch
>
>
> This is an issue I first noticed through the C# driver, but I was able to 
> repro on cqlsh, leading me to believe this is a Cassandra bug.
> Given the following schema:
> {noformat}
> CREATE TABLE "TestKeySpace_4928dc892922"."coolMovies" (
> unique_movie_title text,
> movie_maker text,
> director text,
> list list,
> "mainGuy" text,
> "yearMade" int,
> PRIMARY KEY ((unique_movie_title, movie_maker), director)
> ) WITH CLUSTERING ORDER BY (director ASC)
> {noformat}
> Executing a SELECT with FILTERING on a non-PK column, using a NULL as the 
> argument:
> {noformat}
> SELECT "mainGuy", "movie_maker", "unique_movie_title", "list", "director", 
> "yearMade" FROM "coolMovies" WHERE "mainGuy" = null ALLOW FILTERING
> {noformat}
> returns a ReadFailure exception:
> {noformat}
> cqlsh:TestKeySpace_4c8f2cf8d5cc> SELECT "mainGuy", "movie_maker", 
> "unique_movie_title", "list", "director", "yearMade" FROM "coolMovies" WHERE 
> "mainGuy" = null ALLOW FILTERING;
> ←[0;1;31mTraceback (most recent call last):
>   File "C:\Users\Kishan\.ccm\repository\3.0.0\bin\\cqlsh.py", line 1216, in 
> perform_simple_statement
> result = future.result()
>   File 
> "C:\Users\Kishan\.ccm\repository\3.0.0\bin\..\lib\cassandra-driver-internal-only-3.0.0a3.post0-3f15725.zip\cassandra-driver-3.0.0a3.post0-3f15725\cassandra\cluster.py",
>  line 3118, in result
> raise self._final_exception
> ReadFailure: code=1300 [Replica(s) failed to execute read] message="Operation 
> failed - received 0 responses and 1 failures" info={'failures': 1, 
> 'received_responses': 0, 'required_responses': 1, 'cons
> istency': 'ONE'}
> ←[0m
> {noformat}
> Cassandra log shows:
> {noformat}
> WARN  [SharedPool-Worker-2] 2015-11-16 13:51:00,259 
> AbstractTracingAwareExecutorService.java:169 - Uncaught exception on thread 
> Thread[SharedPool-Worker-2,10,main]: {}
> java.lang.AssertionError: null
>   at 
> org.apache.cassandra.db.filter.RowFilter$SimpleExpression.isSatisfiedBy(RowFilter.java:581)
>  ~[apache-cassandra-3.0.0.jar:3.0.0]
>   at 
> org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToRow(RowFilter.java:243)
>  ~[apache-cassandra-3.0.0.jar:3.0.0]
>   at 
> org.apache.cassandra.db.transform.BaseRows.applyOne(BaseRows.java:95) 
> ~[apache-cassandra-3.0.0.jar:3.0.0]
>   at org.apache.cassandra.db.transform.BaseRows.add(BaseRows.java:86) 
> ~[apache-cassandra-3.0.0.jar:3.0.0]
>   at 
> org.apache.cassandra.db.transform.UnfilteredRows.add(UnfilteredRows.java:21) 
> ~[apache-cassandra-3.0.0.jar:3.0.0]
>   at 
> org.apache.cassandra.db.transform.Transformation.add(Transformation.java:136) 
> ~[apache-cassandra-3.0.0.jar:3.0.0]
>   at 
> org.apache.cassandra.db.transform.Transformation.apply(Transformation.java:102)
>  ~[apache-cassandra-3.0.0.jar:3.0.0]
>   at 
> org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:233)
>  ~[apache-cassandra-3.0.0.jar:3.0.0]
>   at 
> org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:227)
>  ~[apache-cassandra-3.0.0.jar:3.0.0]
>   at 
> org.apache.cassandra.db.transform.BasePartitions.hasNext(BasePartitions.java:76)
>  ~[apache-cassandra-3.0.0.jar:3.0.0]
>   at 
> org.apache.cassandra.db.partitions.UnfilteredPartitionIterators$Serializer.serialize(UnfilteredPartitionIterators.java:293)
>  ~[apache-cassandra-3.0.0.jar:3.0.0]
>   at 
> org.apache.cassandra.db.ReadResponse$LocalDataResponse.build(ReadResponse.java:136)
>  ~[apache-cassandra-3.0.0.jar:3.0.0]
>   at 
> org.apache.cassandra.db.ReadResponse$LocalDataResponse.(ReadResponse.java:128)
>  ~[apache-cassandra-3.0.0.jar:3.0.0]
>   at 
> org.apache.cassandra.db.ReadResponse$LocalDataResponse.(ReadResponse.java:123)
>  ~[apache-cassandra-3.0.0.jar:3.0.0]
>   at 
> 

[jira] [Commented] (CASSANDRA-10715) Filtering on NULL returns ReadFailure exception

2016-02-15 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer commented on CASSANDRA-10715:


CASSANDRA-6377 will allow filtering for non index queries but will not allow 
filtering on {{NULL}}.
It makes sense to support filtering on null value as C* already support it for 
conditions.

In SQL, it is not possible to test for {{NULL}} values with comparison 
operators, such as =, <, or <>. For testing {{NULL}} values the {{IS NULL}} and 
{{IS NOT NULL}} operators must be used instead.  

In MVs definitions, C* already support the {{IS NOT NULL}} operator. In 
conditions, {{=}} and {{!=}} operators are supported with {{NULL}}. This 
difference in syntax is a bit confusing. Ideally, the {{IS NULL}} operator 
should be equivalent to = {{NULL}} and {{IS NOT NULL}} should be equivalent to 
!= {{NULL}}.

> Filtering on NULL returns ReadFailure exception
> ---
>
> Key: CASSANDRA-10715
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10715
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
> Environment: C* 3.0.0 | cqlsh | C# driver 3.0.0beta2 | Windows 2012 R2
>Reporter: Kishan Karunaratne
>Assignee: Benjamin Lerer
> Attachments: 
> 0001-Allow-null-values-in-filtered-searches-reuse-Operato.patch
>
>
> This is an issue I first noticed through the C# driver, but I was able to 
> repro on cqlsh, leading me to believe this is a Cassandra bug.
> Given the following schema:
> {noformat}
> CREATE TABLE "TestKeySpace_4928dc892922"."coolMovies" (
> unique_movie_title text,
> movie_maker text,
> director text,
> list list,
> "mainGuy" text,
> "yearMade" int,
> PRIMARY KEY ((unique_movie_title, movie_maker), director)
> ) WITH CLUSTERING ORDER BY (director ASC)
> {noformat}
> Executing a SELECT with FILTERING on a non-PK column, using a NULL as the 
> argument:
> {noformat}
> SELECT "mainGuy", "movie_maker", "unique_movie_title", "list", "director", 
> "yearMade" FROM "coolMovies" WHERE "mainGuy" = null ALLOW FILTERING
> {noformat}
> returns a ReadFailure exception:
> {noformat}
> cqlsh:TestKeySpace_4c8f2cf8d5cc> SELECT "mainGuy", "movie_maker", 
> "unique_movie_title", "list", "director", "yearMade" FROM "coolMovies" WHERE 
> "mainGuy" = null ALLOW FILTERING;
> ←[0;1;31mTraceback (most recent call last):
>   File "C:\Users\Kishan\.ccm\repository\3.0.0\bin\\cqlsh.py", line 1216, in 
> perform_simple_statement
> result = future.result()
>   File 
> "C:\Users\Kishan\.ccm\repository\3.0.0\bin\..\lib\cassandra-driver-internal-only-3.0.0a3.post0-3f15725.zip\cassandra-driver-3.0.0a3.post0-3f15725\cassandra\cluster.py",
>  line 3118, in result
> raise self._final_exception
> ReadFailure: code=1300 [Replica(s) failed to execute read] message="Operation 
> failed - received 0 responses and 1 failures" info={'failures': 1, 
> 'received_responses': 0, 'required_responses': 1, 'cons
> istency': 'ONE'}
> ←[0m
> {noformat}
> Cassandra log shows:
> {noformat}
> WARN  [SharedPool-Worker-2] 2015-11-16 13:51:00,259 
> AbstractTracingAwareExecutorService.java:169 - Uncaught exception on thread 
> Thread[SharedPool-Worker-2,10,main]: {}
> java.lang.AssertionError: null
>   at 
> org.apache.cassandra.db.filter.RowFilter$SimpleExpression.isSatisfiedBy(RowFilter.java:581)
>  ~[apache-cassandra-3.0.0.jar:3.0.0]
>   at 
> org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToRow(RowFilter.java:243)
>  ~[apache-cassandra-3.0.0.jar:3.0.0]
>   at 
> org.apache.cassandra.db.transform.BaseRows.applyOne(BaseRows.java:95) 
> ~[apache-cassandra-3.0.0.jar:3.0.0]
>   at org.apache.cassandra.db.transform.BaseRows.add(BaseRows.java:86) 
> ~[apache-cassandra-3.0.0.jar:3.0.0]
>   at 
> org.apache.cassandra.db.transform.UnfilteredRows.add(UnfilteredRows.java:21) 
> ~[apache-cassandra-3.0.0.jar:3.0.0]
>   at 
> org.apache.cassandra.db.transform.Transformation.add(Transformation.java:136) 
> ~[apache-cassandra-3.0.0.jar:3.0.0]
>   at 
> org.apache.cassandra.db.transform.Transformation.apply(Transformation.java:102)
>  ~[apache-cassandra-3.0.0.jar:3.0.0]
>   at 
> org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:233)
>  ~[apache-cassandra-3.0.0.jar:3.0.0]
>   at 
> org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:227)
>  ~[apache-cassandra-3.0.0.jar:3.0.0]
>   at 
> org.apache.cassandra.db.transform.BasePartitions.hasNext(BasePartitions.java:76)
>  ~[apache-cassandra-3.0.0.jar:3.0.0]
>   at 
> org.apache.cassandra.db.partitions.UnfilteredPartitionIterators$Serializer.serialize(UnfilteredPartitionIterators.java:293)
>  

[jira] [Commented] (CASSANDRA-11043) Secondary indexes doesn't properly validate custom expressions

2016-02-15 Thread JIRA

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

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

Ok, I'm sorry, I didn't realize. I´ll keep it in mind in the future. Thanks for 
your help.

> Secondary indexes doesn't properly validate custom expressions
> --
>
> Key: CASSANDRA-11043
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11043
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL, Local Write-Read Paths
>Reporter: Andrés de la Peña
>Assignee: Sam Tunnicliffe
>  Labels: 2i, index, validation
> Fix For: 3.0.4, 3.4
>
> Attachments: test-index.zip
>
>
> It seems that 
> [CASSANDRA-7575|https://issues.apache.org/jira/browse/CASSANDRA-7575] is 
> broken in Cassandra 3.x. As stated in the secondary indexes' API 
> documentation, custom index implementations should perform any validation of 
> query expressions at {{Index#searcherFor(ReadCommand)}}, throwing an 
> {{InvalidRequestException}} if the expressions are not valid. I assume these 
> validation errors should produce an {{InvalidRequest}} error on cqlsh, or 
> raise an {{InvalidQueryException}} on Java driver. However, when 
> {{Index#searcherFor(ReadCommand)}} throws its {{InvalidRequestException}}, I 
> get this cqlsh output:
> {noformat}
> Traceback (most recent call last):
>   File "bin/cqlsh.py", line 1246, in perform_simple_statement
> result = future.result()
>   File 
> "/Users/adelapena/stratio/platform/src/cassandra-3.2.1/bin/../lib/cassandra-driver-internal-only-3.0.0-6af642d.zip/cassandra-driver-3.0.0-6af642d/cassandra/cluster.py",
>  line 3122, in result
> raise self._final_exception
> ReadFailure: code=1300 [Replica(s) failed to execute read] message="Operation 
> failed - received 0 responses and 1 failures" info={'failures': 1, 
> 'received_responses': 0, 'required_responses': 1, 'consistency': 'ONE'}
> {noformat}
> I attach a dummy index implementation to reproduce the error:
> {noformat}
> CREATE KEYSPACE test with replication = {'class' : 'SimpleStrategy', 
> 'replication_factor' : '1' }; 
> CREATE TABLE test.test (id int PRIMARY KEY, value varchar); 
> CREATE CUSTOM INDEX test_index ON test.test() USING 'com.stratio.TestIndex'; 
> SELECT * FROM test.test WHERE expr(test_index,'ok');
> SELECT * FROM test.test WHERE expr(test_index,'error');
> {noformat}
> This is specially problematic when using Cassandra Java Driver, because one 
> of these server exceptions can produce subsequent queries fail (even if they 
> are valid) with a no host available exception.
> Maybe the validation method added with 
> [CASSANDRA-7575|https://issues.apache.org/jira/browse/CASSANDRA-7575] should 
> be restored, unless there is a way to properly manage the exception.



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


[jira] [Updated] (CASSANDRA-11043) Secondary indexes doesn't properly validate custom expressions

2016-02-15 Thread Sam Tunnicliffe (JIRA)

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

Sam Tunnicliffe updated CASSANDRA-11043:

Fix Version/s: (was: 3.0.x)
   (was: 3.x)
   3.4
   3.0.4

thanks, committed to 3.0 in {{9cfbc31bc29685bd60355a823e0cf261a89858f0}} and 
merged to trunk.

[~adelapena] just for future reference, the "Resolved" status is for when the 
fix has actually been committed. Where the reviewer isn't a committer, the 
"Ready to Commit" status is what you want. 


> Secondary indexes doesn't properly validate custom expressions
> --
>
> Key: CASSANDRA-11043
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11043
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL, Local Write-Read Paths
>Reporter: Andrés de la Peña
>Assignee: Sam Tunnicliffe
>  Labels: 2i, index, validation
> Fix For: 3.0.4, 3.4
>
> Attachments: test-index.zip
>
>
> It seems that 
> [CASSANDRA-7575|https://issues.apache.org/jira/browse/CASSANDRA-7575] is 
> broken in Cassandra 3.x. As stated in the secondary indexes' API 
> documentation, custom index implementations should perform any validation of 
> query expressions at {{Index#searcherFor(ReadCommand)}}, throwing an 
> {{InvalidRequestException}} if the expressions are not valid. I assume these 
> validation errors should produce an {{InvalidRequest}} error on cqlsh, or 
> raise an {{InvalidQueryException}} on Java driver. However, when 
> {{Index#searcherFor(ReadCommand)}} throws its {{InvalidRequestException}}, I 
> get this cqlsh output:
> {noformat}
> Traceback (most recent call last):
>   File "bin/cqlsh.py", line 1246, in perform_simple_statement
> result = future.result()
>   File 
> "/Users/adelapena/stratio/platform/src/cassandra-3.2.1/bin/../lib/cassandra-driver-internal-only-3.0.0-6af642d.zip/cassandra-driver-3.0.0-6af642d/cassandra/cluster.py",
>  line 3122, in result
> raise self._final_exception
> ReadFailure: code=1300 [Replica(s) failed to execute read] message="Operation 
> failed - received 0 responses and 1 failures" info={'failures': 1, 
> 'received_responses': 0, 'required_responses': 1, 'consistency': 'ONE'}
> {noformat}
> I attach a dummy index implementation to reproduce the error:
> {noformat}
> CREATE KEYSPACE test with replication = {'class' : 'SimpleStrategy', 
> 'replication_factor' : '1' }; 
> CREATE TABLE test.test (id int PRIMARY KEY, value varchar); 
> CREATE CUSTOM INDEX test_index ON test.test() USING 'com.stratio.TestIndex'; 
> SELECT * FROM test.test WHERE expr(test_index,'ok');
> SELECT * FROM test.test WHERE expr(test_index,'error');
> {noformat}
> This is specially problematic when using Cassandra Java Driver, because one 
> of these server exceptions can produce subsequent queries fail (even if they 
> are valid) with a no host available exception.
> Maybe the validation method added with 
> [CASSANDRA-7575|https://issues.apache.org/jira/browse/CASSANDRA-7575] should 
> be restored, unless there is a way to properly manage the exception.



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


[1/3] cassandra git commit: Add query time validation method on Index

2016-02-15 Thread samt
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.0 ac7e2793d -> 9cfbc31bc
  refs/heads/trunk 72cb851e5 -> f7d6ac7e4


Add query time validation method on Index

Patch by Sam Tunnicliffe; reviewed by Andrés de la Peña for
CASSANDRA-11043


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

Branch: refs/heads/cassandra-3.0
Commit: 9cfbc31bc29685bd60355a823e0cf261a89858f0
Parents: ac7e279
Author: Sam Tunnicliffe 
Authored: Mon Feb 8 15:22:41 2016 +
Committer: Sam Tunnicliffe 
Committed: Mon Feb 15 13:08:00 2016 +

--
 CHANGES.txt |  1 +
 .../cql3/statements/SelectStatement.java| 22 +-
 .../org/apache/cassandra/db/ReadCommand.java| 13 
 src/java/org/apache/cassandra/index/Index.java  | 24 --
 .../service/pager/RangeSliceQueryPager.java |  8 +-
 .../cassandra/thrift/CassandraServer.java   |  8 ++
 .../org/apache/cassandra/cql3/CQLTester.java| 32 +---
 .../apache/cassandra/index/CustomIndexTest.java | 82 +---
 8 files changed, 144 insertions(+), 46 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9cfbc31b/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index a7669bb..52fc3ab 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.4
+ * Add query time validation method on Index (CASSANDRA-11043)
  * Avoid potential AssertionError in mixed version cluster (CASSANDRA-11128)
  * Properly handle hinted handoff after topology changes (CASSANDRA-5902)
  * AssertionError when listing sstable files on inconsistent disk state 
(CASSANDRA-11156)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9cfbc31b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
--
diff --git a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java 
b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
index e84ab28..931813a 100644
--- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
@@ -46,6 +46,7 @@ import org.apache.cassandra.db.rows.RowIterator;
 import org.apache.cassandra.db.view.View;
 import org.apache.cassandra.dht.AbstractBounds;
 import org.apache.cassandra.exceptions.*;
+import org.apache.cassandra.index.Index;
 import org.apache.cassandra.index.SecondaryIndexManager;
 import org.apache.cassandra.serializers.MarshalException;
 import org.apache.cassandra.service.ClientState;
@@ -490,9 +491,24 @@ public class SelectStatement implements CQLStatement
 // The LIMIT provided by the user is the number of CQL row he wants 
returned.
 // We want to have getRangeSlice to count the number of columns, not 
the number of keys.
 AbstractBounds keyBounds = 
restrictions.getPartitionKeyBounds(options);
-return keyBounds == null
- ? ReadQuery.EMPTY
- : new PartitionRangeReadCommand(cfm, nowInSec, queriedColumns, 
rowFilter, limit, new DataRange(keyBounds, clusteringIndexFilter), 
Optional.empty());
+if (keyBounds == null)
+return ReadQuery.EMPTY;
+
+PartitionRangeReadCommand command = new PartitionRangeReadCommand(cfm,
+  
nowInSec,
+  
queriedColumns,
+  
rowFilter,
+  
limit,
+  new 
DataRange(keyBounds, clusteringIndexFilter),
+  
Optional.empty());
+// If there's a secondary index that the command can use, have it 
validate
+// the request parameters. Note that as a side effect, if a viable 
Index is
+// identified by the CFS's index manager, it will be cached in the 
command
+// and serialized during distribution to replicas in order to avoid 
performing
+// further lookups.
+command.maybeValidateIndex();
+
+return command;
 }
 
 private ClusteringIndexFilter makeClusteringIndexFilter(QueryOptions 
options)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9cfbc31b/src/java/org/apache/cassandra/db/ReadCommand.java

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

2016-02-15 Thread samt
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/f7d6ac7e
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f7d6ac7e
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f7d6ac7e

Branch: refs/heads/trunk
Commit: f7d6ac7e40c66b0ee00d796f2667a4810deb665e
Parents: 72cb851 9cfbc31
Author: Sam Tunnicliffe 
Authored: Mon Feb 15 13:12:43 2016 +
Committer: Sam Tunnicliffe 
Committed: Mon Feb 15 13:12:43 2016 +

--
 CHANGES.txt |  1 +
 .../cql3/statements/SelectStatement.java| 22 +-
 .../org/apache/cassandra/db/ReadCommand.java| 13 
 src/java/org/apache/cassandra/index/Index.java  | 24 --
 .../service/pager/RangeSliceQueryPager.java |  8 +-
 .../cassandra/thrift/CassandraServer.java   |  8 ++
 .../org/apache/cassandra/cql3/CQLTester.java| 32 +---
 .../apache/cassandra/index/CustomIndexTest.java | 82 +---
 8 files changed, 144 insertions(+), 46 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f7d6ac7e/CHANGES.txt
--
diff --cc CHANGES.txt
index 2e0c6aa,52fc3ab..c337825
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,26 -1,5 +1,27 @@@
 -3.0.4
 +3.4
 + * fix EQ semantics of analyzed SASI indexes (CASSANDRA-11130)
 + * Support long name output for nodetool commands (CASSANDRA-7950)
 + * Encrypted hints (CASSANDRA-11040)
 + * SASI index options validation (CASSANDRA-11136)
 + * Optimize disk seek using min/max column name meta data when the LIMIT 
clause is used
 +   (CASSANDRA-8180)
 + * Add LIKE support to CQL3 (CASSANDRA-11067)
 + * Generic Java UDF types (CASSANDRA-10819)
 + * cqlsh: Include sub-second precision in timestamps by default 
(CASSANDRA-10428)
 + * Set javac encoding to utf-8 (CASSANDRA-11077)
 + * Integrate SASI index into Cassandra (CASSANDRA-10661)
 + * Add --skip-flush option to nodetool snapshot
 + * Skip values for non-queried columns (CASSANDRA-10657)
 + * Add support for secondary indexes on static columns (CASSANDRA-8103)
 + * CommitLogUpgradeTestMaker creates broken commit logs (CASSANDRA-11051)
 + * Add metric for number of dropped mutations (CASSANDRA-10866)
 + * Simplify row cache invalidation code (CASSANDRA-10396)
 + * Support user-defined compaction through nodetool (CASSANDRA-10660)
 + * Stripe view locks by key and table ID to reduce contention 
(CASSANDRA-10981)
 + * Add nodetool gettimeout and settimeout commands (CASSANDRA-10953)
 + * Add 3.0 metadata to sstablemetadata output (CASSANDRA-10838)
 +Merged from 3.0:
+  * Add query time validation method on Index (CASSANDRA-11043)
   * Avoid potential AssertionError in mixed version cluster (CASSANDRA-11128)
   * Properly handle hinted handoff after topology changes (CASSANDRA-5902)
   * AssertionError when listing sstable files on inconsistent disk state 
(CASSANDRA-11156)

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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f7d6ac7e/src/java/org/apache/cassandra/db/ReadCommand.java
--
diff --cc src/java/org/apache/cassandra/db/ReadCommand.java
index 3adee9f,c792a5a..3d044f2
--- a/src/java/org/apache/cassandra/db/ReadCommand.java
+++ b/src/java/org/apache/cassandra/db/ReadCommand.java
@@@ -324,9 -321,22 +324,22 @@@ public abstract class ReadCommand exten
  }
  
  /**
+  * If the index manager for the CFS determines that there's an applicable
+  * 2i that can be used to execute this command, call its (optional)
+  * validation method to check that nothing in this command's parameters
+  * violates the implementation specific validation rules.
+  */
+ public void maybeValidateIndex()
+ {
+ Index index = getIndex(Keyspace.openAndGetStore(metadata));
+ if (null != index)
+ index.validate(this);
+ }
+ 
+ /**
   * Executes this command on the local host.
   *
 - * @param orderGroup the operation group spanning this command
 + * @param executionController the execution controller spanning this 
command
   *
   * @return an iterator over the result of executing this command locally.
   */

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f7d6ac7e/src/java/org/apache/cassandra/index/Index.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f7d6ac7e/src/java/org/apache/cassandra/thrift/CassandraServer.java

[2/3] cassandra git commit: Add query time validation method on Index

2016-02-15 Thread samt
Add query time validation method on Index

Patch by Sam Tunnicliffe; reviewed by Andrés de la Peña for
CASSANDRA-11043


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

Branch: refs/heads/trunk
Commit: 9cfbc31bc29685bd60355a823e0cf261a89858f0
Parents: ac7e279
Author: Sam Tunnicliffe 
Authored: Mon Feb 8 15:22:41 2016 +
Committer: Sam Tunnicliffe 
Committed: Mon Feb 15 13:08:00 2016 +

--
 CHANGES.txt |  1 +
 .../cql3/statements/SelectStatement.java| 22 +-
 .../org/apache/cassandra/db/ReadCommand.java| 13 
 src/java/org/apache/cassandra/index/Index.java  | 24 --
 .../service/pager/RangeSliceQueryPager.java |  8 +-
 .../cassandra/thrift/CassandraServer.java   |  8 ++
 .../org/apache/cassandra/cql3/CQLTester.java| 32 +---
 .../apache/cassandra/index/CustomIndexTest.java | 82 +---
 8 files changed, 144 insertions(+), 46 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9cfbc31b/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index a7669bb..52fc3ab 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.4
+ * Add query time validation method on Index (CASSANDRA-11043)
  * Avoid potential AssertionError in mixed version cluster (CASSANDRA-11128)
  * Properly handle hinted handoff after topology changes (CASSANDRA-5902)
  * AssertionError when listing sstable files on inconsistent disk state 
(CASSANDRA-11156)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9cfbc31b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
--
diff --git a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java 
b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
index e84ab28..931813a 100644
--- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
@@ -46,6 +46,7 @@ import org.apache.cassandra.db.rows.RowIterator;
 import org.apache.cassandra.db.view.View;
 import org.apache.cassandra.dht.AbstractBounds;
 import org.apache.cassandra.exceptions.*;
+import org.apache.cassandra.index.Index;
 import org.apache.cassandra.index.SecondaryIndexManager;
 import org.apache.cassandra.serializers.MarshalException;
 import org.apache.cassandra.service.ClientState;
@@ -490,9 +491,24 @@ public class SelectStatement implements CQLStatement
 // The LIMIT provided by the user is the number of CQL row he wants 
returned.
 // We want to have getRangeSlice to count the number of columns, not 
the number of keys.
 AbstractBounds keyBounds = 
restrictions.getPartitionKeyBounds(options);
-return keyBounds == null
- ? ReadQuery.EMPTY
- : new PartitionRangeReadCommand(cfm, nowInSec, queriedColumns, 
rowFilter, limit, new DataRange(keyBounds, clusteringIndexFilter), 
Optional.empty());
+if (keyBounds == null)
+return ReadQuery.EMPTY;
+
+PartitionRangeReadCommand command = new PartitionRangeReadCommand(cfm,
+  
nowInSec,
+  
queriedColumns,
+  
rowFilter,
+  
limit,
+  new 
DataRange(keyBounds, clusteringIndexFilter),
+  
Optional.empty());
+// If there's a secondary index that the command can use, have it 
validate
+// the request parameters. Note that as a side effect, if a viable 
Index is
+// identified by the CFS's index manager, it will be cached in the 
command
+// and serialized during distribution to replicas in order to avoid 
performing
+// further lookups.
+command.maybeValidateIndex();
+
+return command;
 }
 
 private ClusteringIndexFilter makeClusteringIndexFilter(QueryOptions 
options)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9cfbc31b/src/java/org/apache/cassandra/db/ReadCommand.java
--
diff --git a/src/java/org/apache/cassandra/db/ReadCommand.java 
b/src/java/org/apache/cassandra/db/ReadCommand.java

[jira] [Commented] (CASSANDRA-9714) sstableloader appears to use the cassandra.yaml outgoing stream throttle

2016-02-15 Thread Marcus Eriksson (JIRA)

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

Marcus Eriksson commented on CASSANDRA-9714:


+1

> sstableloader appears to use the cassandra.yaml outgoing stream throttle
> 
>
> Key: CASSANDRA-9714
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9714
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
>Reporter: Jeremy Hanna
>Assignee: Yuki Morishita
> Fix For: 2.1.x, 2.2.x, 3.0.x, 3.x
>
>
> When trying to use the sstableloader, we found (through the metrics in 
> opscenter) that the stream throughput was constant at about 24MB/s.  We 
> didn't run it with the --throttle option so according to the help output and 
> the BulkLoader code it should be unthrottled.  However when it was 
> unthrottled in the cassandra.yaml in the loader's classpath, it got up to the 
> low hundreds of MB/s.It sounds like when starting up it takes the 
> cassandra.yaml attributes and overrides the default throttle setting of the 
> loader.



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


[jira] [Resolved] (CASSANDRA-9149) nodes slow down when having too many column families

2016-02-15 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne resolved CASSANDRA-9149.
-
Resolution: Later

I'm closing this because there is no particular interest in focusing on 
improving working with multiple thousands of tables. There is definitively 
implementation details that make this unsuitable in C*, like the fact each 
memtable pre-allocate some memory, or the fact that schema manipulation is 
currently pretty inefficient with too many table in a given keyspace.  

Don't get me wrong, I'm not saying that if you come up with patches that 
improve performance with thousands of tables (_without_ impacting performance 
when you have less table) we won't be interested (and please do feel free to 
open more specific tickets if you have specific suggestions), just that this is 
not something that is being actively looked at, mostly because we believe it is 
always possible to model things so they don't need that many tables.

> nodes slow down when having too many column families
> 
>
> Key: CASSANDRA-9149
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9149
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: ZhaoYang
>
> When working with a few thousand column families, the nodes(2-3) slow down a 
> lot.  In my case, the number of column families will continue increase. 
> Currently, some advice is like modeling(*hacking*) data to fit in smaller 
> number of column families. But this method really didn't work well due to 
> lack of atomicity and bad performance.  
> Is there a way to solve it or improve it in future release? It's okay to make 
> the cluster a bit slower, as long as not too slow. Any suggestions are 
> welcome.



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


[jira] [Updated] (CASSANDRA-9424) Schema Improvements

2016-02-15 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-9424:

Summary: Schema Improvements  (was: 3.X Schema Improvements)

> Schema Improvements
> ---
>
> Key: CASSANDRA-9424
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9424
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
> Fix For: 3.x
>
>
> C* schema code is both more brittle and less efficient than I'd like it to 
> be. This ticket will aggregate the improvement tickets to go into 3.X and 4.X 
> to improve the situation.



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


[jira] [Resolved] (CASSANDRA-9181) Improve index versus secondary index selection

2016-02-15 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne resolved CASSANDRA-9181.
-
Resolution: Not A Problem

Thanks Jeff for testing it. Going to close as Not a Problem, but if some 
encounter this in a recent version, feel free to re-open with more details.

> Improve index versus secondary index selection
> --
>
> Key: CASSANDRA-9181
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9181
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Jeremy Hanna
>  Labels: 2i
> Fix For: 3.x
>
>
> There is a special case for secondary indexes if you always supply the 
> partition key.  For example, if you have a family with ID "a456" which has 6 
> family members and I have a secondary index on first name.  Currently, if I 
> do a query like this "select * from families where id = 'a456' and firstname 
> = 'alowishus';" you can see from a query trace, that it will first scan the 
> entire cluster based on the firstname, then look for the key within that.
> If it's not terribly invasive, I think this would be a valid use case to 
> narrow down the results by key first.



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


[jira] [Commented] (CASSANDRA-9191) Log and count failure to obtain requested consistency

2016-02-15 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-9191:
-

We agree that logging that by default is not a good idea and we already 
somewhat log it at debug (which means you can manipulate you per-class log 
setting to get it logged if you really wish). The only thing mentioned above 
that we don't seem to have is the query itself, but I suppose there won't be 
objection to appending the query itself to the debug message if someone 
provides a patch.

There is also the issue of exposing a counter, but I think this can be done as 
part of CASSANDRA-7384 since that's fairly related and I left a comment 
regarding that on the issue.

> Log and count failure to obtain requested consistency
> -
>
> Key: CASSANDRA-9191
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9191
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Matt Stump
>Priority: Minor
>  Labels: lhf
>
> Cassandra should have a way to log failed requests due to failure to obtain 
> requested consistency. This should be logged as error or warning by default. 
> Also exposed should be a counter for the benefit of opscenter. 
> Currently the only way to log this is at the client. Often the application 
> and DB teams are separate and it's very difficult to obtain client logs. Also 
> because it's only visible to the client no visibility is given to opscenter 
> making it difficult for the field to track down or isolate systematic or node 
> level errors.



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


[jira] [Updated] (CASSANDRA-9191) Log and count failure to obtain requested consistency

2016-02-15 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-9191:

Labels: lhf  (was: )

> Log and count failure to obtain requested consistency
> -
>
> Key: CASSANDRA-9191
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9191
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Matt Stump
>Priority: Minor
>  Labels: lhf
>
> Cassandra should have a way to log failed requests due to failure to obtain 
> requested consistency. This should be logged as error or warning by default. 
> Also exposed should be a counter for the benefit of opscenter. 
> Currently the only way to log this is at the client. Often the application 
> and DB teams are separate and it's very difficult to obtain client logs. Also 
> because it's only visible to the client no visibility is given to opscenter 
> making it difficult for the field to track down or isolate systematic or node 
> level errors.



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


[jira] [Commented] (CASSANDRA-7384) Collect metrics on queries by consistency level

2016-02-15 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-7384:
-

bq.  It's pretty common that a customer uses an incorrect consistency level for 
their environment.

I'll mention that this problem _might_ be better handled by CASSANDRA-8303.

Anyway, if we do expose counters for that (on which I'm neutral: I agree we 
can't expose everything but I understand that it could be convenient in some 
environment), we should also expose how often queries failed to achieve said 
consistency as suggested in CASSANDRA-9191 (I guess both might not be useful in 
the exact scenario but it feels silly not to just deal with them in the same 
patch).

> Collect metrics on queries by consistency level
> ---
>
> Key: CASSANDRA-7384
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7384
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Vishy Kasar
>Assignee: sankalp kohli
>Priority: Minor
> Fix For: 3.x
>
>
> We had cases where cassandra client users thought that they were doing 
> queries at one consistency level but turned out to be not correct. It will be 
> good to collect metrics on number of queries done at various consistency 
> level on the server. See the equivalent JIRA on java driver: 
> https://datastax-oss.atlassian.net/browse/JAVA-354



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


[jira] [Resolved] (CASSANDRA-9205) Allow per statement time outs or request cancel method

2016-02-15 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne resolved CASSANDRA-9205.
-
Resolution: Duplicate

> Allow per statement time outs or request cancel method
> --
>
> Key: CASSANDRA-9205
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9205
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Vishy Kasar
> Fix For: 3.x
>
>
> Cassandra lets user specify time outs for various operations globally in 
> yaml. It would be great if we could set different timeouts for CQL statements 
> in different contexts, rather than just having a global  timeouts in yaml. We 
> have client requests that need to time out in a short duration vs some 
> maintenance requests that we know take long. The only choice we have now is 
> to set the server time out to the highest needed. 
> User can certainly do session.executeAsync on the client side and wait for 
> certain time on the returned future. However when user cancels the future on 
> time out, nothing is done on the server side. We have seen cases where 
> cassandra replicas were going over thousands of tombstones and causing OOMs 
> way after client timed out. 
> This can be implemented either by passing the time out along with query to 
> server or by providing a cancel method similar to 
> http://docs.oracle.com/javase/6/docs/api/java/sql/Statement.html
> It is understood that server may not be able to timeout/cancel the requests 
> in all cases. So this is a request to server to do it's best effort to 
> timeout/cancel.



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


[jira] [Resolved] (CASSANDRA-9243) Literals should be valid selectors in SELECT statements

2016-02-15 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne resolved CASSANDRA-9243.
-
Resolution: Duplicate

> Literals should be valid selectors in SELECT statements
> ---
>
> Key: CASSANDRA-9243
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9243
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Michaël Figuière
>Priority: Minor
> Fix For: 3.x
>
>
> Literals are currently not acceptable selectors in {{SELECT}} statements:
> {noformat}
>  ::= 
>  | WRITETIME '('  ')'
>  | TTL '('  ')'
>  |  '(' ( (',' )*)? ')'
> {noformat}
> This wasn't a big deal up to now as it wasn't very useful for users, but with 
> UDFs being added in Cassandra 3.0, this means that literals aren't valid 
> parameters of function. I believe it would actually be useful for several use 
> cases:
> * To allow developers to test their own functions without having to set a 
> value to a column to then pass it as an argument to the function.
> * To make it possible to write function that require a constant parameter 
> such as {{pow(int, int) -> int}} or {{contains(set, text) -> boolean}}.
> Additionally, this limitation is an inconsistency as literals are allowed in 
> functions when used in {{INSERT}} statements.



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


[jira] [Resolved] (CASSANDRA-9415) Implicit use of Materialized Views on SELECT

2016-02-15 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne resolved CASSANDRA-9415.
-
Resolution: Later

While I understand the interest it would have for analytics, I, like others 
expressed, tend to not love adding an implicit way to do something when we have 
an explicit one that seems simple enough to me (and we've constantly tried to 
favor explicit over implicit in C* as a design choice).

But the more important problem is that doing this would break the consistency 
level guarantees. And for that reason I'm -1 on doing this completely 
implicitly (unless/until we somehow fix the CL guarantees made on MVs but 
that's probably not around the corner either). In theory I suppose we could add 
some form of flag for the user to say "I'm happy to give up any CL guarantee 
but please use MVs if you can" but that's pretty messy imo.

I'll also note that while it would undeniably be convenient for analytics, it's 
totally possible for analytic drivers to check the defined MVs and do the exact 
same work on their side.

Anyway, given what's above I'm going to close as "Later", by which I mean 
"We're not planning to implement this anytime soon so let's be upfront about 
it, but maybe later, when we have more mileage with MVs and if we've improve 
the CL guarantees on them, we might look again at this with fresh eyes".


> Implicit use of Materialized Views on SELECT
> 
>
> Key: CASSANDRA-9415
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9415
> Project: Cassandra
>  Issue Type: Improvement
>Reporter:  Brian Hess
>  Labels: ponies
>
> CASSANDRA-6477 introduces Materialized Views.  This greatly simplifies the 
> write path for the best-practice of "query tables".  But it does not simplify 
> the read path as much as our users want/need.
> We suggest to folks to create multiple copies of their base table optimized 
> for certain queries - hence "query table".  For example, we may have a USER 
> table with two type of queries: lookup by userid and lookup by email address. 
>  We would recommend creating 2 tables USER_BY_USERID and USER_BY_EMAIL.  Both 
> would have the exact same schema, with the same PRIMARY KEY columns, but 
> different PARTITION KEY - the first would be USERID and the second would be 
> EMAIL.
> One complicating thing with this approach is that the application now needs 
> to know that when it INSERT/UPDATE/DELETEs from the base table it needs to 
> INSERT/UPDATE/DELETE from all of the query tables as well.  CASSANDRA-6477 
> covers this nicely.
> However, the other side of the coin is that the application needs to know 
> which query table to leverage based on the selection criteria.  Using the 
> example above, if the query has a predicate such as "WHERE userid = 'bhess'", 
> then USERS_BY_USERID is the better table to use.  Similarly, when the 
> predicate is "WHERE email = 'bhess@company.whatever'", USERS_BY_EMAIL is 
> appropriate.
> On INSERT/UPDATE/DELETE, Materialized Views essentially give a single "name" 
> to the collection of tables.  You do operations just on the base table.  It 
> is very attractive for the SELECT side as well.  It would be very good to 
> allow an application to simply do "SELECT * FROM users WHERE userid = 
> 'bhess'" and have that query implicitly leverage the USERS_BY_USERID 
> materialized view.
> For additional use cases, especially analytics use cases like in Spark, this 
> allows the Spark code to simply push down the query without having to know 
> about all of the MVs that have been set up.  The system will route the query 
> appropriately.  And if additional MVs are necessary to make a query run 
> better/faster, then those MVs can be set up and Spark will implicitly 
> leverage them.



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


[jira] [Comment Edited] (CASSANDRA-10371) Decommissioned nodes can remain in gossip

2016-02-15 Thread pavel (JIRA)

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

pavel edited comment on CASSANDRA-10371 at 2/15/16 10:29 AM:
-

Attached the logs. I will be able to restart in debug mode later. Hopefully it 
a couple of weeks.

{noformat}
{"time":"2016-02-15T10:17:27.846Z","level":"INFO","msg":"InetAddress /10.0.1.32 
is now DOWN"}
{"time":"2016-02-15T10:17:27.847Z","level":"INFO","msg":"Removing tokens 
[-1183123795032699037,   -1237172198872744999, -1270149265263593564, 
-1389400073696907418, -1402231454860468978, -1420312602012480180, 
-1627335600868165275, -1713896876933182948, -1714549883939918780, 
-1741474774932965377, -1792210053935902256, -1807601543024917385, 
-1854566658540932161, -1912378675308644559, -1963516450452847956, 
-2081077201955154820, -2099259848054237265, -2129680696766320789, 
-2221883494221453885, -2310616694711668360, -2331548641412448139, 
-2334622440252028474, -241763982847025, -245865888987490824, 
-246385138307167507, -2473543956019538623, -2490169864633659751, 
-2532042510174406079, -2540038371895843059, -2577021784711590342, 
-2593326939593610701, -2705600331335690795, -2770464252902532656, 
-2839608713233822191, -2912475620975565625, -2943366603912110567, 
-2949295810903492735, -2954629576212069889, -3095752208331422097, 
-3121066151673234082, -3185818042633507184, -3219579857569752331, 
-3286343234413829618, -3289689335761352230, -3361565551667832402, 
-3383031027800371008, -3412816001810159961, -3457683958466098497, 
-3508695836421455440, -3532532777067013075, -3543699029518234044, 
-3580715661159129955, -3599252547477456660, -3661459590777641370, 
-3667538041993955650, -3690186824731493069, -3814115795769795724, 
-409080988277749690, -4156007243077529438, -4168774893038102265, 
-4213854018229603756, -4249034660629583574, -4281296366845033280, 
-4320926472067799077, -4545355489460541553, -4630628418422675470, 
-4654983718222492637, -4768547837932983920, -5159507483120816494, 
-51965338274886423, -5199723923113410828, -5223817829501441469, 
-5267064983314818217, -5348036139422617554, -5364643938379720849, 
-5495473223858010026, -5538859875930354329, -554259440667407064, 
-5547533646691145209, -5599903631185515707, -5779719603131964183, 
-5932457424237549800, -6205324647087801173, -6229187725024886147, 
-6231270541967013773, -6235596621005793282, -6243196665962158041, 
-6264073286569207959, -6427783773364474000, -6501124205004483449, 
-6515615874324067226, -6573166604041811188, -6637220677879215528, 
-6651782973192407164, -6660806062319128258, -6745026564913028874, 
-6812331251174808386, -7084494716757599690, -7149011211591734620, 
-7274798955118474541, -731652465373161574, -7403663263352230504, 
-7447942789148217722, -7449824614964680985, -7587057746419387993, 
-7641766861615411515, -7685202236673643074, -7707429459189222115, 
-7742454891260223055, -7833962528790251697, -7931725553821464164, 
-7939773289897241357, -8098012638292660116, -8219265643204532541, 
-8235265212011847570, -8252620209307958750, -8332424581430025253, 
-8349765834148048802, -836487426771203231, -8505914076204635715, 
-851663313261657661, -8519826107865925909, -8695372492829159498, 
-894257583517062, -8976797677584625277, -9051099539809741903, 
-963992846195142625, 1003830146651642498, 1178027849963644975, 
1224976256801927215, 1244352078631038965, 1417164721674217220, 
1451341591539912399, 1491082438042287951, 1514848536642096395, 
1779901662209221643, 1854090933062166699, 1943140502461231414, 
1994380979939543148, 2007534562233247106, 217709005954998613, 
2235989942794609624, 2241300505721899121, 2246701380267263353, 
231183097291070161, 2426913079401922388, 2451699806267654588, 
2506037868809622944, 2539177368085335242, 2585691867824138041, 
2615916489656464006, 2629622650576085045, 2657709892891143999, 
269267015073834956, 2978608649954009655, 2994749269564046800, 
3002378570488766614, 3121394566209939036, 3141180417712080576, 
3154166401188000671, 3295643071378191280, 3367253256599281972, 
3373165743103532333, 3410319489097671220, 341173714064808701, 
35319237546365581, 358168701228763255, 3695798865479120909, 
3784007090181772945, 3859215587032554422, 388414320421460408, 
3958884439975359895, 4116791292047135794, 4157923384507172767, 
4177479403175856644, 4192843956567907187, 4237835213950914050, 
4283455088657318777, 4437755738583404917, 4464954521637384793, 
4479350931740982844, 448168435071015674, 4483893029099418629, 
4495279466361191724, 4626894508809678069, 4913067912592229158, 
5055224510936602124, 5146899889661568824, 5333227006937586923, 
5344713819757688419, 5354664536118782383, 5407856766112305920, 
5524147618224097934, 5530799914723849578, 5594217902784391863, 
5740424123774088150, 5773813700926694122, 5797583289244413653, 
596003237801815323, 6051342740892152639, 6053457919557951562, 
6063733117952809262, 

[jira] [Comment Edited] (CASSANDRA-10371) Decommissioned nodes can remain in gossip

2016-02-15 Thread pavel (JIRA)

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

pavel edited comment on CASSANDRA-10371 at 2/15/16 10:27 AM:
-

Attached the logs. I will be able to restart in debug mode later. Hopefully it 
a couple of weeks.

 {"time":"2016-02-15T10:17:27.846Z","level":"INFO","msg":"InetAddress 
/10.0.1.32 is now DOWN"}
 {"time":"2016-02-15T10:17:27.847Z","level":"INFO","msg":"Removing tokens 
[-1183123795032699037,   -1237172198872744999, -1270149265263593564, 
-1389400073696907418, -1402231454860468978, -1420312602012480180, 
-1627335600868165275, -1713896876933182948, -1714549883939918780, 
-1741474774932965377, -1792210053935902256, -1807601543024917385, 
-1854566658540932161, -1912378675308644559, -1963516450452847956, 
-2081077201955154820, -2099259848054237265, -2129680696766320789, 
-2221883494221453885, -2310616694711668360, -2331548641412448139, 
-2334622440252028474, -241763982847025, -245865888987490824, 
-246385138307167507, -2473543956019538623, -2490169864633659751, 
-2532042510174406079, -2540038371895843059, -2577021784711590342, 
-2593326939593610701, -2705600331335690795, -2770464252902532656, 
-2839608713233822191, -2912475620975565625, -2943366603912110567, 
-2949295810903492735, -2954629576212069889, -3095752208331422097, 
-3121066151673234082, -3185818042633507184, -3219579857569752331, 
-3286343234413829618, -3289689335761352230, -3361565551667832402, 
-3383031027800371008, -3412816001810159961, -3457683958466098497, 
-3508695836421455440, -3532532777067013075, -3543699029518234044, 
-3580715661159129955, -3599252547477456660, -3661459590777641370, 
-3667538041993955650, -3690186824731493069, -3814115795769795724, 
-409080988277749690, -4156007243077529438, -4168774893038102265, 
-4213854018229603756, -4249034660629583574, -4281296366845033280, 
-4320926472067799077, -4545355489460541553, -4630628418422675470, 
-4654983718222492637, -4768547837932983920, -5159507483120816494, 
-51965338274886423, -5199723923113410828, -5223817829501441469, 
-5267064983314818217, -5348036139422617554, -5364643938379720849, 
-5495473223858010026, -5538859875930354329, -554259440667407064, 
-5547533646691145209, -5599903631185515707, -5779719603131964183, 
-5932457424237549800, -6205324647087801173, -6229187725024886147, 
-6231270541967013773, -6235596621005793282, -6243196665962158041, 
-6264073286569207959, -6427783773364474000, -6501124205004483449, 
-6515615874324067226, -6573166604041811188, -6637220677879215528, 
-6651782973192407164, -6660806062319128258, -6745026564913028874, 
-6812331251174808386, -7084494716757599690, -7149011211591734620, 
-7274798955118474541, -731652465373161574, -7403663263352230504, 
-7447942789148217722, -7449824614964680985, -7587057746419387993, 
-7641766861615411515, -7685202236673643074, -7707429459189222115, 
-7742454891260223055, -7833962528790251697, -7931725553821464164, 
-7939773289897241357, -8098012638292660116, -8219265643204532541, 
-8235265212011847570, -8252620209307958750, -8332424581430025253, 
-8349765834148048802, -836487426771203231, -8505914076204635715, 
-851663313261657661, -8519826107865925909, -8695372492829159498, 
-894257583517062, -8976797677584625277, -9051099539809741903, 
-963992846195142625, 1003830146651642498, 1178027849963644975, 
1224976256801927215, 1244352078631038965, 1417164721674217220, 
1451341591539912399, 1491082438042287951, 1514848536642096395, 
1779901662209221643, 1854090933062166699, 1943140502461231414, 
1994380979939543148, 2007534562233247106, 217709005954998613, 
2235989942794609624, 2241300505721899121, 2246701380267263353, 
231183097291070161, 2426913079401922388, 2451699806267654588, 
2506037868809622944, 2539177368085335242, 2585691867824138041, 
2615916489656464006, 2629622650576085045, 2657709892891143999, 
269267015073834956, 2978608649954009655, 2994749269564046800, 
3002378570488766614, 3121394566209939036, 3141180417712080576, 
3154166401188000671, 3295643071378191280, 3367253256599281972, 
3373165743103532333, 3410319489097671220, 341173714064808701, 
35319237546365581, 358168701228763255, 3695798865479120909, 
3784007090181772945, 3859215587032554422, 388414320421460408, 
3958884439975359895, 4116791292047135794, 4157923384507172767, 
4177479403175856644, 4192843956567907187, 4237835213950914050, 
4283455088657318777, 4437755738583404917, 4464954521637384793, 
4479350931740982844, 448168435071015674, 4483893029099418629, 
4495279466361191724, 4626894508809678069, 4913067912592229158, 
5055224510936602124, 5146899889661568824, 5333227006937586923, 
5344713819757688419, 5354664536118782383, 5407856766112305920, 
5524147618224097934, 5530799914723849578, 5594217902784391863, 
5740424123774088150, 5773813700926694122, 5797583289244413653, 
596003237801815323, 6051342740892152639, 6053457919557951562, 
6063733117952809262, 6188792405330710479, 

[jira] [Comment Edited] (CASSANDRA-10371) Decommissioned nodes can remain in gossip

2016-02-15 Thread pavel (JIRA)

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

pavel edited comment on CASSANDRA-10371 at 2/15/16 10:25 AM:
-

Attached the logs. I will be able to restart in debug mode later. Hopefully it 
a couple of weeks.

{code}
{"time":"2016-02-15T10:17:27.846Z","level":"INFO","msg":"InetAddress /10.0.1.32 
is now DOWN"}
{"time":"2016-02-15T10:17:27.847Z","level":"INFO","msg":"Removing tokens 
[-1183123795032699037, -1237172198872744999, -1270149265263593564, 
-1389400073696907418, -1402231454860468978, -1420312602012480180, 
-1627335600868165275, -1713896876933182948, -1714549883939918780, 
-1741474774932965377, -1792210053935902256, -1807601543024917385, 
-1854566658540932161, -1912378675308644559, -1963516450452847956, 
-2081077201955154820, -2099259848054237265, -2129680696766320789, 
-2221883494221453885, -2310616694711668360, -2331548641412448139, 
-2334622440252028474, -241763982847025, -245865888987490824, 
-246385138307167507, -2473543956019538623, -2490169864633659751, 
-2532042510174406079, -2540038371895843059, -2577021784711590342, 
-2593326939593610701, -2705600331335690795, -2770464252902532656, 
-2839608713233822191, -2912475620975565625, -2943366603912110567, 
-2949295810903492735, -2954629576212069889, -3095752208331422097, 
-3121066151673234082, -3185818042633507184, -3219579857569752331, 
-3286343234413829618, -3289689335761352230, -3361565551667832402, 
-3383031027800371008, -3412816001810159961, -3457683958466098497, 
-3508695836421455440, -3532532777067013075, -3543699029518234044, 
-3580715661159129955, -3599252547477456660, -3661459590777641370, 
-3667538041993955650, -3690186824731493069, -3814115795769795724, 
-409080988277749690, -4156007243077529438, -4168774893038102265, 
-4213854018229603756, -4249034660629583574, -4281296366845033280, 
-4320926472067799077, -4545355489460541553, -4630628418422675470, 
-4654983718222492637, -4768547837932983920, -5159507483120816494, 
-51965338274886423, -5199723923113410828, -5223817829501441469, 
-5267064983314818217, -5348036139422617554, -5364643938379720849, 
-5495473223858010026, -5538859875930354329, -554259440667407064, 
-5547533646691145209, -5599903631185515707, -5779719603131964183, 
-5932457424237549800, -6205324647087801173, -6229187725024886147, 
-6231270541967013773, -6235596621005793282, -6243196665962158041, 
-6264073286569207959, -6427783773364474000, -6501124205004483449, 
-6515615874324067226, -6573166604041811188, -6637220677879215528, 
-6651782973192407164, -6660806062319128258, -6745026564913028874, 
-6812331251174808386, -7084494716757599690, -7149011211591734620, 
-7274798955118474541, -731652465373161574, -7403663263352230504, 
-7447942789148217722, -7449824614964680985, -7587057746419387993, 
-7641766861615411515, -7685202236673643074, -7707429459189222115, 
-7742454891260223055, -7833962528790251697, -7931725553821464164, 
-7939773289897241357, -8098012638292660116, -8219265643204532541, 
-8235265212011847570, -8252620209307958750, -8332424581430025253, 
-8349765834148048802, -836487426771203231, -8505914076204635715, 
-851663313261657661, -8519826107865925909, -8695372492829159498, 
-894257583517062, -8976797677584625277, -9051099539809741903, 
-963992846195142625, 1003830146651642498, 1178027849963644975, 
1224976256801927215, 1244352078631038965, 1417164721674217220, 
1451341591539912399, 1491082438042287951, 1514848536642096395, 
1779901662209221643, 1854090933062166699, 1943140502461231414, 
1994380979939543148, 2007534562233247106, 217709005954998613, 
2235989942794609624, 2241300505721899121, 2246701380267263353, 
231183097291070161, 2426913079401922388, 2451699806267654588, 
2506037868809622944, 2539177368085335242, 2585691867824138041, 
2615916489656464006, 2629622650576085045, 2657709892891143999, 
269267015073834956, 2978608649954009655, 2994749269564046800, 
3002378570488766614, 3121394566209939036, 3141180417712080576, 
3154166401188000671, 3295643071378191280, 3367253256599281972, 
3373165743103532333, 3410319489097671220, 341173714064808701, 
35319237546365581, 358168701228763255, 3695798865479120909, 
3784007090181772945, 3859215587032554422, 388414320421460408, 
3958884439975359895, 4116791292047135794, 4157923384507172767, 
4177479403175856644, 4192843956567907187, 4237835213950914050, 
4283455088657318777, 4437755738583404917, 4464954521637384793, 
4479350931740982844, 448168435071015674, 4483893029099418629, 
4495279466361191724, 4626894508809678069, 4913067912592229158, 
5055224510936602124, 5146899889661568824, 5333227006937586923, 
5344713819757688419, 5354664536118782383, 5407856766112305920, 
5524147618224097934, 5530799914723849578, 5594217902784391863, 
5740424123774088150, 5773813700926694122, 5797583289244413653, 
596003237801815323, 6051342740892152639, 6053457919557951562, 
6063733117952809262, 

[jira] [Commented] (CASSANDRA-10371) Decommissioned nodes can remain in gossip

2016-02-15 Thread pavel (JIRA)

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

pavel commented on CASSANDRA-10371:
---

Attached the logs. I will be able to restart in debug mode later. Hopefully it 
a couple of weeks.

```
{"time":"2016-02-15T10:17:27.846Z","level":"INFO","msg":"InetAddress /10.0.1.32 
is now DOWN"}
{"time":"2016-02-15T10:17:27.847Z","level":"INFO","msg":"Removing tokens 
[-1183123795032699037, -1237172198872744999, -1270149265263593564, 
-1389400073696907418, -1402231454860468978, -1420312602012480180, 
-1627335600868165275, -1713896876933182948, -1714549883939918780, 
-1741474774932965377, -1792210053935902256, -1807601543024917385, 
-1854566658540932161, -1912378675308644559, -1963516450452847956, 
-2081077201955154820, -2099259848054237265, -2129680696766320789, 
-2221883494221453885, -2310616694711668360, -2331548641412448139, 
-2334622440252028474, -241763982847025, -245865888987490824, 
-246385138307167507, -2473543956019538623, -2490169864633659751, 
-2532042510174406079, -2540038371895843059, -2577021784711590342, 
-2593326939593610701, -2705600331335690795, -2770464252902532656, 
-2839608713233822191, -2912475620975565625, -2943366603912110567, 
-2949295810903492735, -2954629576212069889, -3095752208331422097, 
-3121066151673234082, -3185818042633507184, -3219579857569752331, 
-3286343234413829618, -3289689335761352230, -3361565551667832402, 
-3383031027800371008, -3412816001810159961, -3457683958466098497, 
-3508695836421455440, -3532532777067013075, -3543699029518234044, 
-3580715661159129955, -3599252547477456660, -3661459590777641370, 
-3667538041993955650, -3690186824731493069, -3814115795769795724, 
-409080988277749690, -4156007243077529438, -4168774893038102265, 
-4213854018229603756, -4249034660629583574, -4281296366845033280, 
-4320926472067799077, -4545355489460541553, -4630628418422675470, 
-4654983718222492637, -4768547837932983920, -5159507483120816494, 
-51965338274886423, -5199723923113410828, -5223817829501441469, 
-5267064983314818217, -5348036139422617554, -5364643938379720849, 
-5495473223858010026, -5538859875930354329, -554259440667407064, 
-5547533646691145209, -5599903631185515707, -5779719603131964183, 
-5932457424237549800, -6205324647087801173, -6229187725024886147, 
-6231270541967013773, -6235596621005793282, -6243196665962158041, 
-6264073286569207959, -6427783773364474000, -6501124205004483449, 
-6515615874324067226, -6573166604041811188, -6637220677879215528, 
-6651782973192407164, -6660806062319128258, -6745026564913028874, 
-6812331251174808386, -7084494716757599690, -7149011211591734620, 
-7274798955118474541, -731652465373161574, -7403663263352230504, 
-7447942789148217722, -7449824614964680985, -7587057746419387993, 
-7641766861615411515, -7685202236673643074, -7707429459189222115, 
-7742454891260223055, -7833962528790251697, -7931725553821464164, 
-7939773289897241357, -8098012638292660116, -8219265643204532541, 
-8235265212011847570, -8252620209307958750, -8332424581430025253, 
-8349765834148048802, -836487426771203231, -8505914076204635715, 
-851663313261657661, -8519826107865925909, -8695372492829159498, 
-894257583517062, -8976797677584625277, -9051099539809741903, 
-963992846195142625, 1003830146651642498, 1178027849963644975, 
1224976256801927215, 1244352078631038965, 1417164721674217220, 
1451341591539912399, 1491082438042287951, 1514848536642096395, 
1779901662209221643, 1854090933062166699, 1943140502461231414, 
1994380979939543148, 2007534562233247106, 217709005954998613, 
2235989942794609624, 2241300505721899121, 2246701380267263353, 
231183097291070161, 2426913079401922388, 2451699806267654588, 
2506037868809622944, 2539177368085335242, 2585691867824138041, 
2615916489656464006, 2629622650576085045, 2657709892891143999, 
269267015073834956, 2978608649954009655, 2994749269564046800, 
3002378570488766614, 3121394566209939036, 3141180417712080576, 
3154166401188000671, 3295643071378191280, 3367253256599281972, 
3373165743103532333, 3410319489097671220, 341173714064808701, 
35319237546365581, 358168701228763255, 3695798865479120909, 
3784007090181772945, 3859215587032554422, 388414320421460408, 
3958884439975359895, 4116791292047135794, 4157923384507172767, 
4177479403175856644, 4192843956567907187, 4237835213950914050, 
4283455088657318777, 4437755738583404917, 4464954521637384793, 
4479350931740982844, 448168435071015674, 4483893029099418629, 
4495279466361191724, 4626894508809678069, 4913067912592229158, 
5055224510936602124, 5146899889661568824, 5333227006937586923, 
5344713819757688419, 5354664536118782383, 5407856766112305920, 
5524147618224097934, 5530799914723849578, 5594217902784391863, 
5740424123774088150, 5773813700926694122, 5797583289244413653, 
596003237801815323, 6051342740892152639, 6053457919557951562, 
6063733117952809262, 6188792405330710479, 6215325692940778409, 
6255014464234787541, 

[jira] [Commented] (CASSANDRA-10397) Add local timezone support to cqlsh

2016-02-15 Thread Stefan Podkowinski (JIRA)

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

Stefan Podkowinski commented on CASSANDRA-10397:


Looks like you missed the timezone constructor argument in trunk: 
https://github.com/apache/cassandra/compare/trunk...pauloricardomg:trunk-10397#diff-c1c44ef355c4c9eae2d7d19aa38a2accL113

> Add local timezone support to cqlsh
> ---
>
> Key: CASSANDRA-10397
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10397
> Project: Cassandra
>  Issue Type: Improvement
> Environment: Ubuntu 14.04 LTS
>Reporter: Suleman Rai
>Assignee: Stefan Podkowinski
>Priority: Minor
>  Labels: cqlsh
>
> CQLSH is not adding the timezone offset to the timestamp after it has been 
> inserted into a table.
> create table test(id int PRIMARY KEY, time timestamp);
> INSERT INTO test(id,time) values (1,dateof(now()));
> select *from test;
> id | time
> +-
>   1 | 2015-09-25 13:00:32
> It is just displaying the default UTC timestamp without adding the timezone 
> offset. It should be 2015-09-25 21:00:32 in my case as my timezone offset is 
> +0800.



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


[jira] [Updated] (CASSANDRA-10657) Re-enable/improve value skipping

2016-02-15 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-10657:
--
Assignee: Sylvain Lebresne  (was: Aleksey Yeschenko)

> Re-enable/improve value skipping
> 
>
> Key: CASSANDRA-10657
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10657
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Sylvain Lebresne
>Assignee: Sylvain Lebresne
> Fix For: 3.4
>
>
> This is a followup to CASSANDRA-10655, to re-enable the optimization of 
> skipping values for the columns that are not requested by users in a CQL 
> query. See CASSANDRA-10655 for why it was disabled, the goal here is to 
> re-enable it minus the bugs.



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


[jira] [Assigned] (CASSANDRA-10657) Re-enable/improve value skipping

2016-02-15 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko reassigned CASSANDRA-10657:
-

Assignee: Aleksey Yeschenko  (was: Sylvain Lebresne)

> Re-enable/improve value skipping
> 
>
> Key: CASSANDRA-10657
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10657
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Sylvain Lebresne
>Assignee: Aleksey Yeschenko
> Fix For: 3.4
>
>
> This is a followup to CASSANDRA-10655, to re-enable the optimization of 
> skipping values for the columns that are not requested by users in a CQL 
> query. See CASSANDRA-10655 for why it was disabled, the goal here is to 
> re-enable it minus the bugs.



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


[jira] [Updated] (CASSANDRA-11084) cassandra-3.0 eclipse-warnings

2016-02-15 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer updated CASSANDRA-11084:
---
Fix Version/s: (was: 3.0.x)
   3.0.4

> cassandra-3.0 eclipse-warnings
> --
>
> Key: CASSANDRA-11084
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11084
> Project: Cassandra
>  Issue Type: Bug
>  Components: Testing
>Reporter: Michael Shuler
>Assignee: Benjamin Lerer
>Priority: Minor
> Fix For: 3.0.4
>
> Attachments: 11084-3.0.txt
>
>
> REF = origin/cassandra-3.0 
> COMMIT = 414c1c5771ca05c23c8c1279dbdb90a673dda040
> {noformat}
> # 1/27/16 10:00:17 PM UTC
> # Eclipse Compiler for Java(TM) v20150120-1634, 3.10.2, Copyright IBM Corp 
> 2000, 2013. All rights reserved.
> --
> 1. ERROR in 
> /mnt/data/jenkins/workspace/cassandra-3.0_eclipse-warnings/src/java/org/apache/cassandra/hints/CompressedChecksummedDataInput.java
>  (at line 156)
>   return builder.build();
>   ^^^
> Potential resource leak: '' may not 
> be closed at this location
> --
> --
> 2. ERROR in 
> /mnt/data/jenkins/workspace/cassandra-3.0_eclipse-warnings/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java
>  (at line 141)
>   return channel.socket();
>   
> Potential resource leak: 'channel' may not be closed at this location
> --
> 2 problems (2 errors)
> {noformat}
> Check the latest job on 
> http://cassci.datastax.com/job/cassandra-3.0_eclipse-warnings/ for the most 
> recent warnings



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


[jira] [Updated] (CASSANDRA-11083) cassandra-2.2 eclipse-warnings

2016-02-15 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer updated CASSANDRA-11083:
---
Fix Version/s: (was: 2.2.x)
   2.2.6

> cassandra-2.2 eclipse-warnings
> --
>
> Key: CASSANDRA-11083
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11083
> Project: Cassandra
>  Issue Type: Bug
>  Components: Testing
>Reporter: Michael Shuler
>Assignee: Benjamin Lerer
>Priority: Minor
> Fix For: 2.2.6
>
> Attachments: 11083-2.2.txt
>
>
> REF = origin/cassandra-2.2 
> COMMIT = fa2fa602d989ed911b60247e3dd8f2d580188782
> {noformat}
> # 1/27/16 6:19:23 PM UTC
> # Eclipse Compiler for Java(TM) v20150120-1634, 3.10.2, Copyright IBM Corp 
> 2000, 2013. All rights reserved.
> incorrect classpath: 
> /var/lib/jenkins/workspace/cassandra-2.2_eclipse-warnings/build/cobertura/classes
> --
> 1. ERROR in 
> /var/lib/jenkins/workspace/cassandra-2.2_eclipse-warnings/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java
>  (at line 141)
>   return channel.socket();
>   
> Potential resource leak: 'channel' may not be closed at this location
> --
> 1 problem (1 error)
> {noformat}
> Check latest job on 
> http://cassci.datastax.com/job/cassandra-2.2_eclipse-warnings/ for the most 
> recent artifact



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


[jira] [Commented] (CASSANDRA-6588) Add a 'NO EMPTY RESULTS' filter to SELECT

2016-02-15 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-6588:
-

I'll note that starting in the upcoming 3.4, CASSANDRA-10657 should mostly fix 
the performance problem described here. It's not 100% perfect but is probably 
good enough that it might be worth doing some benchmarking to assess whether 
it's worth adding new syntax.

> Add a 'NO EMPTY RESULTS' filter to SELECT
> -
>
> Key: CASSANDRA-6588
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6588
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Sylvain Lebresne
>Priority: Minor
>
> It is the semantic of CQL that a (CQL) row exists as long as it has one 
> non-null column (including the PK columns, which, given that no PK columns 
> can be null, means that it's enough to have the PK set for a row to exist). 
> This does means that the result to
> {noformat}
> CREATE TABLE test (k int PRIMARY KEY, v1 int, v2 int);
> INSERT INTO test(k, v1) VALUES (0, 4);
> SELECT v2 FROM test;
> {noformat}
> must be (and is)
> {noformat}
>  v2
> --
>  null
> {noformat}
> That fact does mean however that when we only select a few columns of a row, 
> we still need to find out rows that exist but have no values for the selected 
> columns. Long story short, given how the storage engine works, this means we 
> need to query full (CQL) rows even when only some of the columns are selected 
> because that's the only way to distinguish between "the row exists but have 
> no value for the selected columns" and "the row doesn't exist". I'll note in 
> particular that, due to CASSANDRA-5762, we can't unfortunately rely on the 
> row marker to optimize that out.
> Now, when you selects only a subsets of the columns of a row, there is many 
> cases where you don't care about rows that exists but have no value for the 
> columns you requested and are happy to filter those out. So, for those cases, 
> we could provided a new SELECT filter. Outside the potential convenience (not 
> having to filter empty results client side), one interesting part is that 
> when this filter is provided, we could optimize a bit by only querying the 
> columns selected, since we wouldn't need to return rows that exists but have 
> no values for the selected columns.
> For the exact syntax, there is probably a bunch of options. For instance:
> * {{SELECT NON EMPTY(v2, v3) FROM test}}: the vague rational for putting it 
> in the SELECT part is that such filter is kind of in the spirit to DISTINCT.  
> Possibly a bit ugly outside of that.
> * {{SELECT v2, v3 FROM test NO EMPTY RESULTS}} or {{SELECT v2, v3 FROM test 
> NO EMPTY ROWS}} or {{SELECT v2, v3 FROM test NO EMPTY}}: the last one is 
> shorter but maybe a bit less explicit. As for {{RESULTS}} versus {{ROWS}}, 
> the only small object to {{NO EMPTY ROWS}} could be that it might suggest it 
> is filtering non existing rows (I mean, the fact we never ever return non 
> existing rows should hint that it's not what it does but well...) while we're 
> just filtering empty "resultSet rows".
> Of course, if there is a pre-existing SQL syntax for that, it's even better, 
> though a very quick search didn't turn anything. Other suggestions welcome 
> too.



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


[jira] [Resolved] (CASSANDRA-11165) Static column restriction ignored

2016-02-15 Thread Sam Tunnicliffe (JIRA)

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

Sam Tunnicliffe resolved CASSANDRA-11165.
-
Resolution: Duplicate

Closing as a duplicate of CASSANDRA-10958, a fix for which was included as part 
of CASSANDRA-8103

> Static column restriction ignored
> -
>
> Key: CASSANDRA-11165
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11165
> Project: Cassandra
>  Issue Type: Bug
>  Components: Local Write-Read Paths
> Environment: [cqlsh 5.0.1 | Cassandra 3.3 | CQL spec 3.4.0 | Native 
> protocol v4]
>Reporter: Artem Soloviov
>Priority: Minor
>
> Applying restriction on static field value does not affect any results.
> {code}
> CREATE TABLE t (k text, s text static, i int, PRIMARY KEY(k,i));
> INSERT INTO t (k, s, i) VALUES ( 'a','static value',1);
> INSERT INTO t (k, s, i) VALUES ( 'b','other value',2);
> SELECT * FROM t WHERE k = 'b' AND s = 'static value' ALLOW FILTERING ;
> {code}
> *Expected result:* 
> empty set
> *Actual result:*
> {code}
>  k | i | s
> ---+---+-
>  b | 2 | other value
> (1 rows)
> {code}
> {code}
> SELECT * FROM t WHERE i = 2 AND s = 'static value' ALLOW FILTERING ;
> {code}
> *Expected result:* 
> empty set
> *Actual result:*
> {code}
>  k | i | s
> ---+---+-
>  b | 2 | other value
> (1 rows)
> {code}



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


[jira] [Reopened] (CASSANDRA-10371) Decommissioned nodes can remain in gossip

2016-02-15 Thread Stefania (JIRA)

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

Stefania reopened CASSANDRA-10371:
--

Reopening. Please attach your logs.

> Decommissioned nodes can remain in gossip
> -
>
> Key: CASSANDRA-10371
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10371
> Project: Cassandra
>  Issue Type: Bug
>  Components: Distributed Metadata
>Reporter: Brandon Williams
>Assignee: Stefania
>Priority: Minor
>
> This may apply to other dead states as well.  Dead states should be expired 
> after 3 days.  In the case of decom we attach a timestamp to let the other 
> nodes know when it should be expired.  It has been observed that sometimes a 
> subset of nodes in the cluster never expire the state, and through heap 
> analysis of these nodes it is revealed that the epstate.isAlive check returns 
> true when it should return false, which would allow the state to be evicted.  
> This may have been affected by CASSANDRA-8336.



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


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

2016-02-15 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/7bdffec9
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7bdffec9
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7bdffec9

Branch: refs/heads/trunk
Commit: 7bdffec93dedf416d198c05ab8466b6a6633196d
Parents: efbcd15 f3b5ff8
Author: Benjamin Lerer 
Authored: Mon Feb 15 10:05:34 2016 +0100
Committer: Benjamin Lerer 
Committed: Mon Feb 15 10:05:42 2016 +0100

--

--




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

2016-02-15 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/72cb851e
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/72cb851e
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/72cb851e

Branch: refs/heads/trunk
Commit: 72cb851e5db44b3e18f4956c315803644104f8ab
Parents: 1944bf5 ac7e279
Author: Benjamin Lerer 
Authored: Mon Feb 15 10:20:27 2016 +0100
Committer: Benjamin Lerer 
Committed: Mon Feb 15 10:20:43 2016 +0100

--

--




[1/4] cassandra git commit: Fix potential resource leak warnings

2016-02-15 Thread blerer
Repository: cassandra
Updated Branches:
  refs/heads/trunk 1944bf507 -> 72cb851e5


Fix potential resource leak warnings

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


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

Branch: refs/heads/trunk
Commit: f3b5ff8422adbf2f896656b06f26b2749a24a41b
Parents: 1b201e9
Author: Benjamin Lerer 
Authored: Mon Feb 15 10:01:02 2016 +0100
Committer: Benjamin Lerer 
Committed: Mon Feb 15 10:04:29 2016 +0100

--
 src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f3b5ff84/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java
--
diff --git a/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java 
b/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java
index 5699c5a..2af0016 100644
--- a/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java
+++ b/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java
@@ -122,6 +122,8 @@ public class OutboundTcpConnectionPool
 return newSocket(endPoint());
 }
 
+// Closing the socket will close the underlying channel.
+@SuppressWarnings("resource")
 public static Socket newSocket(InetAddress endpoint) throws IOException
 {
 // zero means 'bind on any available port.'



[3/4] cassandra git commit: Fix potential resource leak warnings

2016-02-15 Thread blerer
Fix potential resource leak warnings

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


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

Branch: refs/heads/trunk
Commit: ac7e2793debe6de27d5ca50ce9afc3ff9a17f88d
Parents: 7bdffec
Author: Benjamin Lerer 
Authored: Mon Feb 15 10:14:08 2016 +0100
Committer: Benjamin Lerer 
Committed: Mon Feb 15 10:14:08 2016 +0100

--
 .../org/apache/cassandra/hints/CompressedChecksummedDataInput.java | 2 ++
 src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java   | 2 ++
 2 files changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ac7e2793/src/java/org/apache/cassandra/hints/CompressedChecksummedDataInput.java
--
diff --git 
a/src/java/org/apache/cassandra/hints/CompressedChecksummedDataInput.java 
b/src/java/org/apache/cassandra/hints/CompressedChecksummedDataInput.java
index 1009b57..cc4a6bd 100644
--- a/src/java/org/apache/cassandra/hints/CompressedChecksummedDataInput.java
+++ b/src/java/org/apache/cassandra/hints/CompressedChecksummedDataInput.java
@@ -145,6 +145,8 @@ public final class CompressedChecksummedDataInput extends 
ChecksummedDataInput
 }
 }
 
+// Closing the CompressedChecksummedDataInput will close the underlying 
channel.
+@SuppressWarnings("resource")
 public static final CompressedChecksummedDataInput 
upgradeInput(ChecksummedDataInput input, ICompressor compressor)
 {
 long position = input.getPosition();

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ac7e2793/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java
--
diff --git a/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java 
b/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java
index 5699c5a..2af0016 100644
--- a/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java
+++ b/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java
@@ -122,6 +122,8 @@ public class OutboundTcpConnectionPool
 return newSocket(endPoint());
 }
 
+// Closing the socket will close the underlying channel.
+@SuppressWarnings("resource")
 public static Socket newSocket(InetAddress endpoint) throws IOException
 {
 // zero means 'bind on any available port.'



[jira] [Comment Edited] (CASSANDRA-10371) Decommissioned nodes can remain in gossip

2016-02-15 Thread pavel (JIRA)

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

pavel edited comment on CASSANDRA-10371 at 2/15/16 9:18 AM:


Exactly the same was reproduced in 2.1.11
Could you please reopen the ticket?
I have the cluster in this state up and running and I can 
give you all the necessary logs.



was (Author: pontryagin):
Exactly the same was reproduced in 2.1.11

> Decommissioned nodes can remain in gossip
> -
>
> Key: CASSANDRA-10371
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10371
> Project: Cassandra
>  Issue Type: Bug
>  Components: Distributed Metadata
>Reporter: Brandon Williams
>Assignee: Stefania
>Priority: Minor
>
> This may apply to other dead states as well.  Dead states should be expired 
> after 3 days.  In the case of decom we attach a timestamp to let the other 
> nodes know when it should be expired.  It has been observed that sometimes a 
> subset of nodes in the cluster never expire the state, and through heap 
> analysis of these nodes it is revealed that the epstate.isAlive check returns 
> true when it should return false, which would allow the state to be evicted.  
> This may have been affected by CASSANDRA-8336.



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


cassandra git commit: Fix potential resource leak warnings

2016-02-15 Thread blerer
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.0 7bdffec93 -> ac7e2793d


Fix potential resource leak warnings

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


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

Branch: refs/heads/cassandra-3.0
Commit: ac7e2793debe6de27d5ca50ce9afc3ff9a17f88d
Parents: 7bdffec
Author: Benjamin Lerer 
Authored: Mon Feb 15 10:14:08 2016 +0100
Committer: Benjamin Lerer 
Committed: Mon Feb 15 10:14:08 2016 +0100

--
 .../org/apache/cassandra/hints/CompressedChecksummedDataInput.java | 2 ++
 src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java   | 2 ++
 2 files changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ac7e2793/src/java/org/apache/cassandra/hints/CompressedChecksummedDataInput.java
--
diff --git 
a/src/java/org/apache/cassandra/hints/CompressedChecksummedDataInput.java 
b/src/java/org/apache/cassandra/hints/CompressedChecksummedDataInput.java
index 1009b57..cc4a6bd 100644
--- a/src/java/org/apache/cassandra/hints/CompressedChecksummedDataInput.java
+++ b/src/java/org/apache/cassandra/hints/CompressedChecksummedDataInput.java
@@ -145,6 +145,8 @@ public final class CompressedChecksummedDataInput extends 
ChecksummedDataInput
 }
 }
 
+// Closing the CompressedChecksummedDataInput will close the underlying 
channel.
+@SuppressWarnings("resource")
 public static final CompressedChecksummedDataInput 
upgradeInput(ChecksummedDataInput input, ICompressor compressor)
 {
 long position = input.getPosition();

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ac7e2793/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java
--
diff --git a/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java 
b/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java
index 5699c5a..2af0016 100644
--- a/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java
+++ b/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java
@@ -122,6 +122,8 @@ public class OutboundTcpConnectionPool
 return newSocket(endPoint());
 }
 
+// Closing the socket will close the underlying channel.
+@SuppressWarnings("resource")
 public static Socket newSocket(InetAddress endpoint) throws IOException
 {
 // zero means 'bind on any available port.'



[jira] [Commented] (CASSANDRA-8343) Secondary index creation causes moves/bootstraps to fail

2016-02-15 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-8343:
-

bq. The proposed solution is to introduce a {{KeepAlive}} message

How does that work in term of backward compatibility?

> Secondary index creation causes moves/bootstraps to fail
> 
>
> Key: CASSANDRA-8343
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8343
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Michael Frisch
>Assignee: Paulo Motta
>
> Node moves/bootstraps are failing if the stream timeout is set to a value in 
> which secondary index creation cannot complete.  This happens because at the 
> end of the very last stream the StreamInSession.closeIfFinished() function 
> calls maybeBuildSecondaryIndexes on every column family.  If the stream time 
> + all CF's index creation takes longer than your stream timeout then the 
> socket closes from the sender's side, the receiver of the stream tries to 
> write to said socket because it's not null, an IOException is thrown but not 
> caught in closeIfFinished(), the exception is caught somewhere and not 
> logged, AbstractStreamSession.close() is never called, and the CountDownLatch 
> is never decremented.  This causes the move/bootstrap to continue forever 
> until the node is restarted.
> This problem of stream time + secondary index creation time exists on 
> decommissioning/unbootstrap as well but since it's on the sending side the 
> timeout triggers the onFailure() callback which does decrement the 
> CountDownLatch leading to completion.
> A cursory glance at the 2.0 code leads me to believe this problem would exist 
> there as well.
> Temporary workaround: set a really high/infinite stream timeout.



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


[1/2] cassandra git commit: Fix potential resource leak warnings

2016-02-15 Thread blerer
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.0 efbcd15d6 -> 7bdffec93


Fix potential resource leak warnings

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


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

Branch: refs/heads/cassandra-3.0
Commit: f3b5ff8422adbf2f896656b06f26b2749a24a41b
Parents: 1b201e9
Author: Benjamin Lerer 
Authored: Mon Feb 15 10:01:02 2016 +0100
Committer: Benjamin Lerer 
Committed: Mon Feb 15 10:04:29 2016 +0100

--
 src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f3b5ff84/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java
--
diff --git a/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java 
b/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java
index 5699c5a..2af0016 100644
--- a/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java
+++ b/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java
@@ -122,6 +122,8 @@ public class OutboundTcpConnectionPool
 return newSocket(endPoint());
 }
 
+// Closing the socket will close the underlying channel.
+@SuppressWarnings("resource")
 public static Socket newSocket(InetAddress endpoint) throws IOException
 {
 // zero means 'bind on any available port.'



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

2016-02-15 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/7bdffec9
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7bdffec9
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7bdffec9

Branch: refs/heads/cassandra-3.0
Commit: 7bdffec93dedf416d198c05ab8466b6a6633196d
Parents: efbcd15 f3b5ff8
Author: Benjamin Lerer 
Authored: Mon Feb 15 10:05:34 2016 +0100
Committer: Benjamin Lerer 
Committed: Mon Feb 15 10:05:42 2016 +0100

--

--




cassandra git commit: Fix potential resource leak warnings

2016-02-15 Thread blerer
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.2 1b201e959 -> f3b5ff842


Fix potential resource leak warnings

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


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

Branch: refs/heads/cassandra-2.2
Commit: f3b5ff8422adbf2f896656b06f26b2749a24a41b
Parents: 1b201e9
Author: Benjamin Lerer 
Authored: Mon Feb 15 10:01:02 2016 +0100
Committer: Benjamin Lerer 
Committed: Mon Feb 15 10:04:29 2016 +0100

--
 src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f3b5ff84/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java
--
diff --git a/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java 
b/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java
index 5699c5a..2af0016 100644
--- a/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java
+++ b/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java
@@ -122,6 +122,8 @@ public class OutboundTcpConnectionPool
 return newSocket(endPoint());
 }
 
+// Closing the socket will close the underlying channel.
+@SuppressWarnings("resource")
 public static Socket newSocket(InetAddress endpoint) throws IOException
 {
 // zero means 'bind on any available port.'



[jira] [Commented] (CASSANDRA-10783) Allow literal value as parameter of UDF & UDA

2016-02-15 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer commented on CASSANDRA-10783:


Unfortunatly, I do not think so. The code freeze is planned in one week and a 
half and I do not think that we will be able to have the ticket ready by that 
time. 

> Allow literal value as parameter of UDF & UDA
> -
>
> Key: CASSANDRA-10783
> URL: https://issues.apache.org/jira/browse/CASSANDRA-10783
> Project: Cassandra
>  Issue Type: Improvement
>  Components: CQL
>Reporter: DOAN DuyHai
>Assignee: Robert Stupp
>Priority: Minor
>  Labels: CQL3, UDF, client-impacting, doc-impacting
> Fix For: 3.x
>
>
> I have defined the following UDF
> {code:sql}
> CREATE OR REPLACE FUNCTION  maxOf(current int, testValue int) RETURNS NULL ON 
> NULL INPUT 
> RETURNS int 
> LANGUAGE java 
> AS  'return Math.max(current,testValue);'
> CREATE TABLE maxValue(id int primary key, val int);
> INSERT INTO maxValue(id, val) VALUES(1, 100);
> SELECT maxOf(val, 101) FROM maxValue WHERE id=1;
> {code}
> I got the following error message:
> {code}
> SyntaxException:  message="line 1:19 no viable alternative at input '101' (SELECT maxOf(val1, 
> [101]...)">
> {code}
>  It would be nice to allow literal value as parameter of UDF and UDA too.
>  I was thinking about an use-case for an UDA groupBy() function where the end 
> user can *inject* at runtime a literal value to select which aggregation he 
> want to display, something similar to GROUP BY ... HAVING 



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