[jira] [Commented] (CASSANDRA-13397) Return value of CountDownLatch.await() not being checked in Repair

2017-04-20 Thread Simon Zhou (JIRA)

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

Simon Zhou commented on CASSANDRA-13397:


Thank you [~pauloricardomg]!

> Return value of CountDownLatch.await() not being checked in Repair
> --
>
> Key: CASSANDRA-13397
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13397
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Simon Zhou
>Assignee: Simon Zhou
>Priority: Minor
> Fix For: 3.0.x
>
> Attachments: CASSANDRA-13397-v1.patch
>
>
> While looking into repair code, I realize that we should check return value 
> of CountDownLatch.await(). Most of the places that we don't check the return 
> value, nothing bad would happen due to other protection. However, 
> ActiveRepairService#prepareForRepair should have the check. Code to reproduce:
> {code}
> public static void testLatch() throws InterruptedException {
> CountDownLatch latch = new CountDownLatch(2);
> latch.countDown();
> new Thread(() -> {
> try {
> Thread.sleep(1200);
> } catch (InterruptedException e) {
> System.err.println("interrupted");
> }
> latch.countDown();
> System.out.println("counted down");
> }).start();
> latch.await(1, TimeUnit.SECONDS);
> if (latch.getCount() > 0) {
> System.err.println("failed");
> } else {
> System.out.println("success");
> }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (CASSANDRA-13397) Return value of CountDownLatch.await() not being checked in Repair

2017-04-20 Thread Paulo Motta (JIRA)

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

Paulo Motta updated CASSANDRA-13397:

   Resolution: Fixed
Reproduced In: 3.0.14, 3.11.0  (was: 3.0.10)
   Status: Resolved  (was: Patch Available)

> Return value of CountDownLatch.await() not being checked in Repair
> --
>
> Key: CASSANDRA-13397
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13397
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Simon Zhou
>Assignee: Simon Zhou
>Priority: Minor
> Fix For: 3.0.x
>
> Attachments: CASSANDRA-13397-v1.patch
>
>
> While looking into repair code, I realize that we should check return value 
> of CountDownLatch.await(). Most of the places that we don't check the return 
> value, nothing bad would happen due to other protection. However, 
> ActiveRepairService#prepareForRepair should have the check. Code to reproduce:
> {code}
> public static void testLatch() throws InterruptedException {
> CountDownLatch latch = new CountDownLatch(2);
> latch.countDown();
> new Thread(() -> {
> try {
> Thread.sleep(1200);
> } catch (InterruptedException e) {
> System.err.println("interrupted");
> }
> latch.countDown();
> System.out.println("counted down");
> }).start();
> latch.await(1, TimeUnit.SECONDS);
> if (latch.getCount() > 0) {
> System.err.println("failed");
> } else {
> System.out.println("success");
> }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13397) Return value of CountDownLatch.await() not being checked in Repair

2017-04-20 Thread Paulo Motta (JIRA)

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

Paulo Motta commented on CASSANDRA-13397:
-

Committed to 3.0 and merged up as {{f5b36f12df65a780a52851207c285db7a8b4122f}}. 
Thanks!

> Return value of CountDownLatch.await() not being checked in Repair
> --
>
> Key: CASSANDRA-13397
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13397
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Simon Zhou
>Assignee: Simon Zhou
>Priority: Minor
> Fix For: 3.0.x
>
> Attachments: CASSANDRA-13397-v1.patch
>
>
> While looking into repair code, I realize that we should check return value 
> of CountDownLatch.await(). Most of the places that we don't check the return 
> value, nothing bad would happen due to other protection. However, 
> ActiveRepairService#prepareForRepair should have the check. Code to reproduce:
> {code}
> public static void testLatch() throws InterruptedException {
> CountDownLatch latch = new CountDownLatch(2);
> latch.countDown();
> new Thread(() -> {
> try {
> Thread.sleep(1200);
> } catch (InterruptedException e) {
> System.err.println("interrupted");
> }
> latch.countDown();
> System.out.println("counted down");
> }).start();
> latch.await(1, TimeUnit.SECONDS);
> if (latch.getCount() > 0) {
> System.err.println("failed");
> } else {
> System.out.println("success");
> }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (CASSANDRA-13430) Cleanup isIncremental/repairedAt usage

2017-04-20 Thread Blake Eggleston (JIRA)

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

Blake Eggleston updated CASSANDRA-13430:

Resolution: Fixed
Status: Resolved  (was: Ready to Commit)

Committed as 9308159bc87d29c33e64dbcfcefa948d7f5643dd

> Cleanup isIncremental/repairedAt usage
> --
>
> Key: CASSANDRA-13430
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13430
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Blake Eggleston
>Assignee: Blake Eggleston
> Fix For: 4.0
>
>
> Post CASSANDRA-9143, there's no longer a reason to pass around 
> {{isIncremental}} or {{repairedAt}} in streaming sessions, as well as some 
> places in repair. The {{pendingRepair}} & {{repairedAt}} values should only 
> be set at the beginning/finalize stages of incremental repair and just follow 
> sstables around as they're streamed. Keeping these values with sstables also 
> fixes an edge case where you could leak repaired data back into unrepaired if 
> you run full and incremental repairs concurrently.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


cassandra git commit: Cleanup isIncremental/repairedAt usage

2017-04-20 Thread bdeggleston
Repository: cassandra
Updated Branches:
  refs/heads/trunk 50ba850be -> 9308159bc


Cleanup isIncremental/repairedAt usage

Patch by Blake Eggleston; reviewed by Marcus Eriksson for CASSANDRA-13430


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

Branch: refs/heads/trunk
Commit: 9308159bc87d29c33e64dbcfcefa948d7f5643dd
Parents: 50ba850
Author: Blake Eggleston 
Authored: Fri Apr 7 10:38:56 2017 -0700
Committer: Blake Eggleston 
Committed: Thu Apr 20 16:31:22 2017 -0700

--
 CHANGES.txt |  1 +
 .../org/apache/cassandra/dht/RangeStreamer.java |  3 +-
 .../cassandra/io/sstable/SSTableLoader.java |  4 +-
 .../io/sstable/format/SSTableReader.java| 10 +++
 .../net/IncomingStreamingConnection.java|  2 +-
 .../apache/cassandra/repair/LocalSyncTask.java  | 40 +--
 .../org/apache/cassandra/repair/RepairJob.java  |  4 +-
 .../repair/RepairMessageVerbHandler.java|  6 +-
 .../apache/cassandra/repair/RepairRunnable.java |  6 +-
 .../apache/cassandra/repair/RepairSession.java  |  3 -
 .../cassandra/repair/StreamingRepairTask.java   | 23 +++---
 .../cassandra/service/ActiveRepairService.java  |  3 +-
 .../cassandra/streaming/ConnectionHandler.java  |  1 -
 .../cassandra/streaming/StreamCoordinator.java  | 15 ++--
 .../apache/cassandra/streaming/StreamPlan.java  | 20 +++---
 .../cassandra/streaming/StreamReader.java   | 13 +++-
 .../cassandra/streaming/StreamRequest.java  |  9 +--
 .../cassandra/streaming/StreamResultFuture.java |  7 +-
 .../cassandra/streaming/StreamSession.java  | 36 +++---
 .../cassandra/streaming/StreamTransferTask.java |  4 +-
 .../compress/CompressedStreamReader.java|  4 +-
 .../streaming/messages/FileMessageHeader.java   | 20 +-
 .../streaming/messages/OutgoingFileMessage.java |  5 +-
 .../streaming/messages/StreamInitMessage.java   |  9 +--
 .../cassandra/dht/StreamStateStoreTest.java |  8 +--
 .../cassandra/io/sstable/LegacySSTableTest.java |  2 +-
 .../io/sstable/SSTableRewriterTest.java |  4 +-
 .../cassandra/repair/LocalSyncTaskTest.java | 73 +---
 .../cassandra/repair/RepairSessionTest.java |  2 +-
 .../repair/StreamingRepairTaskTest.java | 11 ++-
 .../cassandra/streaming/StreamSessionTest.java  |  1 -
 .../streaming/StreamTransferTaskTest.java   | 10 +--
 .../streaming/StreamingTransferTest.java|  2 +-
 33 files changed, 201 insertions(+), 160 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9308159b/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 2710060..e72c7a5 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 4.0
+ * Cleanup isIncremental/repairedAt usage (CASSANDRA-13430)
  * Change protocol to allow sending key space independent of query string 
(CASSANDRA-10145)
  * Make gc_log and gc_warn settable at runtime (CASSANDRA-12661)
  * Take number of files in L0 in account when estimating remaining compaction 
tasks (CASSANDRA-13354)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9308159b/src/java/org/apache/cassandra/dht/RangeStreamer.java
--
diff --git a/src/java/org/apache/cassandra/dht/RangeStreamer.java 
b/src/java/org/apache/cassandra/dht/RangeStreamer.java
index 89a96cd..fd976c9 100644
--- a/src/java/org/apache/cassandra/dht/RangeStreamer.java
+++ b/src/java/org/apache/cassandra/dht/RangeStreamer.java
@@ -156,8 +156,7 @@ public class RangeStreamer
 this.tokens = tokens;
 this.address = address;
 this.description = streamOperation.getDescription();
-this.streamPlan = new StreamPlan(streamOperation, 
ActiveRepairService.UNREPAIRED_SSTABLE, connectionsPerHost,
-true, false, connectSequentially, null);
+this.streamPlan = new StreamPlan(streamOperation, connectionsPerHost, 
true, connectSequentially, null);
 this.useStrictConsistency = useStrictConsistency;
 this.snitch = snitch;
 this.stateStore = stateStore;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9308159b/src/java/org/apache/cassandra/io/sstable/SSTableLoader.java
--
diff --git a/src/java/org/apache/cassandra/io/sstable/SSTableLoader.java 
b/src/java/org/apache/cassandra/io/sstable/SSTableLoader.java
index 759fa0f..e9ea35a 100644
--- a/src/java/org/apache/cassandra/io/sstable/SSTableLoader.java
+++ 

[jira] [Commented] (CASSANDRA-13454) Start compaction when incremental repair finishes

2017-04-20 Thread Blake Eggleston (JIRA)

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

Blake Eggleston commented on CASSANDRA-13454:
-

[~krummas], I realized I'd missed 2 cases. If the session is cancelled, or if 
it's completed by the failure recovery process, a compaction won't get 
submitted. I pushed up another commit, to make sure any session completion 
triggers a compaction. Can you take a look?

> Start compaction when incremental repair finishes
> -
>
> Key: CASSANDRA-13454
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13454
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Blake Eggleston
>Assignee: Blake Eggleston
> Fix For: 4.0
>
>
> When an incremental repair finishes or fails, it's sstables are promoted / 
> demoted on the next compaction. We should submit a compaction as soon an 
> incremental repair finishes so sstables we're finished with don't spend any 
> more time in their own silo than they need to.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


svn commit: r1792111 - /cassandra/site/src/README

2017-04-20 Thread spod
Author: spod
Date: Thu Apr 20 18:56:40 2017
New Revision: 1792111

URL: http://svn.apache.org/viewvc?rev=1792111=rev
Log:
Add Jekyll and rbenv install instructions

Modified:
cassandra/site/src/README

Modified: cassandra/site/src/README
URL: 
http://svn.apache.org/viewvc/cassandra/site/src/README?rev=1792111=1792110=1792111=diff
==
--- cassandra/site/src/README (original)
+++ cassandra/site/src/README Thu Apr 20 18:56:40 2017
@@ -6,6 +6,30 @@ Prerequisite
 
 The site depends on Jekyll (https://jekyllrb.com/) which should be installed.
 
+Please use Jekyll 3.4.x for compiling the html pages, so we get identical 
results for everyone.
+
+Installing Jekyll independently from the version shipped with your OS can be 
done as follows:
+
+# Use rbenv to use a specific Ruby version with Jekyll:
+# See: https://github.com/rbenv/rbenv/#installation
+git clone -b v1.1.0 https://github.com/rbenv/rbenv.git ~/.rbenv
+echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc # change to bashrc if 
needed
+
+# Install ruby
+# See: https://github.com/rbenv/rbenv/#installing-ruby-versions
+rbenv install 2.4.1
+
+# Associate with Cassandra svn directory
+cd ~/svn/cassandra-site # change as needed
+rbenv local 2.4.1
+which rbenv # should point to shim
+ruby --version
+
+# Install jekyll with local rbenv version
+gem install jekyll -v 3.4.3
+jekyll --version
+
+
 Updating the site
 -
 




svn commit: r1792104 - in /cassandra/site: publish/download/index.html src/download.md

2017-04-20 Thread spod
Author: spod
Date: Thu Apr 20 18:18:20 2017
New Revision: 1792104

URL: http://svn.apache.org/viewvc?rev=1792104=rev
Log:
Fix RPM download link

Modified:
cassandra/site/publish/download/index.html
cassandra/site/src/download.md

Modified: cassandra/site/publish/download/index.html
URL: 
http://svn.apache.org/viewvc/cassandra/site/publish/download/index.html?rev=1792104=1792103=1792104=diff
==
--- cassandra/site/publish/download/index.html (original)
+++ cassandra/site/publish/download/index.html Thu Apr 20 18:18:20 2017
@@ -2,12 +2,6 @@
 
   
 
-  
-  
-
-  
-  
-
 
 
 
@@ -121,60 +115,66 @@ released against the most recent bug fix
 Installation from Debian 
packages
 
 
-  For tick-tock releases, the release series is the 
release number, without dot, and with an appended x, so 
31x,
-32x, …
+  For tick-tock releases, the release 
series is the release number, without dot, and with an appended 
x, so 31x,
+32x, …
   
-For older pre-tick-tock releases, the release 
series is the major version number, without dot, and with an
-appended x. So currently it can one of 21x, 
22x or 30x.
+For older pre-tick-tock releases, the release series is the major version 
number, without dot, and with an
+appended x. So currently it can one of 
21x, 22x or 30x.
   
-  Add the Apache repository of Cassandra to 
/etc/apt/sources.list.d/cassandra.sources.list, for example for 
version 3.10:
+  Add the Apache repository of Cassandra to /etc/apt/sources.list.d/cassandra.sources.list,
 for example for version 3.10:
 
 
-echo "deb http://www.apache.org/dist/cassandra/debian 310x main" | 
sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list
+echo "deb 
http://www.apache.org/dist/cassandra/debian 310x main" | sudo tee -a 
/etc/apt/sources.list.d/cassandra.sources.list
 
+
 
 
   Add the Apache Cassandra repository keys:
 
 
-curl https://www.apache.org/dist/cassandra/KEYS | sudo apt-key add -
+curl 
https://www.apache.org/dist/cassandra/KEYS | sudo apt-key add -
 
+
 
 
   Update the repositories:
 
 
-sudo apt-get update
+sudo apt-get update
 
+
 
 
   If you encounter this error:
 
 
-GPG error: http://www.apache.org 310x InRelease: The following 
signatures couldn't be verified because the public key is not available: 
NO_PUBKEY A278B781FE4B2BDA
+GPG error: 
http://www.apache.org 310x InRelease: The following signatures couldn't be 
verified because the public key is not available: NO_PUBKEY A278B781FE4B2BDA
 
+
 Then add the public key A278B781FE4B2BDA as follows:
 
-sudo apt-key adv --keyserver pool.sks-keyservers.net --recv-key 
A278B781FE4B2BDA
+sudo apt-key adv 
--keyserver pool.sks-keyservers.net --recv-key A278B781FE4B2BDA
 
-and repeat sudo apt-get update. The actual key may be 
different, you get it from the error message itself. For a
+
+and repeat sudo apt-get update. The 
actual key may be different, you get it from the error message itself. For a
 full list of Apache contributors public keys, you can refer to https://www.apache.org/dist/cassandra/KEYS;>https://www.apache.org/dist/cassandra/KEYS.
 
 
   Install Cassandra:
 
 
-sudo apt-get install cassandra
+sudo apt-get 
install cassandra
 
+
 
 
-  You can start Cassandra with sudo service cassandra start 
and stop it with sudo service cassandra stop.
+  You can start Cassandra with sudo 
service cassandra start and stop it with sudo service cassandra stop.
 However, normally the service will start automatically. For this reason be 
sure to stop it if you need to make any
 configuration changes.
-  Verify that Cassandra is running by invoking nodetool 
status from the command line.
-  The default location of configuration files is 
/etc/cassandra.
-  The default location of log and data directories is 
/var/log/cassandra/ and /var/lib/cassandra.
-  Start-up options (heap size, etc) can be configured in 
/etc/default/cassandra.
+  Verify that Cassandra is running by invoking nodetool status from the command line.
+  The default location of configuration files is /etc/cassandra.
+  The default location of log and data directories is /var/log/cassandra/ and /var/lib/cassandra.
+  Start-up options (heap size, etc) can be configured in /etc/default/cassandra.
 
 
 Installation from RPM packages
@@ -184,22 +184,24 @@ configuration changes.
 The following versions are currently available for download:
 
 
-  TODO: 3.0.13 (pgp, md5 and sha1)
+  http://www.apache.org/dyn/closer.lua/cassandra/redhat/30x/cassandra-3.0.13-1.noarch.rpm;>3.0.13
 (md5: 7a100653112a8a79d09fbf18dbc3f7d8 
sha1: 3b9e2dfa94614af7d7f7891eb95982719e1a8fb4)
 
 
 Any instructions have been tested with CentOS 7 and should work for all 
Redhat based distributions. Please see note on end of this section on how to 
report any issues.
 
 Start Cassandra (will not start automatically):
 
-service cassandra start
+service cassandra 
start
 
+
 
-Systemd based distributions may require to run systemctl 

svn commit: r1792101 - /cassandra/site/src/_data/releases.yaml

2017-04-20 Thread spod
Author: spod
Date: Thu Apr 20 17:57:40 2017
New Revision: 1792101

URL: http://svn.apache.org/viewvc?rev=1792101=rev
Log:
Use quotes for version numbers in releases.yaml

Force recognizing versions as string not numbers

Modified:
cassandra/site/src/_data/releases.yaml

Modified: cassandra/site/src/_data/releases.yaml
URL: 
http://svn.apache.org/viewvc/cassandra/site/src/_data/releases.yaml?rev=1792101=1792100=1792101=diff
==
--- cassandra/site/src/_data/releases.yaml (original)
+++ cassandra/site/src/_data/releases.yaml Thu Apr 20 17:57:40 2017
@@ -1,5 +1,5 @@
 latest:
-  name: 3.10
+  name: "3.10"
   date: 2017-02-03
 
 #latest_bugfix:
@@ -7,13 +7,13 @@ latest:
 #  date: 2016-04-01
 
 "3.0":
-  name: 3.0.13
+  name: "3.0.13"
   date: 2017-04-14
 
 "2.2":
-  name: 2.2.9
+  name: "2.2.9"
   date: 2017-02-21
 
 "2.1":
-  name: 2.1.17
+  name: "2.1.17"
   date: 2017-02-21




[jira] [Updated] (CASSANDRA-13422) CompactionStrategyManager should take write not read lock when handling remove notifications

2017-04-20 Thread Jeff Jirsa (JIRA)

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

Jeff Jirsa updated CASSANDRA-13422:
---
Fix Version/s: (was: 3.11.x)
   3.11.0

> CompactionStrategyManager should take write not read lock when handling 
> remove notifications
> 
>
> Key: CASSANDRA-13422
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13422
> Project: Cassandra
>  Issue Type: Bug
>  Components: Local Write-Read Paths
>Reporter: Ariel Weisberg
>Assignee: Ariel Weisberg
> Fix For: 3.11.0, 4.0
>
>
> {{getNextBackgroundTask}} in various compaction strategies (definitely 
> {{LCS}}) rely on checking the result of {{DataTracker.getCompacting()}} to 
> avoid accessing data and metadata related to tables that have already head 
> their resources released.
> There is a race where this check is unreliable and will claim a table that 
> has its resources already released is not compacting resulting in use after 
> free.
> [{{LeveledCompactionStrategy.findDroppableSSTable}}|https://github.com/apache/cassandra/blob/c794d2bed7ca1d10e13c4da08a3d45f5c755c1d8/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java#L504]
>  for instance has this three part logical && condition where the first check 
> is against the compacting set before calling {{worthDroppingTombstones}} 
> which fails if the table has been released.
> The order of events is basically that CompactionStrategyManager acquires the 
> read lock in getNextBackgroundTask(), then proceeds eventually to 
> findDroppableSSTable and acquires a set of SSTables from the manifest. While 
> the manifest is thread safe it's not accessed atomically WRT to other 
> operations. Once it has acquired the set of tables it acquires (not 
> atomically) the set of compacting SSTables and iterates checking the former 
> against the latter.
> Meanwhile other compaction threads are marking tables obsolete or compacted 
> and releasing their references. Doing this removes them from {{DataTracker}} 
> and publishes a notification to the strategies, but this notification only 
> requires the read lock. After the compaction thread has published the 
> notifications it eventually marks the table as not compacting in 
> {{DataTracker}} or removes it entirely.
> The race is then that the compaction thread generating a new background task 
> acquires the sstables from the manifest on the stack. Any table in that set 
> that was compacting at that time must remain compacting so that it can be 
> skipped. Another compaction thread finishes a compaction and is able to 
> remove the table from the manifest and then remove it from the compacting 
> set. The thread generating the background task then acquires the list of 
> compacting tables which doesn't include the table it is supposed to skip.
> The simple fix appears to be to require threads to acquire the write lock in 
> order to publish notifications of tables being removed from compaction 
> strategies. While holding the write lock it won't be possible for someone to 
> see a view of tables in the manifest where tables that are compacting aren't 
> compacting in the view.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13265) Expiration in OutboundTcpConnection can block the reader Thread

2017-04-20 Thread Ariel Weisberg (JIRA)

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

Ariel Weisberg commented on CASSANDRA-13265:


The branches are out of date. 3.11 ones doesn't have a circle.yml. They really 
need to be rebased onto something relatively recent so they can run in Circle.

> Expiration in OutboundTcpConnection can block the reader Thread
> ---
>
> Key: CASSANDRA-13265
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13265
> Project: Cassandra
>  Issue Type: Bug
> Environment: Cassandra 3.0.9
> Java HotSpot(TM) 64-Bit Server VM version 25.112-b15 (Java version 
> 1.8.0_112-b15)
> Linux 3.16
>Reporter: Christian Esken
>Assignee: Christian Esken
> Fix For: 3.0.x
>
> Attachments: cassandra.pb-cache4-dus.2017-02-17-19-36-26.chist.xz, 
> cassandra.pb-cache4-dus.2017-02-17-19-36-26.td.xz
>
>
> I observed that sometimes a single node in a Cassandra cluster fails to 
> communicate to the other nodes. This can happen at any time, during peak load 
> or low load. Restarting that single node from the cluster fixes the issue.
> Before going in to details, I want to state that I have analyzed the 
> situation and am already developing a possible fix. Here is the analysis so 
> far:
> - A Threaddump in this situation showed  324 Threads in the 
> OutboundTcpConnection class that want to lock the backlog queue for doing 
> expiration.
> - A class histogram shows 262508 instances of 
> OutboundTcpConnection$QueuedMessage.
> What is the effect of it? As soon as the Cassandra node has reached a certain 
> amount of queued messages, it starts thrashing itself to death. Each of the 
> Thread fully locks the Queue for reading and writing by calling 
> iterator.next(), making the situation worse and worse.
> - Writing: Only after 262508 locking operation it can progress with actually 
> writing to the Queue.
> - Reading: Is also blocked, as 324 Threads try to do iterator.next(), and 
> fully lock the Queue
> This means: Writing blocks the Queue for reading, and readers might even be 
> starved which makes the situation even worse.
> -
> The setup is:
>  - 3-node cluster
>  - replication factor 2
>  - Consistency LOCAL_ONE
>  - No remote DC's
>  - high write throughput (10 INSERT statements per second and more during 
> peak times).
>  



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13235) All thread blocked and writes pending.

2017-04-20 Thread ZhaoYang (JIRA)

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

ZhaoYang commented on CASSANDRA-13235:
--

[~zhaoyan] in your use case, is there heavy contention of Write-Query on the 
same partition key?

> All thread blocked and writes pending.
> --
>
> Key: CASSANDRA-13235
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13235
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
> Environment: jdk8
> cassandra 2.1.15
>Reporter: zhaoyan
>
> I found cassandra many pending  MutationStage task
> {code}
> NFO  [Service Thread] 2017-02-17 16:00:14,440 StatusLogger.java:51 - Pool 
> NameActive   Pending  Completed   Blocked  All Time 
> Blocked
> INFO  [Service Thread] 2017-02-17 16:00:14,440 StatusLogger.java:66 - 
> MutationStage   384  4553 4294213082 0
>  0
> INFO  [Service Thread] 2017-02-17 16:00:14,441 StatusLogger.java:66 - 
> RequestResponseStage  0 0 2172612382 0
>  0
> INFO  [Service Thread] 2017-02-17 16:00:14,441 StatusLogger.java:66 - 
> ReadRepairStage   0 05378852 0
>  0
> INFO  [Service Thread] 2017-02-17 16:00:14,441 StatusLogger.java:66 - 
> CounterMutationStage  0 0  0 0
>  0
> INFO  [Service Thread] 2017-02-17 16:00:14,441 StatusLogger.java:66 - 
> ReadStage 5 0  577242284 0
>  0
> INFO  [Service Thread] 2017-02-17 16:00:14,441 StatusLogger.java:66 - 
> MiscStage 0 0  0 0
>  0
> INFO  [Service Thread] 2017-02-17 16:00:14,441 StatusLogger.java:66 - 
> HintedHandoff 0 0   1480 0
>  0
> INFO  [Service Thread] 2017-02-17 16:00:14,441 StatusLogger.java:66 - 
> GossipStage   0 09342250 0
>  0
> {code}
> And I found there are many blocked thread with jstack
> {code}
> "SharedPool-Worker-28" #416 daemon prio=5 os_prio=0 tid=0x01fb8000 
> nid=0x7459 waiting for monitor entry [0x7fdd83ca]
>java.lang.Thread.State: BLOCKED (on object monitor)
> at sun.misc.Unsafe.monitorEnter(Native Method)
> at 
> org.apache.cassandra.utils.concurrent.Locks.monitorEnterUnsafe(Locks.java:46)
> at 
> org.apache.cassandra.db.AtomicBTreeColumns.addAllWithSizeDelta(AtomicBTreeColumns.java:202)
> at org.apache.cassandra.db.Memtable.put(Memtable.java:210)
> at 
> org.apache.cassandra.db.ColumnFamilyStore.apply(ColumnFamilyStore.java:1244)
> at org.apache.cassandra.db.Keyspace.apply(Keyspace.java:396)
> at org.apache.cassandra.db.Keyspace.apply(Keyspace.java:359)
> at org.apache.cassandra.db.Mutation.apply(Mutation.java:214)
> at 
> org.apache.cassandra.db.MutationVerbHandler.doVerb(MutationVerbHandler.java:54)
> at 
> org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:64)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at 
> org.apache.cassandra.concurrent.AbstractTracingAwareExecutorService$FutureTask.run(AbstractTracingAwareExecutorService.java:164)
> at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:105)
> at java.lang.Thread.run(Thread.java:745)
> {code}
> To use "grep BLOCKED |wc -l",  get Number is 384 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (CASSANDRA-13276) Regression on CASSANDRA-11416: can't load snapshots of tables with dropped columns

2017-04-20 Thread Jeff Jirsa (JIRA)

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

Jeff Jirsa updated CASSANDRA-13276:
---
   Resolution: Fixed
Fix Version/s: (was: 3.11.x)
   (was: 4.x)
   (was: 3.0.x)
   4.0
   3.11.0
   3.0.14
   Status: Resolved  (was: Ready to Commit)

> Regression on CASSANDRA-11416: can't load snapshots of tables with dropped 
> columns
> --
>
> Key: CASSANDRA-13276
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13276
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Matt Kopit
>Assignee: Andrés de la Peña
> Fix For: 3.0.14, 3.11.0, 4.0
>
>
> I'm running Cassandra 3.10 and running into the exact same issue described in 
> CASSANDRA-11416: 
> 1. A table is created with columns 'a' and 'b'
> 2. Data is written to the table
> 3. Drop column 'b'
> 4. Take a snapshot
> 5. Drop the table
> 6. Run the snapshot schema.cql to recreate the table and the run the alter
> 7. Try to restore the snapshot data using sstableloader
> sstableloader yields the error:
> java.lang.RuntimeException: Unknown column b during deserialization



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13412) Update of column with TTL results in secondary index not returning row

2017-04-20 Thread JIRA

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

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

Totally agree. I have added a new test for an index on a regular column. Here 
is the new patch, where the unaffected 3.0+ branches have only the unit tests:

||[2.1|https://github.com/apache/cassandra/compare/cassandra-2.1...adelapena:13412-2.1]|[utests|http://cassci.datastax.com/view/Dev/view/adelapena/job/adelapena-13412-2.1-testall/]|[dtests|http://cassci.datastax.com/view/Dev/view/adelapena/job/adelapena-13412-2.1-dtest/]|
||[2.2|https://github.com/apache/cassandra/compare/cassandra-2.2...adelapena:13412-2.2]|[utests|http://cassci.datastax.com/view/Dev/view/adelapena/job/adelapena-13412-2.2-testall/]|[dtests|http://cassci.datastax.com/view/Dev/view/adelapena/job/adelapena-13412-2.2-dtest/]|
||[3.0|https://github.com/apache/cassandra/compare/cassandra-3.0...adelapena:13412-3.0]|[utests|http://cassci.datastax.com/view/Dev/view/adelapena/job/adelapena-13412-3.0-testall/]|
 |
||[3.11|https://github.com/apache/cassandra/compare/cassandra-3.11...adelapena:13412-3.11]|[utests|http://cassci.datastax.com/view/Dev/view/adelapena/job/adelapena-13412-3.11-testall/]|
 |
||[3.0|https://github.com/apache/cassandra/compare/cassandra-trunk...adelapena:13412-trunk]|[utests|http://cassci.datastax.com/view/Dev/view/adelapena/job/adelapena-13412-trunk-testall/]|
 |

> Update of column with TTL results in secondary index not returning row
> --
>
> Key: CASSANDRA-13412
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13412
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Enrique Bautista Barahona
>Assignee: Andrés de la Peña
> Fix For: 2.1.x, 2.2.x
>
>
> Cassandra versions: 2.2.3, 3.0.11
> 1 datacenter, keyspace has RF 3. Default consistency level.
> Steps:
> 1. I create these table and index.
> {code}
> CREATE TABLE my_table (
> a text,
> b text,
> c text,
> d set,
> e float,
> f text,
> g int,
> h double,
> j set,
> k float,
> m set,
> PRIMARY KEY (a, b, c)
> ) WITH read_repair_chance = 0.0
>AND dclocal_read_repair_chance = 0.1
>AND gc_grace_seconds = 864000
>AND bloom_filter_fp_chance = 0.01
>AND caching = { 'keys' : 'ALL', 'rows_per_partition' : 'NONE' }
>AND comment = ''
>AND compaction = { 'class' : 
> 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy' }
>AND compression = { 'sstable_compression' : 
> 'org.apache.cassandra.io.compress.LZ4Compressor' }
>AND default_time_to_live = 0
>AND speculative_retry = '99.0PERCENTILE'
>AND min_index_interval = 128
>AND max_index_interval = 2048;
> CREATE INDEX my_index ON my_table (c);
> {code}
> 2. I have 9951 INSERT statements in a file and I run the following command to 
> execute them. The INSERT statements have no TTL and no consistency level is 
> specified.
> {code}
> cqlsh   -u  -f 
> {code}
> 3. I update a column filtering by the whole primary key, and setting a TTL. 
> For example:
> {code}
> UPDATE my_table USING TTL 30 SET h = 10 WHERE a = 'test_a' AND b = 'test_b' 
> AND c = 'test_c';
> {code}
> 4. After the time specified in the TTL I run the following queries:
> {code}
> SELECT * FROM my_table WHERE a = 'test_a' AND b = 'test_b' AND c = 'test_c';
> SELECT * FROM my_table WHERE c = 'test_c';
> {code}
> The first one returns the correct row with an empty h column (as it has 
> expired). However, the second query (which uses the secondary index on column 
> c) returns nothing.
> I've done the query through my app which uses the Java driver v3.0.4 and 
> reads with CL local_one, from the cql shell and from DBeaver 3.8.5. All 
> display the same behaviour. The queries are performed minutes after the 
> writes and the servers don't have a high load, so I think it's unlikely to be 
> a consistency issue.
> I've tried to reproduce the issue in ccm and cqlsh by creating a new keyspace 
> and table, and inserting just 1 row, and the bug doesn't manifest. This leads 
> me to think that it's an issue only present with not trivially small amounts 
> of data, or maybe present only after Cassandra compacts or performs whatever 
> maintenance it needs to do.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13265) Expiration in OutboundTcpConnection can block the reader Thread

2017-04-20 Thread Ariel Weisberg (JIRA)

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

Ariel Weisberg commented on CASSANDRA-13265:


That circle.yml is broken. For instance OutboundTcpConnectionTest failed to 
start because it NPEed in DatabaseDescriptor but it's not in the summary. Or 
maybe it's Circle. I'm not sure. I'm also not sure why your are only getting 
builds for trunk.

If you fix the unit test I think it's ready to commit. The dtests ran on Apache 
Jenkins for everything except trunk. Trunk timed out on one test so I'm going 
to try it again.

> Expiration in OutboundTcpConnection can block the reader Thread
> ---
>
> Key: CASSANDRA-13265
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13265
> Project: Cassandra
>  Issue Type: Bug
> Environment: Cassandra 3.0.9
> Java HotSpot(TM) 64-Bit Server VM version 25.112-b15 (Java version 
> 1.8.0_112-b15)
> Linux 3.16
>Reporter: Christian Esken
>Assignee: Christian Esken
> Fix For: 3.0.x
>
> Attachments: cassandra.pb-cache4-dus.2017-02-17-19-36-26.chist.xz, 
> cassandra.pb-cache4-dus.2017-02-17-19-36-26.td.xz
>
>
> I observed that sometimes a single node in a Cassandra cluster fails to 
> communicate to the other nodes. This can happen at any time, during peak load 
> or low load. Restarting that single node from the cluster fixes the issue.
> Before going in to details, I want to state that I have analyzed the 
> situation and am already developing a possible fix. Here is the analysis so 
> far:
> - A Threaddump in this situation showed  324 Threads in the 
> OutboundTcpConnection class that want to lock the backlog queue for doing 
> expiration.
> - A class histogram shows 262508 instances of 
> OutboundTcpConnection$QueuedMessage.
> What is the effect of it? As soon as the Cassandra node has reached a certain 
> amount of queued messages, it starts thrashing itself to death. Each of the 
> Thread fully locks the Queue for reading and writing by calling 
> iterator.next(), making the situation worse and worse.
> - Writing: Only after 262508 locking operation it can progress with actually 
> writing to the Queue.
> - Reading: Is also blocked, as 324 Threads try to do iterator.next(), and 
> fully lock the Queue
> This means: Writing blocks the Queue for reading, and readers might even be 
> starved which makes the situation even worse.
> -
> The setup is:
>  - 3-node cluster
>  - replication factor 2
>  - Consistency LOCAL_ONE
>  - No remote DC's
>  - high write throughput (10 INSERT statements per second and more during 
> peak times).
>  



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (CASSANDRA-13465) Add earlier versions in debian repository packages files

2017-04-20 Thread Peter Lemke (JIRA)
Peter Lemke created CASSANDRA-13465:
---

 Summary: Add earlier versions in debian repository packages files
 Key: CASSANDRA-13465
 URL: https://issues.apache.org/jira/browse/CASSANDRA-13465
 Project: Cassandra
  Issue Type: Improvement
  Components: Packaging
Reporter: Peter Lemke
Priority: Minor


The debian repository contains just the latest version in the Packages files 
e.g. under 
http://dl.bintray.com/apache/cassandra/dists/30x/main/binary-amd64/Packages
This makes it impossible to pin a certain version for adding or replacing  
nodes and install them from the repository without manually downloading the 
package.
Maybe this was a deliberate decision, but I did not find any documentation 
about it. 
It would be helpful to have a package list containing all patch numbers for 
consistent cluster setup without need to upgrade or manual downloads.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Comment Edited] (CASSANDRA-13463) nodetool toppartitions - error: String didn't validate

2017-04-20 Thread Ariel Weisberg (JIRA)

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

Ariel Weisberg edited comment on CASSANDRA-13463 at 4/20/17 2:33 PM:
-

I think this unrelated to CASSANDRA-9241. You probably have invalid UTF-8 keys. 
The obvious answer is either there is corruption, or the database allowed you 
to insert an invalid UTF-8 string, or the validation code is wrong. If it works 
some of the time it might be because the sampling doesn't pick up the problem 
string.

I think the thing to do is add a trace level log that logs the hex string 
before the exception is thrown and find out what that key is and whether it is 
a valid UTF-8.


was (Author: aweisberg):
I think this unrelated to CASSANDRA-9241 you just have invalid UTF-8 keys. The 
obvious answer is either there is corruption, or the database allowed you to 
insert an invalid UTF-8 string, or the validation code is wrong. If it works 
some of the time it might be because the sampling doesn't pick up the problem 
string.

I think the thing to do is add a trace level log that logs the hex string 
before the exception is thrown and find out what that key is and whether it is 
a valid UTF-8.

> nodetool toppartitions - error: String didn't validate
> --
>
> Key: CASSANDRA-13463
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13463
> Project: Cassandra
>  Issue Type: Bug
>  Components: Observability
> Environment: Debian Jessie, Java 1.8.0-121, Cassandra v3.0.11
>Reporter: Aleksandr Ivanov
>
> nodetool toppartitions doesn't work for most of runs and failing with 
> following message
> {code}
> error: String didn't validate.
> -- StackTrace --
> org.apache.cassandra.serializers.MarshalException: String didn't validate.
> at 
> org.apache.cassandra.serializers.UTF8Serializer.validate(UTF8Serializer.java:35)
> at 
> org.apache.cassandra.db.marshal.AbstractType.getString(AbstractType.java:128)
> at 
> org.apache.cassandra.db.ColumnFamilyStore.finishLocalSampling(ColumnFamilyStore.java:1559)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
> at 
> com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112)
> at 
> com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46)
> at 
> com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237)
> at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138)
> at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252)
> at 
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
> at 
> com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
> at 
> com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:468)
> at 
> javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)
> at 
> javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)
> at 
> javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309)
> at java.security.AccessController.doPrivileged(Native Method)
> at 
> javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1408)
> at 
> javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)
> at sun.reflect.GeneratedMethodAccessor90.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:346)
> at sun.rmi.transport.Transport$1.run(Transport.java:200)
> at sun.rmi.transport.Transport$1.run(Transport.java:197)
> at java.security.AccessController.doPrivileged(Native Method)
> at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
>   

[jira] [Commented] (CASSANDRA-13463) nodetool toppartitions - error: String didn't validate

2017-04-20 Thread Ariel Weisberg (JIRA)

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

Ariel Weisberg commented on CASSANDRA-13463:


I think this unrelated to CASSANDRA-9241 you just have invalid UTF-8 keys. The 
obvious answer is either there is corruption, or the database allowed you to 
insert an invalid UTF-8 string, or the validation code is wrong. If it works 
some of the time it might be because the sampling doesn't pick up the problem 
string.

I think the thing to do is add a trace level log that logs the hex string 
before the exception is thrown and find out what that key is and whether it is 
a valid UTF-8.

> nodetool toppartitions - error: String didn't validate
> --
>
> Key: CASSANDRA-13463
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13463
> Project: Cassandra
>  Issue Type: Bug
>  Components: Observability
> Environment: Debian Jessie, Java 1.8.0-121, Cassandra v3.0.11
>Reporter: Aleksandr Ivanov
>
> nodetool toppartitions doesn't work for most of runs and failing with 
> following message
> {code}
> error: String didn't validate.
> -- StackTrace --
> org.apache.cassandra.serializers.MarshalException: String didn't validate.
> at 
> org.apache.cassandra.serializers.UTF8Serializer.validate(UTF8Serializer.java:35)
> at 
> org.apache.cassandra.db.marshal.AbstractType.getString(AbstractType.java:128)
> at 
> org.apache.cassandra.db.ColumnFamilyStore.finishLocalSampling(ColumnFamilyStore.java:1559)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
> at 
> com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112)
> at 
> com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46)
> at 
> com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237)
> at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138)
> at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252)
> at 
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
> at 
> com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
> at 
> com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:468)
> at 
> javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)
> at 
> javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)
> at 
> javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309)
> at java.security.AccessController.doPrivileged(Native Method)
> at 
> javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1408)
> at 
> javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)
> at sun.reflect.GeneratedMethodAccessor90.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:346)
> at sun.rmi.transport.Transport$1.run(Transport.java:200)
> at sun.rmi.transport.Transport$1.run(Transport.java:197)
> at java.security.AccessController.doPrivileged(Native Method)
> at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
> at 
> sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
> at 
> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
> at 
> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
> at java.security.AccessController.doPrivileged(Native Method)
> at 
> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at 
> 

[8/9] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.11

2017-04-20 Thread paulo
Merge branch 'cassandra-3.0' into cassandra-3.11


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

Branch: refs/heads/cassandra-3.11
Commit: 4d24958dd1c2b529cd415d7d8a8d533b5e8db0cb
Parents: 42904c6 f5b36f1
Author: Paulo Motta 
Authored: Thu Apr 20 10:37:00 2017 -0300
Committer: Paulo Motta 
Committed: Thu Apr 20 10:37:00 2017 -0300

--
 CHANGES.txt |  1 +
 .../cassandra/service/ActiveRepairService.java  | 22 +---
 2 files changed, 15 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/4d24958d/CHANGES.txt
--
diff --cc CHANGES.txt
index b6ca04b,7a860fe..08df2dd
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,37 -1,11 +1,38 @@@
 -3.0.14
 +3.11.0
 + * V5 protocol flags decoding broken (CASSANDRA-13443)
 + * Use write lock not read lock for removing sstables from compaction 
strategies. (CASSANDRA-13422)
 + * Use corePoolSize equal to maxPoolSize in JMXEnabledThreadPoolExecutors 
(CASSANDRA-13329)
 + * Avoid rebuilding SASI indexes containing no values (CASSANDRA-12962)
 + * Add charset to Analyser input stream (CASSANDRA-13151)
 + * Fix testLimitSSTables flake caused by concurrent flush (CASSANDRA-12820)
 + * cdc column addition strikes again (CASSANDRA-13382)
 + * Fix static column indexes (CASSANDRA-13277)
 + * DataOutputBuffer.asNewBuffer broken (CASSANDRA-13298)
 + * unittest CipherFactoryTest failed on MacOS (CASSANDRA-13370)
 + * Forbid SELECT restrictions and CREATE INDEX over non-frozen UDT columns 
(CASSANDRA-13247)
 + * Default logging we ship will incorrectly print "?:?" for "%F:%L" pattern 
(CASSANDRA-13317)
 + * Possible AssertionError in UnfilteredRowIteratorWithLowerBound 
(CASSANDRA-13366)
 + * Support unaligned memory access for AArch64 (CASSANDRA-13326)
 + * Improve SASI range iterator efficiency on intersection with an empty range 
(CASSANDRA-12915).
 + * Fix equality comparisons of columns using the duration type 
(CASSANDRA-13174)
 + * Obfuscate password in stress-graphs (CASSANDRA-12233)
 + * Move to FastThreadLocalThread and FastThreadLocal (CASSANDRA-13034)
 + * nodetool stopdaemon errors out (CASSANDRA-13030)
 + * Tables in system_distributed should not use gcgs of 0 (CASSANDRA-12954)
 + * Fix primary index calculation for SASI (CASSANDRA-12910)
 + * More fixes to the TokenAllocator (CASSANDRA-12990)
 + * NoReplicationTokenAllocator should work with zero replication factor 
(CASSANDRA-12983)
 + * Address message coalescing regression (CASSANDRA-12676)
 + * Delete illegal character from StandardTokenizerImpl.jflex (CASSANDRA-13417)
 + * Fix cqlsh automatic protocol downgrade regression (CASSANDRA-13307)
 +Merged from 3.0:
+  * Fail repair if insufficient responses received (CASSANDRA-13397)
   * Fix SSTableLoader fail when the loaded table contains dropped columns 
(CASSANDRA-13276)
   * Avoid name clashes in CassandraIndexTest (CASSANDRA-13427)
 - * Handling partially written hint files (CASSANDRA-12728) 
 + * Handling partially written hint files (CASSANDRA-12728)
   * Interrupt replaying hints on decommission (CASSANDRA-13308)
 -
 -3.0.13
 + * Handling partially written hint files (CASSANDRA-12728)
 + * Fix NPE issue in StorageService (CASSANDRA-13060)
   * Make reading of range tombstones more reliable (CASSANDRA-12811)
   * Fix startup problems due to schema tables not completely flushed 
(CASSANDRA-12213)
   * Fix view builder bug that can filter out data on restart (CASSANDRA-13405)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4d24958d/src/java/org/apache/cassandra/service/ActiveRepairService.java
--



[5/9] cassandra git commit: Fail repair if insufficient responses received

2017-04-20 Thread paulo
Fail repair if insufficient responses received

Patch by Simon Zhou; Reviewed by Paulo Motta for CASSANDRA-13397


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

Branch: refs/heads/trunk
Commit: f5b36f12df65a780a52851207c285db7a8b4122f
Parents: 175e4f8
Author: Simon Zhou 
Authored: Fri Mar 31 20:53:39 2017 -0700
Committer: Paulo Motta 
Committed: Thu Apr 20 10:26:16 2017 -0300

--
 CHANGES.txt |  1 +
 .../cassandra/service/ActiveRepairService.java  | 22 +---
 2 files changed, 15 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f5b36f12/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 6a1e486..7a860fe 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.14
+ * Fail repair if insufficient responses received (CASSANDRA-13397)
  * Fix SSTableLoader fail when the loaded table contains dropped columns 
(CASSANDRA-13276)
  * Avoid name clashes in CassandraIndexTest (CASSANDRA-13427)
  * Handling partially written hint files (CASSANDRA-12728) 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f5b36f12/src/java/org/apache/cassandra/service/ActiveRepairService.java
--
diff --git a/src/java/org/apache/cassandra/service/ActiveRepairService.java 
b/src/java/org/apache/cassandra/service/ActiveRepairService.java
index 11d4617..b4cea79 100644
--- a/src/java/org/apache/cassandra/service/ActiveRepairService.java
+++ b/src/java/org/apache/cassandra/service/ActiveRepairService.java
@@ -321,30 +321,36 @@ public class ActiveRepairService implements 
IEndpointStateChangeSubscriber, IFai
 }
 else
 {
-status.set(false);
-failedNodes.add(neighbour.getHostAddress());
-prepareLatch.countDown();
+// bailout early to avoid potentially waiting for a long time.
+failRepair(parentRepairSession, "Endpoint not alive: " + 
neighbour);
 }
 }
+
 try
 {
-prepareLatch.await(1, TimeUnit.HOURS);
+// Failed repair is expensive so we wait for longer time.
+if (!prepareLatch.await(1, TimeUnit.HOURS)) {
+failRepair(parentRepairSession, "Did not get replies from all 
endpoints.");
+}
 }
 catch (InterruptedException e)
 {
-removeParentRepairSession(parentRepairSession);
-throw new RuntimeException("Did not get replies from all 
endpoints. List of failed endpoint(s): " + failedNodes.toString(), e);
+failRepair(parentRepairSession, "Interrupted while waiting for 
prepare repair response.");
 }
 
 if (!status.get())
 {
-removeParentRepairSession(parentRepairSession);
-throw new RuntimeException("Did not get positive replies from all 
endpoints. List of failed endpoint(s): " + failedNodes.toString());
+failRepair(parentRepairSession, "Got negative replies from 
endpoints " + failedNodes);
 }
 
 return parentRepairSession;
 }
 
+private void failRepair(UUID parentRepairSession, String errorMsg) {
+removeParentRepairSession(parentRepairSession);
+throw new RuntimeException(errorMsg);
+}
+
 public void registerParentRepairSession(UUID parentRepairSession, 
InetAddress coordinator, List columnFamilyStores, 
Collection ranges, boolean isIncremental, long timestamp, boolean 
isGlobal)
 {
 if (!registeredForEndpointChanges)



[6/9] cassandra git commit: Fail repair if insufficient responses received

2017-04-20 Thread paulo
Fail repair if insufficient responses received

Patch by Simon Zhou; Reviewed by Paulo Motta for CASSANDRA-13397


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

Branch: refs/heads/cassandra-3.0
Commit: f5b36f12df65a780a52851207c285db7a8b4122f
Parents: 175e4f8
Author: Simon Zhou 
Authored: Fri Mar 31 20:53:39 2017 -0700
Committer: Paulo Motta 
Committed: Thu Apr 20 10:26:16 2017 -0300

--
 CHANGES.txt |  1 +
 .../cassandra/service/ActiveRepairService.java  | 22 +---
 2 files changed, 15 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f5b36f12/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 6a1e486..7a860fe 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.14
+ * Fail repair if insufficient responses received (CASSANDRA-13397)
  * Fix SSTableLoader fail when the loaded table contains dropped columns 
(CASSANDRA-13276)
  * Avoid name clashes in CassandraIndexTest (CASSANDRA-13427)
  * Handling partially written hint files (CASSANDRA-12728) 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f5b36f12/src/java/org/apache/cassandra/service/ActiveRepairService.java
--
diff --git a/src/java/org/apache/cassandra/service/ActiveRepairService.java 
b/src/java/org/apache/cassandra/service/ActiveRepairService.java
index 11d4617..b4cea79 100644
--- a/src/java/org/apache/cassandra/service/ActiveRepairService.java
+++ b/src/java/org/apache/cassandra/service/ActiveRepairService.java
@@ -321,30 +321,36 @@ public class ActiveRepairService implements 
IEndpointStateChangeSubscriber, IFai
 }
 else
 {
-status.set(false);
-failedNodes.add(neighbour.getHostAddress());
-prepareLatch.countDown();
+// bailout early to avoid potentially waiting for a long time.
+failRepair(parentRepairSession, "Endpoint not alive: " + 
neighbour);
 }
 }
+
 try
 {
-prepareLatch.await(1, TimeUnit.HOURS);
+// Failed repair is expensive so we wait for longer time.
+if (!prepareLatch.await(1, TimeUnit.HOURS)) {
+failRepair(parentRepairSession, "Did not get replies from all 
endpoints.");
+}
 }
 catch (InterruptedException e)
 {
-removeParentRepairSession(parentRepairSession);
-throw new RuntimeException("Did not get replies from all 
endpoints. List of failed endpoint(s): " + failedNodes.toString(), e);
+failRepair(parentRepairSession, "Interrupted while waiting for 
prepare repair response.");
 }
 
 if (!status.get())
 {
-removeParentRepairSession(parentRepairSession);
-throw new RuntimeException("Did not get positive replies from all 
endpoints. List of failed endpoint(s): " + failedNodes.toString());
+failRepair(parentRepairSession, "Got negative replies from 
endpoints " + failedNodes);
 }
 
 return parentRepairSession;
 }
 
+private void failRepair(UUID parentRepairSession, String errorMsg) {
+removeParentRepairSession(parentRepairSession);
+throw new RuntimeException(errorMsg);
+}
+
 public void registerParentRepairSession(UUID parentRepairSession, 
InetAddress coordinator, List columnFamilyStores, 
Collection ranges, boolean isIncremental, long timestamp, boolean 
isGlobal)
 {
 if (!registeredForEndpointChanges)



[3/9] cassandra git commit: Fix SSTableLoader fail when the loaded table contains dropped columns (CASSANDRA-13276)

2017-04-20 Thread paulo
Fix SSTableLoader fail when the loaded table contains dropped columns 
(CASSANDRA-13276)


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

Branch: refs/heads/trunk
Commit: 42904c65381d69351b130f64f9b2ba2425513a04
Parents: 638df6f
Author: adelapena 
Authored: Thu Apr 20 13:19:25 2017 +0100
Committer: adelapena 
Committed: Thu Apr 20 13:19:25 2017 +0100

--
 CHANGES.txt |  1 +
 .../utils/NativeSSTableLoaderClient.java| 43 +++-
 2 files changed, 34 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/42904c65/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 690c959..b6ca04b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -26,6 +26,7 @@
  * Delete illegal character from StandardTokenizerImpl.jflex (CASSANDRA-13417)
  * Fix cqlsh automatic protocol downgrade regression (CASSANDRA-13307)
 Merged from 3.0:
+ * Fix SSTableLoader fail when the loaded table contains dropped columns 
(CASSANDRA-13276)
  * Avoid name clashes in CassandraIndexTest (CASSANDRA-13427)
  * Handling partially written hint files (CASSANDRA-12728)
  * Interrupt replaying hints on decommission (CASSANDRA-13308)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/42904c65/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java
--
diff --git a/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java 
b/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java
index 0b40fcb..f7fe968 100644
--- a/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java
+++ b/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java
@@ -18,7 +18,9 @@
 package org.apache.cassandra.utils;
 
 import java.net.InetAddress;
+import java.nio.ByteBuffer;
 import java.util.*;
+import java.util.concurrent.TimeUnit;
 
 import com.datastax.driver.core.*;
 
@@ -185,16 +187,29 @@ public class NativeSSTableLoaderClient extends 
SSTableLoader.Client
 for (Row colRow : session.execute(columnsQuery, keyspace, name))
 defs.add(createDefinitionFromRow(colRow, keyspace, name, types));
 
-return CFMetaData.create(keyspace,
- name,
- id,
- isDense,
- isCompound,
- isSuper,
- isCounter,
- isView,
- defs,
- partitioner);
+CFMetaData metadata = CFMetaData.create(keyspace,
+name,
+id,
+isDense,
+isCompound,
+isSuper,
+isCounter,
+isView,
+defs,
+partitioner);
+
+String droppedColumnsQuery = String.format("SELECT * FROM %s.%s WHERE 
keyspace_name = ? AND table_name = ?",
+   
SchemaConstants.SCHEMA_KEYSPACE_NAME,
+   
SchemaKeyspace.DROPPED_COLUMNS);
+Map droppedColumns = new 
HashMap<>();
+for (Row colRow : session.execute(droppedColumnsQuery, keyspace, name))
+{
+CFMetaData.DroppedColumn droppedColumn = 
createDroppedColumnFromRow(colRow, keyspace);
+
droppedColumns.put(UTF8Type.instance.decompose(droppedColumn.name), 
droppedColumn);
+}
+metadata.droppedColumns(droppedColumns);
+
+return metadata;
 }
 
 private static ColumnDefinition createDefinitionFromRow(Row row, String 
keyspace, String table, Types types)
@@ -212,4 +227,12 @@ public class NativeSSTableLoaderClient extends 
SSTableLoader.Client
 ColumnDefinition.Kind kind = 
ColumnDefinition.Kind.valueOf(row.getString("kind").toUpperCase());
 return new ColumnDefinition(keyspace, table, name, type, position, 
kind);
 }
+
+private static CFMetaData.DroppedColumn createDroppedColumnFromRow(Row 
row, String keyspace)
+{
+String name = 

[9/9] cassandra git commit: Merge branch 'cassandra-3.11' into trunk

2017-04-20 Thread paulo
Merge branch 'cassandra-3.11' into trunk


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

Branch: refs/heads/trunk
Commit: 50ba850beb573ae4aa62ac46e645ce48413815ce
Parents: b687641 4d24958
Author: Paulo Motta 
Authored: Thu Apr 20 10:40:22 2017 -0300
Committer: Paulo Motta 
Committed: Thu Apr 20 10:48:37 2017 -0300

--
 CHANGES.txt |  1 +
 .../cassandra/service/ActiveRepairService.java  | 21 
 2 files changed, 14 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/50ba850b/CHANGES.txt
--
diff --cc CHANGES.txt
index db863e1,08df2dd..2710060
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -80,7 -24,9 +80,8 @@@
   * NoReplicationTokenAllocator should work with zero replication factor 
(CASSANDRA-12983)
   * Address message coalescing regression (CASSANDRA-12676)
   * Delete illegal character from StandardTokenizerImpl.jflex (CASSANDRA-13417)
 - * Fix cqlsh automatic protocol downgrade regression (CASSANDRA-13307)
  Merged from 3.0:
+  * Fail repair if insufficient responses received (CASSANDRA-13397)
   * Fix SSTableLoader fail when the loaded table contains dropped columns 
(CASSANDRA-13276)
   * Avoid name clashes in CassandraIndexTest (CASSANDRA-13427)
   * Handling partially written hint files (CASSANDRA-12728)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/50ba850b/src/java/org/apache/cassandra/service/ActiveRepairService.java
--
diff --cc src/java/org/apache/cassandra/service/ActiveRepairService.java
index 381af48,fea690e..c03c470
--- a/src/java/org/apache/cassandra/service/ActiveRepairService.java
+++ b/src/java/org/apache/cassandra/service/ActiveRepairService.java
@@@ -358,14 -324,17 +358,16 @@@ public class ActiveRepairService implem
  }
  else
  {
- status.set(false);
- failedNodes.add(neighbour.getHostAddress());
- prepareLatch.countDown();
+ // bailout early to avoid potentially waiting for a long time.
+ failRepair(parentRepairSession, "Endpoint not alive: " + 
neighbour);
  }
  }
 -
  try
  {
- prepareLatch.await(DatabaseDescriptor.getRpcTimeout(), 
TimeUnit.MILLISECONDS);
+ // Failed repair is expensive so we wait for longer time.
+ if (!prepareLatch.await(1, TimeUnit.HOURS)) {
+ failRepair(parentRepairSession, "Did not get replies from all 
endpoints.");
+ }
  }
  catch (InterruptedException e)
  {
@@@ -382,9 -349,13 +382,14 @@@
  return parentRepairSession;
  }
  
+ private void failRepair(UUID parentRepairSession, String errorMsg) {
+ removeParentRepairSession(parentRepairSession);
+ throw new RuntimeException(errorMsg);
+ }
+ 
 -public void registerParentRepairSession(UUID parentRepairSession, 
InetAddress coordinator, List columnFamilyStores, 
Collection ranges, boolean isIncremental, long timestamp, boolean 
isGlobal)
 +public void registerParentRepairSession(UUID parentRepairSession, 
InetAddress coordinator, List columnFamilyStores, 
Collection ranges, boolean isIncremental, long repairedAt, 
boolean isGlobal)
  {
 +assert isIncremental || repairedAt == 
ActiveRepairService.UNREPAIRED_SSTABLE;
  if (!registeredForEndpointChanges)
  {
  Gossiper.instance.register(this);



[1/9] cassandra git commit: Fix SSTableLoader fail when the loaded table contains dropped columns (CASSANDRA-13276)

2017-04-20 Thread paulo
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.0 175e4f8ce -> f5b36f12d
  refs/heads/cassandra-3.11 42904c653 -> 4d24958dd
  refs/heads/trunk b687641f7 -> 50ba850be


Fix SSTableLoader fail when the loaded table contains dropped columns 
(CASSANDRA-13276)


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

Branch: refs/heads/cassandra-3.11
Commit: 175e4f8ce868ea04a5e11a8d5212d8c397ea0d12
Parents: b063b38
Author: adelapena 
Authored: Thu Apr 20 13:16:15 2017 +0100
Committer: adelapena 
Committed: Thu Apr 20 13:16:15 2017 +0100

--
 CHANGES.txt |  1 +
 .../utils/NativeSSTableLoaderClient.java| 43 +++-
 2 files changed, 34 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/175e4f8c/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 81d5b06..6a1e486 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.14
+ * Fix SSTableLoader fail when the loaded table contains dropped columns 
(CASSANDRA-13276)
  * Avoid name clashes in CassandraIndexTest (CASSANDRA-13427)
  * Handling partially written hint files (CASSANDRA-12728) 
  * Interrupt replaying hints on decommission (CASSANDRA-13308)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/175e4f8c/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java
--
diff --git a/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java 
b/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java
index 4c6b12e..97237d0 100644
--- a/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java
+++ b/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java
@@ -18,7 +18,9 @@
 package org.apache.cassandra.utils;
 
 import java.net.InetAddress;
+import java.nio.ByteBuffer;
 import java.util.*;
+import java.util.concurrent.TimeUnit;
 
 import com.datastax.driver.core.*;
 
@@ -184,16 +186,29 @@ public class NativeSSTableLoaderClient extends 
SSTableLoader.Client
 for (Row colRow : session.execute(columnsQuery, keyspace, name))
 defs.add(createDefinitionFromRow(colRow, keyspace, name, types));
 
-return CFMetaData.create(keyspace,
- name,
- id,
- isDense,
- isCompound,
- isSuper,
- isCounter,
- isView,
- defs,
- partitioner);
+CFMetaData metadata = CFMetaData.create(keyspace,
+name,
+id,
+isDense,
+isCompound,
+isSuper,
+isCounter,
+isView,
+defs,
+partitioner);
+
+String droppedColumnsQuery = String.format("SELECT * FROM %s.%s WHERE 
keyspace_name = ? AND table_name = ?",
+   SchemaKeyspace.NAME,
+   
SchemaKeyspace.DROPPED_COLUMNS);
+Map droppedColumns = new 
HashMap<>();
+for (Row colRow : session.execute(droppedColumnsQuery, keyspace, name))
+{
+CFMetaData.DroppedColumn droppedColumn = 
createDroppedColumnFromRow(colRow, keyspace);
+
droppedColumns.put(UTF8Type.instance.decompose(droppedColumn.name), 
droppedColumn);
+}
+metadata.droppedColumns(droppedColumns);
+
+return metadata;
 }
 
 private static ColumnDefinition createDefinitionFromRow(Row row, String 
keyspace, String table, Types types)
@@ -211,4 +226,12 @@ public class NativeSSTableLoaderClient extends 
SSTableLoader.Client
 ColumnDefinition.Kind kind = 
ColumnDefinition.Kind.valueOf(row.getString("kind").toUpperCase());
 return new ColumnDefinition(keyspace, table, name, type, position, 
kind);
 }
+
+private static CFMetaData.DroppedColumn createDroppedColumnFromRow(Row 
row, String keyspace)
+{
+String name = 

[2/9] cassandra git commit: Fix SSTableLoader fail when the loaded table contains dropped columns (CASSANDRA-13276)

2017-04-20 Thread paulo
Fix SSTableLoader fail when the loaded table contains dropped columns 
(CASSANDRA-13276)


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

Branch: refs/heads/trunk
Commit: 175e4f8ce868ea04a5e11a8d5212d8c397ea0d12
Parents: b063b38
Author: adelapena 
Authored: Thu Apr 20 13:16:15 2017 +0100
Committer: adelapena 
Committed: Thu Apr 20 13:16:15 2017 +0100

--
 CHANGES.txt |  1 +
 .../utils/NativeSSTableLoaderClient.java| 43 +++-
 2 files changed, 34 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/175e4f8c/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 81d5b06..6a1e486 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.14
+ * Fix SSTableLoader fail when the loaded table contains dropped columns 
(CASSANDRA-13276)
  * Avoid name clashes in CassandraIndexTest (CASSANDRA-13427)
  * Handling partially written hint files (CASSANDRA-12728) 
  * Interrupt replaying hints on decommission (CASSANDRA-13308)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/175e4f8c/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java
--
diff --git a/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java 
b/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java
index 4c6b12e..97237d0 100644
--- a/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java
+++ b/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java
@@ -18,7 +18,9 @@
 package org.apache.cassandra.utils;
 
 import java.net.InetAddress;
+import java.nio.ByteBuffer;
 import java.util.*;
+import java.util.concurrent.TimeUnit;
 
 import com.datastax.driver.core.*;
 
@@ -184,16 +186,29 @@ public class NativeSSTableLoaderClient extends 
SSTableLoader.Client
 for (Row colRow : session.execute(columnsQuery, keyspace, name))
 defs.add(createDefinitionFromRow(colRow, keyspace, name, types));
 
-return CFMetaData.create(keyspace,
- name,
- id,
- isDense,
- isCompound,
- isSuper,
- isCounter,
- isView,
- defs,
- partitioner);
+CFMetaData metadata = CFMetaData.create(keyspace,
+name,
+id,
+isDense,
+isCompound,
+isSuper,
+isCounter,
+isView,
+defs,
+partitioner);
+
+String droppedColumnsQuery = String.format("SELECT * FROM %s.%s WHERE 
keyspace_name = ? AND table_name = ?",
+   SchemaKeyspace.NAME,
+   
SchemaKeyspace.DROPPED_COLUMNS);
+Map droppedColumns = new 
HashMap<>();
+for (Row colRow : session.execute(droppedColumnsQuery, keyspace, name))
+{
+CFMetaData.DroppedColumn droppedColumn = 
createDroppedColumnFromRow(colRow, keyspace);
+
droppedColumns.put(UTF8Type.instance.decompose(droppedColumn.name), 
droppedColumn);
+}
+metadata.droppedColumns(droppedColumns);
+
+return metadata;
 }
 
 private static ColumnDefinition createDefinitionFromRow(Row row, String 
keyspace, String table, Types types)
@@ -211,4 +226,12 @@ public class NativeSSTableLoaderClient extends 
SSTableLoader.Client
 ColumnDefinition.Kind kind = 
ColumnDefinition.Kind.valueOf(row.getString("kind").toUpperCase());
 return new ColumnDefinition(keyspace, table, name, type, position, 
kind);
 }
+
+private static CFMetaData.DroppedColumn createDroppedColumnFromRow(Row 
row, String keyspace)
+{
+String name = row.getString("column_name");
+AbstractType type = CQLTypeParser.parse(keyspace, 
row.getString("type"), Types.none());
+long droppedTime = 

[4/9] cassandra git commit: Fail repair if insufficient responses received

2017-04-20 Thread paulo
Fail repair if insufficient responses received

Patch by Simon Zhou; Reviewed by Paulo Motta for CASSANDRA-13397


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

Branch: refs/heads/cassandra-3.11
Commit: f5b36f12df65a780a52851207c285db7a8b4122f
Parents: 175e4f8
Author: Simon Zhou 
Authored: Fri Mar 31 20:53:39 2017 -0700
Committer: Paulo Motta 
Committed: Thu Apr 20 10:26:16 2017 -0300

--
 CHANGES.txt |  1 +
 .../cassandra/service/ActiveRepairService.java  | 22 +---
 2 files changed, 15 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f5b36f12/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 6a1e486..7a860fe 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.14
+ * Fail repair if insufficient responses received (CASSANDRA-13397)
  * Fix SSTableLoader fail when the loaded table contains dropped columns 
(CASSANDRA-13276)
  * Avoid name clashes in CassandraIndexTest (CASSANDRA-13427)
  * Handling partially written hint files (CASSANDRA-12728) 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f5b36f12/src/java/org/apache/cassandra/service/ActiveRepairService.java
--
diff --git a/src/java/org/apache/cassandra/service/ActiveRepairService.java 
b/src/java/org/apache/cassandra/service/ActiveRepairService.java
index 11d4617..b4cea79 100644
--- a/src/java/org/apache/cassandra/service/ActiveRepairService.java
+++ b/src/java/org/apache/cassandra/service/ActiveRepairService.java
@@ -321,30 +321,36 @@ public class ActiveRepairService implements 
IEndpointStateChangeSubscriber, IFai
 }
 else
 {
-status.set(false);
-failedNodes.add(neighbour.getHostAddress());
-prepareLatch.countDown();
+// bailout early to avoid potentially waiting for a long time.
+failRepair(parentRepairSession, "Endpoint not alive: " + 
neighbour);
 }
 }
+
 try
 {
-prepareLatch.await(1, TimeUnit.HOURS);
+// Failed repair is expensive so we wait for longer time.
+if (!prepareLatch.await(1, TimeUnit.HOURS)) {
+failRepair(parentRepairSession, "Did not get replies from all 
endpoints.");
+}
 }
 catch (InterruptedException e)
 {
-removeParentRepairSession(parentRepairSession);
-throw new RuntimeException("Did not get replies from all 
endpoints. List of failed endpoint(s): " + failedNodes.toString(), e);
+failRepair(parentRepairSession, "Interrupted while waiting for 
prepare repair response.");
 }
 
 if (!status.get())
 {
-removeParentRepairSession(parentRepairSession);
-throw new RuntimeException("Did not get positive replies from all 
endpoints. List of failed endpoint(s): " + failedNodes.toString());
+failRepair(parentRepairSession, "Got negative replies from 
endpoints " + failedNodes);
 }
 
 return parentRepairSession;
 }
 
+private void failRepair(UUID parentRepairSession, String errorMsg) {
+removeParentRepairSession(parentRepairSession);
+throw new RuntimeException(errorMsg);
+}
+
 public void registerParentRepairSession(UUID parentRepairSession, 
InetAddress coordinator, List columnFamilyStores, 
Collection ranges, boolean isIncremental, long timestamp, boolean 
isGlobal)
 {
 if (!registeredForEndpointChanges)



[7/9] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.11

2017-04-20 Thread paulo
Merge branch 'cassandra-3.0' into cassandra-3.11


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

Branch: refs/heads/trunk
Commit: 4d24958dd1c2b529cd415d7d8a8d533b5e8db0cb
Parents: 42904c6 f5b36f1
Author: Paulo Motta 
Authored: Thu Apr 20 10:37:00 2017 -0300
Committer: Paulo Motta 
Committed: Thu Apr 20 10:37:00 2017 -0300

--
 CHANGES.txt |  1 +
 .../cassandra/service/ActiveRepairService.java  | 22 +---
 2 files changed, 15 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/4d24958d/CHANGES.txt
--
diff --cc CHANGES.txt
index b6ca04b,7a860fe..08df2dd
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,37 -1,11 +1,38 @@@
 -3.0.14
 +3.11.0
 + * V5 protocol flags decoding broken (CASSANDRA-13443)
 + * Use write lock not read lock for removing sstables from compaction 
strategies. (CASSANDRA-13422)
 + * Use corePoolSize equal to maxPoolSize in JMXEnabledThreadPoolExecutors 
(CASSANDRA-13329)
 + * Avoid rebuilding SASI indexes containing no values (CASSANDRA-12962)
 + * Add charset to Analyser input stream (CASSANDRA-13151)
 + * Fix testLimitSSTables flake caused by concurrent flush (CASSANDRA-12820)
 + * cdc column addition strikes again (CASSANDRA-13382)
 + * Fix static column indexes (CASSANDRA-13277)
 + * DataOutputBuffer.asNewBuffer broken (CASSANDRA-13298)
 + * unittest CipherFactoryTest failed on MacOS (CASSANDRA-13370)
 + * Forbid SELECT restrictions and CREATE INDEX over non-frozen UDT columns 
(CASSANDRA-13247)
 + * Default logging we ship will incorrectly print "?:?" for "%F:%L" pattern 
(CASSANDRA-13317)
 + * Possible AssertionError in UnfilteredRowIteratorWithLowerBound 
(CASSANDRA-13366)
 + * Support unaligned memory access for AArch64 (CASSANDRA-13326)
 + * Improve SASI range iterator efficiency on intersection with an empty range 
(CASSANDRA-12915).
 + * Fix equality comparisons of columns using the duration type 
(CASSANDRA-13174)
 + * Obfuscate password in stress-graphs (CASSANDRA-12233)
 + * Move to FastThreadLocalThread and FastThreadLocal (CASSANDRA-13034)
 + * nodetool stopdaemon errors out (CASSANDRA-13030)
 + * Tables in system_distributed should not use gcgs of 0 (CASSANDRA-12954)
 + * Fix primary index calculation for SASI (CASSANDRA-12910)
 + * More fixes to the TokenAllocator (CASSANDRA-12990)
 + * NoReplicationTokenAllocator should work with zero replication factor 
(CASSANDRA-12983)
 + * Address message coalescing regression (CASSANDRA-12676)
 + * Delete illegal character from StandardTokenizerImpl.jflex (CASSANDRA-13417)
 + * Fix cqlsh automatic protocol downgrade regression (CASSANDRA-13307)
 +Merged from 3.0:
+  * Fail repair if insufficient responses received (CASSANDRA-13397)
   * Fix SSTableLoader fail when the loaded table contains dropped columns 
(CASSANDRA-13276)
   * Avoid name clashes in CassandraIndexTest (CASSANDRA-13427)
 - * Handling partially written hint files (CASSANDRA-12728) 
 + * Handling partially written hint files (CASSANDRA-12728)
   * Interrupt replaying hints on decommission (CASSANDRA-13308)
 -
 -3.0.13
 + * Handling partially written hint files (CASSANDRA-12728)
 + * Fix NPE issue in StorageService (CASSANDRA-13060)
   * Make reading of range tombstones more reliable (CASSANDRA-12811)
   * Fix startup problems due to schema tables not completely flushed 
(CASSANDRA-12213)
   * Fix view builder bug that can filter out data on restart (CASSANDRA-13405)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4d24958d/src/java/org/apache/cassandra/service/ActiveRepairService.java
--



[jira] [Commented] (CASSANDRA-13365) Nodes entering GC loop, does not recover

2017-04-20 Thread Mina Naguib (JIRA)

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

Mina Naguib commented on CASSANDRA-13365:
-

[~jasonstack] [~jjirsa] The workload on the whole cluster falls into one of 
these 3 cases:

1. Full single-row select:
select * from users where key=XXX
High volume, > 1M/s
2. Single column insert:
insert into users (key,column1,column2,column3,value) values (?,?,?,?,?) 
using TTL ?
Low volume, 10k/s
3. Batch loading with sstableloader
Few times a day

We do not do any "analytic"-style workload on the cassandra cluster (no selects 
multiple keys, high limit, etc..).

Also I believe (what's the best way to check ?) that we don't have "fat rows".  
Most rows should average 1k-1.5k

Re concurrent read threads, if you mean the `concurrent_reads` setting, it's a 
reasonable 32

Re sjk-plus/jvm-tools, I wasn't aware of it.  I'll give it a shot, but if it 
relies on JMX being cooperative I don't know if I'll have much luck when a node 
gets stuck (from my experience the JVM is too busy stuck to do any real work, 
including answering JMX queries).  Will report back.

> Nodes entering GC loop, does not recover
> 
>
> Key: CASSANDRA-13365
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13365
> Project: Cassandra
>  Issue Type: Bug
> Environment: 34-node cluster over 4 DCs
> Linux CentOS 7.2 x86
> Mix of 64GB/128GB RAM / node
> Mix of 32/40 hardware threads / node, Xeon ~2.4Ghz
> High read volume, low write volume, occasional sstable bulk loading
>Reporter: Mina Naguib
>
> Over the last week we've been observing two related problems affecting our 
> Cassandra cluster
> Problem 1: 1-few nodes per DC entering GC loop, not recovering
> Checking the heap usage stats, there's a sudden jump of 1-3GB. Some nodes 
> recover, but some don't and log this:
> {noformat}
> 2017-03-21T11:23:02.957-0400: 54099.519: [Full GC (Allocation Failure)  
> 13G->11G(14G), 29.4127307 secs]
> 2017-03-21T11:23:45.270-0400: 54141.833: [Full GC (Allocation Failure)  
> 13G->12G(14G), 28.1561881 secs]
> 2017-03-21T11:24:20.307-0400: 54176.869: [Full GC (Allocation Failure)  
> 13G->13G(14G), 27.7019501 secs]
> 2017-03-21T11:24:50.528-0400: 54207.090: [Full GC (Allocation Failure)  
> 13G->13G(14G), 27.1372267 secs]
> 2017-03-21T11:25:19.190-0400: 54235.752: [Full GC (Allocation Failure)  
> 13G->13G(14G), 27.0703975 secs]
> 2017-03-21T11:25:46.711-0400: 54263.273: [Full GC (Allocation Failure)  
> 13G->13G(14G), 27.3187768 secs]
> 2017-03-21T11:26:15.419-0400: 54291.981: [Full GC (Allocation Failure)  
> 13G->13G(14G), 26.9493405 secs]
> 2017-03-21T11:26:43.399-0400: 54319.961: [Full GC (Allocation Failure)  
> 13G->13G(14G), 27.5222085 secs]
> 2017-03-21T11:27:11.383-0400: 54347.945: [Full GC (Allocation Failure)  
> 13G->13G(14G), 27.1769581 secs]
> 2017-03-21T11:27:40.174-0400: 54376.737: [Full GC (Allocation Failure)  
> 13G->13G(14G), 27.4639031 secs]
> 2017-03-21T11:28:08.946-0400: 54405.508: [Full GC (Allocation Failure)  
> 13G->13G(14G), 30.3480523 secs]
> 2017-03-21T11:28:40.117-0400: 54436.680: [Full GC (Allocation Failure)  
> 13G->13G(14G), 27.8220513 secs]
> 2017-03-21T11:29:08.459-0400: 54465.022: [Full GC (Allocation Failure)  
> 13G->13G(14G), 27.4691271 secs]
> 2017-03-21T11:29:37.114-0400: 54493.676: [Full GC (Allocation Failure)  
> 13G->13G(14G), 27.0275733 secs]
> 2017-03-21T11:30:04.635-0400: 54521.198: [Full GC (Allocation Failure)  
> 13G->13G(14G), 27.1902627 secs]
> 2017-03-21T11:30:32.114-0400: 54548.676: [Full GC (Allocation Failure)  
> 13G->13G(14G), 27.8872850 secs]
> 2017-03-21T11:31:01.430-0400: 54577.993: [Full GC (Allocation Failure)  
> 13G->13G(14G), 27.1609706 secs]
> 2017-03-21T11:31:29.024-0400: 54605.587: [Full GC (Allocation Failure)  
> 13G->13G(14G), 27.3635138 secs]
> 2017-03-21T11:31:57.303-0400: 54633.865: [Full GC (Allocation Failure)  
> 13G->13G(14G), 27.4143510 secs]
> 2017-03-21T11:32:25.110-0400: 54661.672: [Full GC (Allocation Failure)  
> 13G->13G(14G), 27.8595986 secs]
> 2017-03-21T11:32:53.922-0400: 54690.485: [Full GC (Allocation Failure)  
> 13G->13G(14G), 27.5242543 secs]
> 2017-03-21T11:33:21.867-0400: 54718.429: [Full GC (Allocation Failure)  
> 13G->13G(14G), 30.8930130 secs]
> 2017-03-21T11:33:53.712-0400: 54750.275: [Full GC (Allocation Failure)  
> 13G->13G(14G), 27.6523013 secs]
> 2017-03-21T11:34:21.760-0400: 54778.322: [Full GC (Allocation Failure)  
> 13G->13G(14G), 27.3030198 secs]
> 2017-03-21T11:34:50.073-0400: 54806.635: [Full GC (Allocation Failure)  
> 13G->13G(14G), 27.1594154 secs]
> 2017-03-21T11:35:17.743-0400: 54834.306: [Full GC (Allocation Failure)  
> 13G->13G(14G), 27.3766949 secs]
> 2017-03-21T11:35:45.797-0400: 54862.360: [Full GC (Allocation Failure)  
> 13G->13G(14G), 

[jira] [Commented] (CASSANDRA-13276) Regression on CASSANDRA-11416: can't load snapshots of tables with dropped columns

2017-04-20 Thread JIRA

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

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

Committed:

||3.0|[175e4f8ce868ea04a5e11a8d5212d8c397ea0d12|https://github.com/apache/cassandra/commit/175e4f8ce868ea04a5e11a8d5212d8c397ea0d12]||
||3.11|[42904c65381d69351b130f64f9b2ba2425513a04|https://github.com/apache/cassandra/commit/42904c65381d69351b130f64f9b2ba2425513a04]||
||trunk|[b687641f78c85f266bae2475da8622c06c39dd0f|https://github.com/apache/cassandra/commit/b687641f78c85f266bae2475da8622c06c39dd0f]||

Thanks for the review.

> Regression on CASSANDRA-11416: can't load snapshots of tables with dropped 
> columns
> --
>
> Key: CASSANDRA-13276
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13276
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Matt Kopit
>Assignee: Andrés de la Peña
> Fix For: 3.0.x, 3.11.x, 4.x
>
>
> I'm running Cassandra 3.10 and running into the exact same issue described in 
> CASSANDRA-11416: 
> 1. A table is created with columns 'a' and 'b'
> 2. Data is written to the table
> 3. Drop column 'b'
> 4. Take a snapshot
> 5. Drop the table
> 6. Run the snapshot schema.cql to recreate the table and the run the alter
> 7. Try to restore the snapshot data using sstableloader
> sstableloader yields the error:
> java.lang.RuntimeException: Unknown column b during deserialization



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[3/3] cassandra git commit: Fix SSTableLoader fail when the loaded table contains dropped columns (CASSANDRA-13276)

2017-04-20 Thread adelapena
Fix SSTableLoader fail when the loaded table contains dropped columns 
(CASSANDRA-13276)


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

Branch: refs/heads/trunk
Commit: b687641f78c85f266bae2475da8622c06c39dd0f
Parents: 90e5078
Author: adelapena 
Authored: Thu Apr 20 13:20:53 2017 +0100
Committer: adelapena 
Committed: Thu Apr 20 13:20:53 2017 +0100

--
 CHANGES.txt |  1 +
 .../utils/NativeSSTableLoaderClient.java| 22 
 2 files changed, 23 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b687641f/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index d462ed1..db863e1 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -81,6 +81,7 @@
  * Address message coalescing regression (CASSANDRA-12676)
  * Delete illegal character from StandardTokenizerImpl.jflex (CASSANDRA-13417)
 Merged from 3.0:
+ * Fix SSTableLoader fail when the loaded table contains dropped columns 
(CASSANDRA-13276)
  * Avoid name clashes in CassandraIndexTest (CASSANDRA-13427)
  * Handling partially written hint files (CASSANDRA-12728)
  * Interrupt replaying hints on decommission (CASSANDRA-13308)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b687641f/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java
--
diff --git a/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java 
b/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java
index ba702dd..84a4c32 100644
--- a/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java
+++ b/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java
@@ -18,6 +18,7 @@
 package org.apache.cassandra.utils;
 
 import java.net.InetAddress;
+import java.nio.ByteBuffer;
 import java.util.*;
 
 import com.datastax.driver.core.*;
@@ -176,6 +177,17 @@ public class NativeSSTableLoaderClient extends 
SSTableLoader.Client
 for (Row colRow : session.execute(columnsQuery, keyspace, name))
 builder.addColumn(createDefinitionFromRow(colRow, keyspace, name, 
types));
 
+String droppedColumnsQuery = String.format("SELECT * FROM %s.%s WHERE 
keyspace_name = ? AND table_name = ?",
+   
SchemaConstants.SCHEMA_KEYSPACE_NAME,
+   
SchemaKeyspace.DROPPED_COLUMNS);
+Map droppedColumns = new HashMap<>();
+for (Row colRow : session.execute(droppedColumnsQuery, keyspace, name))
+{
+DroppedColumn droppedColumn = createDroppedColumnFromRow(colRow, 
keyspace, name);
+droppedColumns.put(droppedColumn.column.name.bytes, droppedColumn);
+}
+builder.droppedColumns(droppedColumns);
+
 return TableMetadataRef.forOfflineTools(builder.build());
 }
 
@@ -194,4 +206,14 @@ public class NativeSSTableLoaderClient extends 
SSTableLoader.Client
 org.apache.cassandra.schema.ColumnMetadata.Kind kind = 
ColumnMetadata.Kind.valueOf(row.getString("kind").toUpperCase());
 return new ColumnMetadata(keyspace, table, name, type, position, kind);
 }
+
+private static DroppedColumn createDroppedColumnFromRow(Row row, String 
keyspace, String table)
+{
+String name = row.getString("column_name");
+AbstractType type = CQLTypeParser.parse(keyspace, 
row.getString("type"), Types.none());
+ColumnMetadata.Kind kind = 
ColumnMetadata.Kind.valueOf(row.getString("kind").toUpperCase());
+ColumnMetadata column = new ColumnMetadata(keyspace, table, 
ColumnIdentifier.getInterned(name, true), type, ColumnMetadata.NO_POSITION, 
kind);
+long droppedTime = row.getTimestamp("dropped_time").getTime();
+return new DroppedColumn(column, droppedTime);
+}
 }



[1/3] cassandra git commit: Fix SSTableLoader fail when the loaded table contains dropped columns (CASSANDRA-13276)

2017-04-20 Thread adelapena
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.0 b063b38f3 -> 175e4f8ce
  refs/heads/cassandra-3.11 638df6f97 -> 42904c653
  refs/heads/trunk 90e507896 -> b687641f7


Fix SSTableLoader fail when the loaded table contains dropped columns 
(CASSANDRA-13276)


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

Branch: refs/heads/cassandra-3.0
Commit: 175e4f8ce868ea04a5e11a8d5212d8c397ea0d12
Parents: b063b38
Author: adelapena 
Authored: Thu Apr 20 13:16:15 2017 +0100
Committer: adelapena 
Committed: Thu Apr 20 13:16:15 2017 +0100

--
 CHANGES.txt |  1 +
 .../utils/NativeSSTableLoaderClient.java| 43 +++-
 2 files changed, 34 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/175e4f8c/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 81d5b06..6a1e486 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.14
+ * Fix SSTableLoader fail when the loaded table contains dropped columns 
(CASSANDRA-13276)
  * Avoid name clashes in CassandraIndexTest (CASSANDRA-13427)
  * Handling partially written hint files (CASSANDRA-12728) 
  * Interrupt replaying hints on decommission (CASSANDRA-13308)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/175e4f8c/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java
--
diff --git a/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java 
b/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java
index 4c6b12e..97237d0 100644
--- a/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java
+++ b/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java
@@ -18,7 +18,9 @@
 package org.apache.cassandra.utils;
 
 import java.net.InetAddress;
+import java.nio.ByteBuffer;
 import java.util.*;
+import java.util.concurrent.TimeUnit;
 
 import com.datastax.driver.core.*;
 
@@ -184,16 +186,29 @@ public class NativeSSTableLoaderClient extends 
SSTableLoader.Client
 for (Row colRow : session.execute(columnsQuery, keyspace, name))
 defs.add(createDefinitionFromRow(colRow, keyspace, name, types));
 
-return CFMetaData.create(keyspace,
- name,
- id,
- isDense,
- isCompound,
- isSuper,
- isCounter,
- isView,
- defs,
- partitioner);
+CFMetaData metadata = CFMetaData.create(keyspace,
+name,
+id,
+isDense,
+isCompound,
+isSuper,
+isCounter,
+isView,
+defs,
+partitioner);
+
+String droppedColumnsQuery = String.format("SELECT * FROM %s.%s WHERE 
keyspace_name = ? AND table_name = ?",
+   SchemaKeyspace.NAME,
+   
SchemaKeyspace.DROPPED_COLUMNS);
+Map droppedColumns = new 
HashMap<>();
+for (Row colRow : session.execute(droppedColumnsQuery, keyspace, name))
+{
+CFMetaData.DroppedColumn droppedColumn = 
createDroppedColumnFromRow(colRow, keyspace);
+
droppedColumns.put(UTF8Type.instance.decompose(droppedColumn.name), 
droppedColumn);
+}
+metadata.droppedColumns(droppedColumns);
+
+return metadata;
 }
 
 private static ColumnDefinition createDefinitionFromRow(Row row, String 
keyspace, String table, Types types)
@@ -211,4 +226,12 @@ public class NativeSSTableLoaderClient extends 
SSTableLoader.Client
 ColumnDefinition.Kind kind = 
ColumnDefinition.Kind.valueOf(row.getString("kind").toUpperCase());
 return new ColumnDefinition(keyspace, table, name, type, position, 
kind);
 }
+
+private static CFMetaData.DroppedColumn createDroppedColumnFromRow(Row 
row, String keyspace)
+{
+String name = 

[2/3] cassandra git commit: Fix SSTableLoader fail when the loaded table contains dropped columns (CASSANDRA-13276)

2017-04-20 Thread adelapena
Fix SSTableLoader fail when the loaded table contains dropped columns 
(CASSANDRA-13276)


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

Branch: refs/heads/cassandra-3.11
Commit: 42904c65381d69351b130f64f9b2ba2425513a04
Parents: 638df6f
Author: adelapena 
Authored: Thu Apr 20 13:19:25 2017 +0100
Committer: adelapena 
Committed: Thu Apr 20 13:19:25 2017 +0100

--
 CHANGES.txt |  1 +
 .../utils/NativeSSTableLoaderClient.java| 43 +++-
 2 files changed, 34 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/42904c65/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 690c959..b6ca04b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -26,6 +26,7 @@
  * Delete illegal character from StandardTokenizerImpl.jflex (CASSANDRA-13417)
  * Fix cqlsh automatic protocol downgrade regression (CASSANDRA-13307)
 Merged from 3.0:
+ * Fix SSTableLoader fail when the loaded table contains dropped columns 
(CASSANDRA-13276)
  * Avoid name clashes in CassandraIndexTest (CASSANDRA-13427)
  * Handling partially written hint files (CASSANDRA-12728)
  * Interrupt replaying hints on decommission (CASSANDRA-13308)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/42904c65/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java
--
diff --git a/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java 
b/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java
index 0b40fcb..f7fe968 100644
--- a/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java
+++ b/src/java/org/apache/cassandra/utils/NativeSSTableLoaderClient.java
@@ -18,7 +18,9 @@
 package org.apache.cassandra.utils;
 
 import java.net.InetAddress;
+import java.nio.ByteBuffer;
 import java.util.*;
+import java.util.concurrent.TimeUnit;
 
 import com.datastax.driver.core.*;
 
@@ -185,16 +187,29 @@ public class NativeSSTableLoaderClient extends 
SSTableLoader.Client
 for (Row colRow : session.execute(columnsQuery, keyspace, name))
 defs.add(createDefinitionFromRow(colRow, keyspace, name, types));
 
-return CFMetaData.create(keyspace,
- name,
- id,
- isDense,
- isCompound,
- isSuper,
- isCounter,
- isView,
- defs,
- partitioner);
+CFMetaData metadata = CFMetaData.create(keyspace,
+name,
+id,
+isDense,
+isCompound,
+isSuper,
+isCounter,
+isView,
+defs,
+partitioner);
+
+String droppedColumnsQuery = String.format("SELECT * FROM %s.%s WHERE 
keyspace_name = ? AND table_name = ?",
+   
SchemaConstants.SCHEMA_KEYSPACE_NAME,
+   
SchemaKeyspace.DROPPED_COLUMNS);
+Map droppedColumns = new 
HashMap<>();
+for (Row colRow : session.execute(droppedColumnsQuery, keyspace, name))
+{
+CFMetaData.DroppedColumn droppedColumn = 
createDroppedColumnFromRow(colRow, keyspace);
+
droppedColumns.put(UTF8Type.instance.decompose(droppedColumn.name), 
droppedColumn);
+}
+metadata.droppedColumns(droppedColumns);
+
+return metadata;
 }
 
 private static ColumnDefinition createDefinitionFromRow(Row row, String 
keyspace, String table, Types types)
@@ -212,4 +227,12 @@ public class NativeSSTableLoaderClient extends 
SSTableLoader.Client
 ColumnDefinition.Kind kind = 
ColumnDefinition.Kind.valueOf(row.getString("kind").toUpperCase());
 return new ColumnDefinition(keyspace, table, name, type, position, 
kind);
 }
+
+private static CFMetaData.DroppedColumn createDroppedColumnFromRow(Row 
row, String keyspace)
+{
+String name = 

[jira] [Updated] (CASSANDRA-13407) test failure at RemoveTest.testBadHostId

2017-04-20 Thread Alex Petrov (JIRA)

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

Alex Petrov updated CASSANDRA-13407:

Resolution: Fixed
Status: Resolved  (was: Ready to Commit)

> test failure at RemoveTest.testBadHostId
> 
>
> Key: CASSANDRA-13407
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13407
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Alex Petrov
>Assignee: Alex Petrov
>
> Example trace:
> {code}
> java.lang.NullPointerException
>   at org.apache.cassandra.gms.Gossiper.getHostId(Gossiper.java:881)
>   at org.apache.cassandra.gms.Gossiper.getHostId(Gossiper.java:876)
>   at 
> org.apache.cassandra.service.StorageService.handleStateNormal(StorageService.java:2201)
>   at 
> org.apache.cassandra.service.StorageService.onChange(StorageService.java:1855)
>   at org.apache.cassandra.Util.createInitialRing(Util.java:216)
>   at org.apache.cassandra.service.RemoveTest.setup(RemoveTest.java:89)
> {code} 
> [failure 
> example|https://cassci.datastax.com/job/trunk_testall/1491/testReport/org.apache.cassandra.service/RemoveTest/testBadHostId/]
> [history|https://cassci.datastax.com/job/trunk_testall/lastCompletedBuild/testReport/org.apache.cassandra.service/RemoveTest/testBadHostId/history/]



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13407) test failure at RemoveTest.testBadHostId

2017-04-20 Thread Alex Petrov (JIRA)

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

Alex Petrov commented on CASSANDRA-13407:
-

Committed to 2.2 as 
[31590f5da10de8bbcf36d19617ced02b37be2a57|https://github.com/apache/cassandra/commit/31590f5da10de8bbcf36d19617ced02b37be2a57]
 and merged up to 
[3.0|https://github.com/apache/cassandra/commit/b063b38f33474cd0687167599a3a8cec7ed82631],
 
[3.11|https://github.com/apache/cassandra/commit/638df6f971b806460113031524e14b21ae3e20f8]
 and 
[trunk|https://github.com/apache/cassandra/commit/90e50789680c8d386a57884a0d58ee62e5f4e73d].

> test failure at RemoveTest.testBadHostId
> 
>
> Key: CASSANDRA-13407
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13407
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Alex Petrov
>Assignee: Alex Petrov
>
> Example trace:
> {code}
> java.lang.NullPointerException
>   at org.apache.cassandra.gms.Gossiper.getHostId(Gossiper.java:881)
>   at org.apache.cassandra.gms.Gossiper.getHostId(Gossiper.java:876)
>   at 
> org.apache.cassandra.service.StorageService.handleStateNormal(StorageService.java:2201)
>   at 
> org.apache.cassandra.service.StorageService.onChange(StorageService.java:1855)
>   at org.apache.cassandra.Util.createInitialRing(Util.java:216)
>   at org.apache.cassandra.service.RemoveTest.setup(RemoveTest.java:89)
> {code} 
> [failure 
> example|https://cassci.datastax.com/job/trunk_testall/1491/testReport/org.apache.cassandra.service/RemoveTest/testBadHostId/]
> [history|https://cassci.datastax.com/job/trunk_testall/lastCompletedBuild/testReport/org.apache.cassandra.service/RemoveTest/testBadHostId/history/]



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[06/10] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0

2017-04-20 Thread ifesdjeen
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/b063b38f
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b063b38f
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b063b38f

Branch: refs/heads/cassandra-3.0
Commit: b063b38f33474cd0687167599a3a8cec7ed82631
Parents: e5c2a18 31590f5
Author: Alex Petrov 
Authored: Thu Apr 20 11:44:58 2017 +0200
Committer: Alex Petrov 
Committed: Thu Apr 20 11:44:58 2017 +0200

--
 CHANGES.txt| 1 +
 test/unit/org/apache/cassandra/service/RemoveTest.java | 4 +---
 2 files changed, 2 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b063b38f/CHANGES.txt
--
diff --cc CHANGES.txt
index 11881e9,33c24ad..81d5b06
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,31 -1,7 +1,32 @@@
 -2.2.10
 +3.0.14
 + * Avoid name clashes in CassandraIndexTest (CASSANDRA-13427)
 + * Handling partially written hint files (CASSANDRA-12728) 
 + * Interrupt replaying hints on decommission (CASSANDRA-13308)
 +
 +3.0.13
 + * Make reading of range tombstones more reliable (CASSANDRA-12811)
 + * Fix startup problems due to schema tables not completely flushed 
(CASSANDRA-12213)
 + * Fix view builder bug that can filter out data on restart (CASSANDRA-13405)
 + * Fix 2i page size calculation when there are no regular columns 
(CASSANDRA-13400)
 + * Fix the conversion of 2.X expired rows without regular column data 
(CASSANDRA-13395)
 + * Fix hint delivery when using ext+internal IPs with prefer_local enabled 
(CASSANDRA-13020)
 + * Fix possible NPE on upgrade to 3.0/3.X in case of IO errors 
(CASSANDRA-13389)
 + * Legacy deserializer can create empty range tombstones (CASSANDRA-13341)
 + * Use the Kernel32 library to retrieve the PID on Windows and fix startup 
checks (CASSANDRA-1)
 + * Fix code to not exchange schema across major versions (CASSANDRA-13274)
 + * Dropping column results in "corrupt" SSTable (CASSANDRA-13337)
 + * Bugs handling range tombstones in the sstable iterators (CASSANDRA-13340)
 + * Fix CONTAINS filtering for null collections (CASSANDRA-13246)
 + * Applying: Use a unique metric reservoir per test run when using 
Cassandra-wide metrics residing in MBeans (CASSANDRA-13216)
 + * Propagate row deletions in 2i tables on upgrade (CASSANDRA-13320)
 + * Slice.isEmpty() returns false for some empty slices (CASSANDRA-13305)
 + * Add formatted row output to assertEmpty in CQL Tester (CASSANDRA-13238)
 + * Legacy caching options can prevent 3.0 upgrade (CASSANDRA-13384)
 + * Nodetool upgradesstables/scrub/compact ignores system tables 
(CASSANDRA-13410)
 + * Fix NPE issue in StorageService (CASSANDRA-13060)
 +Merged from 2.2:
+  * Avoid starting gossiper in RemoveTest (CASSANDRA-13407)
   * Fix weightedSize() for row-cache reported by JMX and NodeTool 
(CASSANDRA-13393)
 - * Fix JVM metric paths (CASSANDRA-13103)
   * Honor truststore-password parameter in cassandra-stress (CASSANDRA-12773)
   * Discard in-flight shadow round responses (CASSANDRA-12653)
   * Don't anti-compact repaired data to avoid inconsistencies (CASSANDRA-13153)



[10/10] cassandra git commit: Merge branch 'cassandra-3.11' into trunk

2017-04-20 Thread ifesdjeen
Merge branch 'cassandra-3.11' into trunk


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

Branch: refs/heads/trunk
Commit: 90e50789680c8d386a57884a0d58ee62e5f4e73d
Parents: 37f5005 638df6f
Author: Alex Petrov 
Authored: Thu Apr 20 11:48:25 2017 +0200
Committer: Alex Petrov 
Committed: Thu Apr 20 11:48:25 2017 +0200

--
 CHANGES.txt| 1 +
 test/unit/org/apache/cassandra/service/RemoveTest.java | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)
--


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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/90e50789/test/unit/org/apache/cassandra/service/RemoveTest.java
--



[09/10] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.11

2017-04-20 Thread ifesdjeen
Merge branch 'cassandra-3.0' into cassandra-3.11


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

Branch: refs/heads/trunk
Commit: 638df6f971b806460113031524e14b21ae3e20f8
Parents: fc83418 b063b38
Author: Alex Petrov 
Authored: Thu Apr 20 11:48:12 2017 +0200
Committer: Alex Petrov 
Committed: Thu Apr 20 11:48:12 2017 +0200

--
 CHANGES.txt| 1 +
 test/unit/org/apache/cassandra/service/RemoveTest.java | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/638df6f9/CHANGES.txt
--
diff --cc CHANGES.txt
index 8a2926b,81d5b06..690c959
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -49,31 -21,12 +49,32 @@@ Merged from 3.0
   * Propagate row deletions in 2i tables on upgrade (CASSANDRA-13320)
   * Slice.isEmpty() returns false for some empty slices (CASSANDRA-13305)
   * Add formatted row output to assertEmpty in CQL Tester (CASSANDRA-13238)
 - * Legacy caching options can prevent 3.0 upgrade (CASSANDRA-13384)
 + * Prevent data loss on upgrade 2.1 - 3.0 by adding component separator to 
LogRecord absolute path (CASSANDRA-13294)
 + * Improve testing on macOS by eliminating sigar logging (CASSANDRA-13233)
 + * Cqlsh copy-from should error out when csv contains invalid data for 
collections (CASSANDRA-13071)
 + * Fix "multiple versions of ant detected..." when running ant test 
(CASSANDRA-13232)
 + * Coalescing strategy sleeps too much (CASSANDRA-13090)
 + * Faster StreamingHistogram (CASSANDRA-13038)
 + * Legacy deserializer can create unexpected boundary range tombstones 
(CASSANDRA-13237)
 + * Remove unnecessary assertion from AntiCompactionTest (CASSANDRA-13070)
 + * Fix cqlsh COPY for dates before 1900 (CASSANDRA-13185)
 + * Use keyspace replication settings on system.size_estimates table 
(CASSANDRA-9639)
 + * Add vm.max_map_count StartupCheck (CASSANDRA-13008)
 + * Hint related logging should include the IP address of the destination in 
addition to
 +   host ID (CASSANDRA-13205)
 + * Reloading logback.xml does not work (CASSANDRA-13173)
 + * Lightweight transactions temporarily fail after upgrade from 2.1 to 3.0 
(CASSANDRA-13109)
 + * Duplicate rows after upgrading from 2.1.16 to 3.0.10/3.9 (CASSANDRA-13125)
 + * Fix UPDATE queries with empty IN restrictions (CASSANDRA-13152)
 + * Fix handling of partition with partition-level deletion plus
 +   live rows in sstabledump (CASSANDRA-13177)
 + * Provide user workaround when system_schema.columns does not contain entries
 +   for a table that's in system_schema.tables (CASSANDRA-13180)
   * Nodetool upgradesstables/scrub/compact ignores system tables 
(CASSANDRA-13410)
 - * Fix NPE issue in StorageService (CASSANDRA-13060)
  Merged from 2.2:
+  * Avoid starting gossiper in RemoveTest (CASSANDRA-13407)
   * Fix weightedSize() for row-cache reported by JMX and NodeTool 
(CASSANDRA-13393)
 + * Fix JVM metric names (CASSANDRA-13103)
   * Honor truststore-password parameter in cassandra-stress (CASSANDRA-12773)
   * Discard in-flight shadow round responses (CASSANDRA-12653)
   * Don't anti-compact repaired data to avoid inconsistencies (CASSANDRA-13153)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/638df6f9/test/unit/org/apache/cassandra/service/RemoveTest.java
--
diff --cc test/unit/org/apache/cassandra/service/RemoveTest.java
index 701ea0f,800c904..f4b203c
--- a/test/unit/org/apache/cassandra/service/RemoveTest.java
+++ b/test/unit/org/apache/cassandra/service/RemoveTest.java
@@@ -30,10 -29,8 +30,9 @@@ import java.util.concurrent.atomic.Atom
  
  import org.junit.*;
  
--import org.apache.cassandra.SchemaLoader;
  import org.apache.cassandra.Util;
 +import org.apache.cassandra.concurrent.NamedThreadFactory;
 +import org.apache.cassandra.config.DatabaseDescriptor;
  import org.apache.cassandra.dht.IPartitioner;
  import org.apache.cassandra.dht.RandomPartitioner;
  import org.apache.cassandra.dht.Token;
@@@ -71,7 -60,7 +70,6 @@@ public class RemoveTes
  public static void setupClass() throws ConfigurationException
  {
  oldPartitioner = 
StorageService.instance.setPartitionerUnsafe(partitioner);
- SchemaLoader.loadSchema();
 -SchemaLoader.prepareServer();
  }
  
  @AfterClass



[02/10] cassandra git commit: Avoid starting gossiper in RemoveTest

2017-04-20 Thread ifesdjeen
Avoid starting gossiper in RemoveTest

Patch by Alex Petrov; reviewed by Joel Knighton for CASSANDRA-13407


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

Branch: refs/heads/cassandra-3.0
Commit: 31590f5da10de8bbcf36d19617ced02b37be2a57
Parents: 590e151
Author: Alex Petrov 
Authored: Fri Apr 7 10:32:54 2017 +0200
Committer: Alex Petrov 
Committed: Thu Apr 20 11:40:53 2017 +0200

--
 CHANGES.txt| 1 +
 test/unit/org/apache/cassandra/service/RemoveTest.java | 4 +---
 2 files changed, 2 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/31590f5d/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 366db50..33c24ad 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.10
+ * Avoid starting gossiper in RemoveTest (CASSANDRA-13407)
  * Fix weightedSize() for row-cache reported by JMX and NodeTool 
(CASSANDRA-13393)
  * Fix JVM metric paths (CASSANDRA-13103)
  * Honor truststore-password parameter in cassandra-stress (CASSANDRA-12773)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/31590f5d/test/unit/org/apache/cassandra/service/RemoveTest.java
--
diff --git a/test/unit/org/apache/cassandra/service/RemoveTest.java 
b/test/unit/org/apache/cassandra/service/RemoveTest.java
index 9f1d6a8..800c904 100644
--- a/test/unit/org/apache/cassandra/service/RemoveTest.java
+++ b/test/unit/org/apache/cassandra/service/RemoveTest.java
@@ -35,7 +35,6 @@ import org.apache.cassandra.dht.IPartitioner;
 import org.apache.cassandra.dht.RandomPartitioner;
 import org.apache.cassandra.dht.Token;
 import org.apache.cassandra.exceptions.ConfigurationException;
-import org.apache.cassandra.gms.Gossiper;
 import org.apache.cassandra.locator.TokenMetadata;
 import org.apache.cassandra.net.MessageOut;
 import org.apache.cassandra.net.MessagingService;
@@ -61,7 +60,7 @@ public class RemoveTest
 public static void setupClass() throws ConfigurationException
 {
 oldPartitioner = 
StorageService.instance.setPartitionerUnsafe(partitioner);
-SchemaLoader.loadSchema();
+SchemaLoader.prepareServer();
 }
 
 @AfterClass
@@ -79,7 +78,6 @@ public class RemoveTest
 Util.createInitialRing(ss, partitioner, endpointTokens, keyTokens, 
hosts, hostIds, 6);
 
 MessagingService.instance().listen();
-Gossiper.instance.start(1);
 removalhost = hosts.get(5);
 hosts.remove(removalhost);
 removalId = hostIds.get(5);



[04/10] cassandra git commit: Avoid starting gossiper in RemoveTest

2017-04-20 Thread ifesdjeen
Avoid starting gossiper in RemoveTest

Patch by Alex Petrov; reviewed by Joel Knighton for CASSANDRA-13407


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

Branch: refs/heads/trunk
Commit: 31590f5da10de8bbcf36d19617ced02b37be2a57
Parents: 590e151
Author: Alex Petrov 
Authored: Fri Apr 7 10:32:54 2017 +0200
Committer: Alex Petrov 
Committed: Thu Apr 20 11:40:53 2017 +0200

--
 CHANGES.txt| 1 +
 test/unit/org/apache/cassandra/service/RemoveTest.java | 4 +---
 2 files changed, 2 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/31590f5d/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 366db50..33c24ad 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.10
+ * Avoid starting gossiper in RemoveTest (CASSANDRA-13407)
  * Fix weightedSize() for row-cache reported by JMX and NodeTool 
(CASSANDRA-13393)
  * Fix JVM metric paths (CASSANDRA-13103)
  * Honor truststore-password parameter in cassandra-stress (CASSANDRA-12773)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/31590f5d/test/unit/org/apache/cassandra/service/RemoveTest.java
--
diff --git a/test/unit/org/apache/cassandra/service/RemoveTest.java 
b/test/unit/org/apache/cassandra/service/RemoveTest.java
index 9f1d6a8..800c904 100644
--- a/test/unit/org/apache/cassandra/service/RemoveTest.java
+++ b/test/unit/org/apache/cassandra/service/RemoveTest.java
@@ -35,7 +35,6 @@ import org.apache.cassandra.dht.IPartitioner;
 import org.apache.cassandra.dht.RandomPartitioner;
 import org.apache.cassandra.dht.Token;
 import org.apache.cassandra.exceptions.ConfigurationException;
-import org.apache.cassandra.gms.Gossiper;
 import org.apache.cassandra.locator.TokenMetadata;
 import org.apache.cassandra.net.MessageOut;
 import org.apache.cassandra.net.MessagingService;
@@ -61,7 +60,7 @@ public class RemoveTest
 public static void setupClass() throws ConfigurationException
 {
 oldPartitioner = 
StorageService.instance.setPartitionerUnsafe(partitioner);
-SchemaLoader.loadSchema();
+SchemaLoader.prepareServer();
 }
 
 @AfterClass
@@ -79,7 +78,6 @@ public class RemoveTest
 Util.createInitialRing(ss, partitioner, endpointTokens, keyTokens, 
hosts, hostIds, 6);
 
 MessagingService.instance().listen();
-Gossiper.instance.start(1);
 removalhost = hosts.get(5);
 hosts.remove(removalhost);
 removalId = hostIds.get(5);



[03/10] cassandra git commit: Avoid starting gossiper in RemoveTest

2017-04-20 Thread ifesdjeen
Avoid starting gossiper in RemoveTest

Patch by Alex Petrov; reviewed by Joel Knighton for CASSANDRA-13407


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

Branch: refs/heads/cassandra-3.11
Commit: 31590f5da10de8bbcf36d19617ced02b37be2a57
Parents: 590e151
Author: Alex Petrov 
Authored: Fri Apr 7 10:32:54 2017 +0200
Committer: Alex Petrov 
Committed: Thu Apr 20 11:40:53 2017 +0200

--
 CHANGES.txt| 1 +
 test/unit/org/apache/cassandra/service/RemoveTest.java | 4 +---
 2 files changed, 2 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/31590f5d/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 366db50..33c24ad 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.10
+ * Avoid starting gossiper in RemoveTest (CASSANDRA-13407)
  * Fix weightedSize() for row-cache reported by JMX and NodeTool 
(CASSANDRA-13393)
  * Fix JVM metric paths (CASSANDRA-13103)
  * Honor truststore-password parameter in cassandra-stress (CASSANDRA-12773)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/31590f5d/test/unit/org/apache/cassandra/service/RemoveTest.java
--
diff --git a/test/unit/org/apache/cassandra/service/RemoveTest.java 
b/test/unit/org/apache/cassandra/service/RemoveTest.java
index 9f1d6a8..800c904 100644
--- a/test/unit/org/apache/cassandra/service/RemoveTest.java
+++ b/test/unit/org/apache/cassandra/service/RemoveTest.java
@@ -35,7 +35,6 @@ import org.apache.cassandra.dht.IPartitioner;
 import org.apache.cassandra.dht.RandomPartitioner;
 import org.apache.cassandra.dht.Token;
 import org.apache.cassandra.exceptions.ConfigurationException;
-import org.apache.cassandra.gms.Gossiper;
 import org.apache.cassandra.locator.TokenMetadata;
 import org.apache.cassandra.net.MessageOut;
 import org.apache.cassandra.net.MessagingService;
@@ -61,7 +60,7 @@ public class RemoveTest
 public static void setupClass() throws ConfigurationException
 {
 oldPartitioner = 
StorageService.instance.setPartitionerUnsafe(partitioner);
-SchemaLoader.loadSchema();
+SchemaLoader.prepareServer();
 }
 
 @AfterClass
@@ -79,7 +78,6 @@ public class RemoveTest
 Util.createInitialRing(ss, partitioner, endpointTokens, keyTokens, 
hosts, hostIds, 6);
 
 MessagingService.instance().listen();
-Gossiper.instance.start(1);
 removalhost = hosts.get(5);
 hosts.remove(removalhost);
 removalId = hostIds.get(5);



[01/10] cassandra git commit: Avoid starting gossiper in RemoveTest

2017-04-20 Thread ifesdjeen
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.2 590e1512a -> 31590f5da
  refs/heads/cassandra-3.0 e5c2a1839 -> b063b38f3
  refs/heads/cassandra-3.11 fc834186f -> 638df6f97
  refs/heads/trunk 37f5005a1 -> 90e507896


Avoid starting gossiper in RemoveTest

Patch by Alex Petrov; reviewed by Joel Knighton for CASSANDRA-13407


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

Branch: refs/heads/cassandra-2.2
Commit: 31590f5da10de8bbcf36d19617ced02b37be2a57
Parents: 590e151
Author: Alex Petrov 
Authored: Fri Apr 7 10:32:54 2017 +0200
Committer: Alex Petrov 
Committed: Thu Apr 20 11:40:53 2017 +0200

--
 CHANGES.txt| 1 +
 test/unit/org/apache/cassandra/service/RemoveTest.java | 4 +---
 2 files changed, 2 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/31590f5d/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 366db50..33c24ad 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.10
+ * Avoid starting gossiper in RemoveTest (CASSANDRA-13407)
  * Fix weightedSize() for row-cache reported by JMX and NodeTool 
(CASSANDRA-13393)
  * Fix JVM metric paths (CASSANDRA-13103)
  * Honor truststore-password parameter in cassandra-stress (CASSANDRA-12773)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/31590f5d/test/unit/org/apache/cassandra/service/RemoveTest.java
--
diff --git a/test/unit/org/apache/cassandra/service/RemoveTest.java 
b/test/unit/org/apache/cassandra/service/RemoveTest.java
index 9f1d6a8..800c904 100644
--- a/test/unit/org/apache/cassandra/service/RemoveTest.java
+++ b/test/unit/org/apache/cassandra/service/RemoveTest.java
@@ -35,7 +35,6 @@ import org.apache.cassandra.dht.IPartitioner;
 import org.apache.cassandra.dht.RandomPartitioner;
 import org.apache.cassandra.dht.Token;
 import org.apache.cassandra.exceptions.ConfigurationException;
-import org.apache.cassandra.gms.Gossiper;
 import org.apache.cassandra.locator.TokenMetadata;
 import org.apache.cassandra.net.MessageOut;
 import org.apache.cassandra.net.MessagingService;
@@ -61,7 +60,7 @@ public class RemoveTest
 public static void setupClass() throws ConfigurationException
 {
 oldPartitioner = 
StorageService.instance.setPartitionerUnsafe(partitioner);
-SchemaLoader.loadSchema();
+SchemaLoader.prepareServer();
 }
 
 @AfterClass
@@ -79,7 +78,6 @@ public class RemoveTest
 Util.createInitialRing(ss, partitioner, endpointTokens, keyTokens, 
hosts, hostIds, 6);
 
 MessagingService.instance().listen();
-Gossiper.instance.start(1);
 removalhost = hosts.get(5);
 hosts.remove(removalhost);
 removalId = hostIds.get(5);



[08/10] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.11

2017-04-20 Thread ifesdjeen
Merge branch 'cassandra-3.0' into cassandra-3.11


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

Branch: refs/heads/cassandra-3.11
Commit: 638df6f971b806460113031524e14b21ae3e20f8
Parents: fc83418 b063b38
Author: Alex Petrov 
Authored: Thu Apr 20 11:48:12 2017 +0200
Committer: Alex Petrov 
Committed: Thu Apr 20 11:48:12 2017 +0200

--
 CHANGES.txt| 1 +
 test/unit/org/apache/cassandra/service/RemoveTest.java | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/638df6f9/CHANGES.txt
--
diff --cc CHANGES.txt
index 8a2926b,81d5b06..690c959
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -49,31 -21,12 +49,32 @@@ Merged from 3.0
   * Propagate row deletions in 2i tables on upgrade (CASSANDRA-13320)
   * Slice.isEmpty() returns false for some empty slices (CASSANDRA-13305)
   * Add formatted row output to assertEmpty in CQL Tester (CASSANDRA-13238)
 - * Legacy caching options can prevent 3.0 upgrade (CASSANDRA-13384)
 + * Prevent data loss on upgrade 2.1 - 3.0 by adding component separator to 
LogRecord absolute path (CASSANDRA-13294)
 + * Improve testing on macOS by eliminating sigar logging (CASSANDRA-13233)
 + * Cqlsh copy-from should error out when csv contains invalid data for 
collections (CASSANDRA-13071)
 + * Fix "multiple versions of ant detected..." when running ant test 
(CASSANDRA-13232)
 + * Coalescing strategy sleeps too much (CASSANDRA-13090)
 + * Faster StreamingHistogram (CASSANDRA-13038)
 + * Legacy deserializer can create unexpected boundary range tombstones 
(CASSANDRA-13237)
 + * Remove unnecessary assertion from AntiCompactionTest (CASSANDRA-13070)
 + * Fix cqlsh COPY for dates before 1900 (CASSANDRA-13185)
 + * Use keyspace replication settings on system.size_estimates table 
(CASSANDRA-9639)
 + * Add vm.max_map_count StartupCheck (CASSANDRA-13008)
 + * Hint related logging should include the IP address of the destination in 
addition to
 +   host ID (CASSANDRA-13205)
 + * Reloading logback.xml does not work (CASSANDRA-13173)
 + * Lightweight transactions temporarily fail after upgrade from 2.1 to 3.0 
(CASSANDRA-13109)
 + * Duplicate rows after upgrading from 2.1.16 to 3.0.10/3.9 (CASSANDRA-13125)
 + * Fix UPDATE queries with empty IN restrictions (CASSANDRA-13152)
 + * Fix handling of partition with partition-level deletion plus
 +   live rows in sstabledump (CASSANDRA-13177)
 + * Provide user workaround when system_schema.columns does not contain entries
 +   for a table that's in system_schema.tables (CASSANDRA-13180)
   * Nodetool upgradesstables/scrub/compact ignores system tables 
(CASSANDRA-13410)
 - * Fix NPE issue in StorageService (CASSANDRA-13060)
  Merged from 2.2:
+  * Avoid starting gossiper in RemoveTest (CASSANDRA-13407)
   * Fix weightedSize() for row-cache reported by JMX and NodeTool 
(CASSANDRA-13393)
 + * Fix JVM metric names (CASSANDRA-13103)
   * Honor truststore-password parameter in cassandra-stress (CASSANDRA-12773)
   * Discard in-flight shadow round responses (CASSANDRA-12653)
   * Don't anti-compact repaired data to avoid inconsistencies (CASSANDRA-13153)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/638df6f9/test/unit/org/apache/cassandra/service/RemoveTest.java
--
diff --cc test/unit/org/apache/cassandra/service/RemoveTest.java
index 701ea0f,800c904..f4b203c
--- a/test/unit/org/apache/cassandra/service/RemoveTest.java
+++ b/test/unit/org/apache/cassandra/service/RemoveTest.java
@@@ -30,10 -29,8 +30,9 @@@ import java.util.concurrent.atomic.Atom
  
  import org.junit.*;
  
--import org.apache.cassandra.SchemaLoader;
  import org.apache.cassandra.Util;
 +import org.apache.cassandra.concurrent.NamedThreadFactory;
 +import org.apache.cassandra.config.DatabaseDescriptor;
  import org.apache.cassandra.dht.IPartitioner;
  import org.apache.cassandra.dht.RandomPartitioner;
  import org.apache.cassandra.dht.Token;
@@@ -71,7 -60,7 +70,6 @@@ public class RemoveTes
  public static void setupClass() throws ConfigurationException
  {
  oldPartitioner = 
StorageService.instance.setPartitionerUnsafe(partitioner);
- SchemaLoader.loadSchema();
 -SchemaLoader.prepareServer();
  }
  
  @AfterClass



[05/10] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0

2017-04-20 Thread ifesdjeen
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/b063b38f
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b063b38f
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b063b38f

Branch: refs/heads/cassandra-3.11
Commit: b063b38f33474cd0687167599a3a8cec7ed82631
Parents: e5c2a18 31590f5
Author: Alex Petrov 
Authored: Thu Apr 20 11:44:58 2017 +0200
Committer: Alex Petrov 
Committed: Thu Apr 20 11:44:58 2017 +0200

--
 CHANGES.txt| 1 +
 test/unit/org/apache/cassandra/service/RemoveTest.java | 4 +---
 2 files changed, 2 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b063b38f/CHANGES.txt
--
diff --cc CHANGES.txt
index 11881e9,33c24ad..81d5b06
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,31 -1,7 +1,32 @@@
 -2.2.10
 +3.0.14
 + * Avoid name clashes in CassandraIndexTest (CASSANDRA-13427)
 + * Handling partially written hint files (CASSANDRA-12728) 
 + * Interrupt replaying hints on decommission (CASSANDRA-13308)
 +
 +3.0.13
 + * Make reading of range tombstones more reliable (CASSANDRA-12811)
 + * Fix startup problems due to schema tables not completely flushed 
(CASSANDRA-12213)
 + * Fix view builder bug that can filter out data on restart (CASSANDRA-13405)
 + * Fix 2i page size calculation when there are no regular columns 
(CASSANDRA-13400)
 + * Fix the conversion of 2.X expired rows without regular column data 
(CASSANDRA-13395)
 + * Fix hint delivery when using ext+internal IPs with prefer_local enabled 
(CASSANDRA-13020)
 + * Fix possible NPE on upgrade to 3.0/3.X in case of IO errors 
(CASSANDRA-13389)
 + * Legacy deserializer can create empty range tombstones (CASSANDRA-13341)
 + * Use the Kernel32 library to retrieve the PID on Windows and fix startup 
checks (CASSANDRA-1)
 + * Fix code to not exchange schema across major versions (CASSANDRA-13274)
 + * Dropping column results in "corrupt" SSTable (CASSANDRA-13337)
 + * Bugs handling range tombstones in the sstable iterators (CASSANDRA-13340)
 + * Fix CONTAINS filtering for null collections (CASSANDRA-13246)
 + * Applying: Use a unique metric reservoir per test run when using 
Cassandra-wide metrics residing in MBeans (CASSANDRA-13216)
 + * Propagate row deletions in 2i tables on upgrade (CASSANDRA-13320)
 + * Slice.isEmpty() returns false for some empty slices (CASSANDRA-13305)
 + * Add formatted row output to assertEmpty in CQL Tester (CASSANDRA-13238)
 + * Legacy caching options can prevent 3.0 upgrade (CASSANDRA-13384)
 + * Nodetool upgradesstables/scrub/compact ignores system tables 
(CASSANDRA-13410)
 + * Fix NPE issue in StorageService (CASSANDRA-13060)
 +Merged from 2.2:
+  * Avoid starting gossiper in RemoveTest (CASSANDRA-13407)
   * Fix weightedSize() for row-cache reported by JMX and NodeTool 
(CASSANDRA-13393)
 - * Fix JVM metric paths (CASSANDRA-13103)
   * Honor truststore-password parameter in cassandra-stress (CASSANDRA-12773)
   * Discard in-flight shadow round responses (CASSANDRA-12653)
   * Don't anti-compact repaired data to avoid inconsistencies (CASSANDRA-13153)



[07/10] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0

2017-04-20 Thread ifesdjeen
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/b063b38f
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b063b38f
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b063b38f

Branch: refs/heads/trunk
Commit: b063b38f33474cd0687167599a3a8cec7ed82631
Parents: e5c2a18 31590f5
Author: Alex Petrov 
Authored: Thu Apr 20 11:44:58 2017 +0200
Committer: Alex Petrov 
Committed: Thu Apr 20 11:44:58 2017 +0200

--
 CHANGES.txt| 1 +
 test/unit/org/apache/cassandra/service/RemoveTest.java | 4 +---
 2 files changed, 2 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b063b38f/CHANGES.txt
--
diff --cc CHANGES.txt
index 11881e9,33c24ad..81d5b06
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,31 -1,7 +1,32 @@@
 -2.2.10
 +3.0.14
 + * Avoid name clashes in CassandraIndexTest (CASSANDRA-13427)
 + * Handling partially written hint files (CASSANDRA-12728) 
 + * Interrupt replaying hints on decommission (CASSANDRA-13308)
 +
 +3.0.13
 + * Make reading of range tombstones more reliable (CASSANDRA-12811)
 + * Fix startup problems due to schema tables not completely flushed 
(CASSANDRA-12213)
 + * Fix view builder bug that can filter out data on restart (CASSANDRA-13405)
 + * Fix 2i page size calculation when there are no regular columns 
(CASSANDRA-13400)
 + * Fix the conversion of 2.X expired rows without regular column data 
(CASSANDRA-13395)
 + * Fix hint delivery when using ext+internal IPs with prefer_local enabled 
(CASSANDRA-13020)
 + * Fix possible NPE on upgrade to 3.0/3.X in case of IO errors 
(CASSANDRA-13389)
 + * Legacy deserializer can create empty range tombstones (CASSANDRA-13341)
 + * Use the Kernel32 library to retrieve the PID on Windows and fix startup 
checks (CASSANDRA-1)
 + * Fix code to not exchange schema across major versions (CASSANDRA-13274)
 + * Dropping column results in "corrupt" SSTable (CASSANDRA-13337)
 + * Bugs handling range tombstones in the sstable iterators (CASSANDRA-13340)
 + * Fix CONTAINS filtering for null collections (CASSANDRA-13246)
 + * Applying: Use a unique metric reservoir per test run when using 
Cassandra-wide metrics residing in MBeans (CASSANDRA-13216)
 + * Propagate row deletions in 2i tables on upgrade (CASSANDRA-13320)
 + * Slice.isEmpty() returns false for some empty slices (CASSANDRA-13305)
 + * Add formatted row output to assertEmpty in CQL Tester (CASSANDRA-13238)
 + * Legacy caching options can prevent 3.0 upgrade (CASSANDRA-13384)
 + * Nodetool upgradesstables/scrub/compact ignores system tables 
(CASSANDRA-13410)
 + * Fix NPE issue in StorageService (CASSANDRA-13060)
 +Merged from 2.2:
+  * Avoid starting gossiper in RemoveTest (CASSANDRA-13407)
   * Fix weightedSize() for row-cache reported by JMX and NodeTool 
(CASSANDRA-13393)
 - * Fix JVM metric paths (CASSANDRA-13103)
   * Honor truststore-password parameter in cassandra-stress (CASSANDRA-12773)
   * Discard in-flight shadow round responses (CASSANDRA-12653)
   * Don't anti-compact repaired data to avoid inconsistencies (CASSANDRA-13153)



[jira] [Updated] (CASSANDRA-13427) testall failure in org.apache.cassandra.index.internal.CassandraIndexTest.indexOnRegularColumn

2017-04-20 Thread Alex Petrov (JIRA)

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

Alex Petrov updated CASSANDRA-13427:

Resolution: Fixed
Status: Resolved  (was: Ready to Commit)

> testall failure in 
> org.apache.cassandra.index.internal.CassandraIndexTest.indexOnRegularColumn
> --
>
> Key: CASSANDRA-13427
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13427
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Alex Petrov
>Assignee: Alex Petrov
>
> Because of the name clash, there's a following failure happening (extremely 
> infrequently, it's worth noting, seen it only once, no further traces / 
> instances found):
> {code}
> Error setting schema for test (query was: CREATE INDEX v_index ON 
> cql_test_keyspace.table_22(v))
> {code}
> Stacktrace:
> {code}
> java.lang.RuntimeException: Error setting schema for test (query was: CREATE 
> INDEX v_index ON cql_test_keyspace.table_22(v))
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13427) testall failure in org.apache.cassandra.index.internal.CassandraIndexTest.indexOnRegularColumn

2017-04-20 Thread Alex Petrov (JIRA)

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

Alex Petrov commented on CASSANDRA-13427:
-

Committed to 3.0 as 
[e5c2a1839f2cdf16771dcba726f862e61fda8d4f|https://github.com/apache/cassandra/commit/e5c2a1839f2cdf16771dcba726f862e61fda8d4f]
 and merged up to 
[3.11|https://github.com/apache/cassandra/tree/cassandra-3.11] and 
[trunk|https://github.com/apache/cassandra/commit/37f5005a15c9addc3b99c5a35cb72f9fc9c2c912],

> testall failure in 
> org.apache.cassandra.index.internal.CassandraIndexTest.indexOnRegularColumn
> --
>
> Key: CASSANDRA-13427
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13427
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Alex Petrov
>Assignee: Alex Petrov
>
> Because of the name clash, there's a following failure happening (extremely 
> infrequently, it's worth noting, seen it only once, no further traces / 
> instances found):
> {code}
> Error setting schema for test (query was: CREATE INDEX v_index ON 
> cql_test_keyspace.table_22(v))
> {code}
> Stacktrace:
> {code}
> java.lang.RuntimeException: Error setting schema for test (query was: CREATE 
> INDEX v_index ON cql_test_keyspace.table_22(v))
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Comment Edited] (CASSANDRA-13427) testall failure in org.apache.cassandra.index.internal.CassandraIndexTest.indexOnRegularColumn

2017-04-20 Thread Alex Petrov (JIRA)

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

Alex Petrov edited comment on CASSANDRA-13427 at 4/20/17 9:33 AM:
--

Committed to 3.0 as 
[e5c2a1839f2cdf16771dcba726f862e61fda8d4f|https://github.com/apache/cassandra/commit/e5c2a1839f2cdf16771dcba726f862e61fda8d4f]
 and merged up to 
[3.11|https://github.com/apache/cassandra/commit/fc834186ff0faa5ff78512637badc59990e51173]
 and 
[trunk|https://github.com/apache/cassandra/commit/37f5005a15c9addc3b99c5a35cb72f9fc9c2c912],


was (Author: ifesdjeen):
Committed to 3.0 as 
[e5c2a1839f2cdf16771dcba726f862e61fda8d4f|https://github.com/apache/cassandra/commit/e5c2a1839f2cdf16771dcba726f862e61fda8d4f]
 and merged up to 
[3.11|https://github.com/apache/cassandra/tree/cassandra-3.11] and 
[trunk|https://github.com/apache/cassandra/commit/37f5005a15c9addc3b99c5a35cb72f9fc9c2c912],

> testall failure in 
> org.apache.cassandra.index.internal.CassandraIndexTest.indexOnRegularColumn
> --
>
> Key: CASSANDRA-13427
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13427
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Alex Petrov
>Assignee: Alex Petrov
>
> Because of the name clash, there's a following failure happening (extremely 
> infrequently, it's worth noting, seen it only once, no further traces / 
> instances found):
> {code}
> Error setting schema for test (query was: CREATE INDEX v_index ON 
> cql_test_keyspace.table_22(v))
> {code}
> Stacktrace:
> {code}
> java.lang.RuntimeException: Error setting schema for test (query was: CREATE 
> INDEX v_index ON cql_test_keyspace.table_22(v))
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[2/6] cassandra git commit: Avoid name clashes in CassandraIndexTest

2017-04-20 Thread ifesdjeen
Avoid name clashes in CassandraIndexTest

Patch by Alex Petrov; reviewed by Andrés de la Peña for CASSANDRA-13427

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

Branch: refs/heads/cassandra-3.11
Commit: e5c2a1839f2cdf16771dcba726f862e61fda8d4f
Parents: 5089e74
Author: Alex Petrov 
Authored: Fri Mar 10 15:39:30 2017 +0100
Committer: Alex Petrov 
Committed: Thu Apr 20 11:26:25 2017 +0200

--
 CHANGES.txt |  1 +
 .../index/internal/CassandraIndexTest.java  | 39 +---
 2 files changed, 10 insertions(+), 30 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e5c2a183/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index e55d4cb..11881e9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.14
+ * Avoid name clashes in CassandraIndexTest (CASSANDRA-13427)
  * Handling partially written hint files (CASSANDRA-12728) 
  * Interrupt replaying hints on decommission (CASSANDRA-13308)
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e5c2a183/test/unit/org/apache/cassandra/index/internal/CassandraIndexTest.java
--
diff --git 
a/test/unit/org/apache/cassandra/index/internal/CassandraIndexTest.java 
b/test/unit/org/apache/cassandra/index/internal/CassandraIndexTest.java
index 6c309ac..68fe42d 100644
--- a/test/unit/org/apache/cassandra/index/internal/CassandraIndexTest.java
+++ b/test/unit/org/apache/cassandra/index/internal/CassandraIndexTest.java
@@ -60,7 +60,6 @@ public class CassandraIndexTest extends CQLTester
 {
 new TestScript().tableDefinition("CREATE TABLE %s (k int, c int, v 
int, PRIMARY KEY (k, c));")
 .target("v")
-.indexName("v_index")
 .withFirstRow(row(0, 0, 0))
 .withSecondRow(row(1, 1, 1))
 
.missingIndexMessage(StatementRestrictions.REQUIRES_ALLOW_FILTERING_MESSAGE)
@@ -77,7 +76,6 @@ public class CassandraIndexTest extends CQLTester
 // No update allowed on primary key columns, so this script has no 
update expression
 new TestScript().tableDefinition("CREATE TABLE %s (k int, c int, v 
int, PRIMARY KEY (k, c));")
 .target("c")
-.indexName("c_index")
 .withFirstRow(row(0, 0, 0))
 .withSecondRow(row(1, 1, 1))
 
.missingIndexMessage(StatementRestrictions.REQUIRES_ALLOW_FILTERING_MESSAGE)
@@ -92,7 +90,6 @@ public class CassandraIndexTest extends CQLTester
 // No update allowed on primary key columns, so this script has no 
update expression
 new TestScript().tableDefinition("CREATE TABLE %s (k int, c1 int, c2 
int, v int, PRIMARY KEY (k, c1, c2));")
 .target("c2")
-.indexName("c2_index")
 .withFirstRow(row(0, 0, 0, 0))
 .withSecondRow(row(1, 1, 1, 1))
 .missingIndexMessage(String.format("PRIMARY KEY column 
\"%s\" cannot be restricted " +
@@ -109,7 +106,6 @@ public class CassandraIndexTest extends CQLTester
 // No update allowed on primary key columns, so this script has no 
update expression
 new TestScript().tableDefinition("CREATE TABLE %s (k1 int, k2 int, c1 
int, c2 int, v int, PRIMARY KEY ((k1, k2), c1, c2));")
 .target("k1")
-.indexName("k1_index")
 .withFirstRow(row(0, 0, 0, 0, 0))
 .withSecondRow(row(1, 1, 1, 1, 1))
 .missingIndexMessage("Partition key parts: k2 must be 
restricted as other parts are")
@@ -124,7 +120,6 @@ public class CassandraIndexTest extends CQLTester
 // No update allowed on primary key columns, so this script has no 
update expression
 new TestScript().tableDefinition("CREATE TABLE %s (k1 int, k2 int, c1 
int, c2 int, v int, PRIMARY KEY ((k1, k2), c1, c2));")
 .target("k2")
-.indexName("k2_index")
 .withFirstRow(row(0, 0, 0, 0, 0))
 .withSecondRow(row(1, 1, 1, 1, 1))
 .missingIndexMessage("Partition key parts: k1 must be 
restricted as other parts are")
@@ -138,7 +133,6 @@ public class CassandraIndexTest extends CQLTester
 {
 new 

[6/6] cassandra git commit: Merge branch 'cassandra-3.11' into trunk

2017-04-20 Thread ifesdjeen
Merge branch 'cassandra-3.11' into trunk


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

Branch: refs/heads/trunk
Commit: 37f5005a15c9addc3b99c5a35cb72f9fc9c2c912
Parents: 9b1295e fc83418
Author: Alex Petrov 
Authored: Thu Apr 20 11:31:29 2017 +0200
Committer: Alex Petrov 
Committed: Thu Apr 20 11:31:29 2017 +0200

--
 CHANGES.txt |  2 +
 .../index/internal/CassandraIndexTest.java  | 39 +---
 2 files changed, 11 insertions(+), 30 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/37f5005a/CHANGES.txt
--
diff --cc CHANGES.txt
index c742570,8a2926b..2cd4bae
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -80,7 -24,10 +80,9 @@@
   * NoReplicationTokenAllocator should work with zero replication factor 
(CASSANDRA-12983)
   * Address message coalescing regression (CASSANDRA-12676)
   * Delete illegal character from StandardTokenizerImpl.jflex (CASSANDRA-13417)
 - * Fix cqlsh automatic protocol downgrade regression (CASSANDRA-13307)
  Merged from 3.0:
+  * Avoid name clashes in CassandraIndexTest (CASSANDRA-13427)
+  * Handling partially written hint files (CASSANDRA-12728)
   * Interrupt replaying hints on decommission (CASSANDRA-13308)
   * Handling partially written hint files (CASSANDRA-12728)
   * Fix NPE issue in StorageService (CASSANDRA-13060)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/37f5005a/test/unit/org/apache/cassandra/index/internal/CassandraIndexTest.java
--
diff --cc test/unit/org/apache/cassandra/index/internal/CassandraIndexTest.java
index 2b43f36,1f8fe71..8b9402b
--- a/test/unit/org/apache/cassandra/index/internal/CassandraIndexTest.java
+++ b/test/unit/org/apache/cassandra/index/internal/CassandraIndexTest.java
@@@ -658,8 -635,10 +635,10 @@@ public class CassandraIndexTest extend
  if (updateExpression != null)
  assertNotNull(postUpdateQueryExpression);
  
 -// first, create the table as we need the CFMetaData to build the 
other cql statements
 +// first, create the table as we need the Tablemetadata to build 
the other cql statements
- createTable(tableDefinition);
+ String tableName = createTable(tableDefinition);
+ 
+ indexName = String.format("index_%s_%d", tableName, 
indexCounter++);
  
  // now setup the cql statements the test will run through. Some 
are dependent on
  // the table definition, others are not.



[5/6] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.11

2017-04-20 Thread ifesdjeen
Merge branch 'cassandra-3.0' into cassandra-3.11


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

Branch: refs/heads/cassandra-3.11
Commit: fc834186ff0faa5ff78512637badc59990e51173
Parents: 5f64454 e5c2a18
Author: Alex Petrov 
Authored: Thu Apr 20 11:29:22 2017 +0200
Committer: Alex Petrov 
Committed: Thu Apr 20 11:29:22 2017 +0200

--
 CHANGES.txt |  2 +
 .../index/internal/CassandraIndexTest.java  | 39 +---
 2 files changed, 11 insertions(+), 30 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc834186/CHANGES.txt
--
diff --cc CHANGES.txt
index 92ecb39,11881e9..8a2926b
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,34 -1,9 +1,36 @@@
 -3.0.14
 +3.11.0
 + * V5 protocol flags decoding broken (CASSANDRA-13443)
 + * Use write lock not read lock for removing sstables from compaction 
strategies. (CASSANDRA-13422)
 + * Use corePoolSize equal to maxPoolSize in JMXEnabledThreadPoolExecutors 
(CASSANDRA-13329)
 + * Avoid rebuilding SASI indexes containing no values (CASSANDRA-12962)
 + * Add charset to Analyser input stream (CASSANDRA-13151)
 + * Fix testLimitSSTables flake caused by concurrent flush (CASSANDRA-12820)
 + * cdc column addition strikes again (CASSANDRA-13382)
 + * Fix static column indexes (CASSANDRA-13277)
 + * DataOutputBuffer.asNewBuffer broken (CASSANDRA-13298)
 + * unittest CipherFactoryTest failed on MacOS (CASSANDRA-13370)
 + * Forbid SELECT restrictions and CREATE INDEX over non-frozen UDT columns 
(CASSANDRA-13247)
 + * Default logging we ship will incorrectly print "?:?" for "%F:%L" pattern 
(CASSANDRA-13317)
 + * Possible AssertionError in UnfilteredRowIteratorWithLowerBound 
(CASSANDRA-13366)
 + * Support unaligned memory access for AArch64 (CASSANDRA-13326)
 + * Improve SASI range iterator efficiency on intersection with an empty range 
(CASSANDRA-12915).
 + * Fix equality comparisons of columns using the duration type 
(CASSANDRA-13174)
 + * Obfuscate password in stress-graphs (CASSANDRA-12233)
 + * Move to FastThreadLocalThread and FastThreadLocal (CASSANDRA-13034)
 + * nodetool stopdaemon errors out (CASSANDRA-13030)
 + * Tables in system_distributed should not use gcgs of 0 (CASSANDRA-12954)
 + * Fix primary index calculation for SASI (CASSANDRA-12910)
 + * More fixes to the TokenAllocator (CASSANDRA-12990)
 + * NoReplicationTokenAllocator should work with zero replication factor 
(CASSANDRA-12983)
 + * Address message coalescing regression (CASSANDRA-12676)
 + * Delete illegal character from StandardTokenizerImpl.jflex (CASSANDRA-13417)
 + * Fix cqlsh automatic protocol downgrade regression (CASSANDRA-13307)
 +Merged from 3.0:
+  * Avoid name clashes in CassandraIndexTest (CASSANDRA-13427)
 - * Handling partially written hint files (CASSANDRA-12728) 
++ * Handling partially written hint files (CASSANDRA-12728)
   * Interrupt replaying hints on decommission (CASSANDRA-13308)
 -
 -3.0.13
 + * Handling partially written hint files (CASSANDRA-12728)
 + * Fix NPE issue in StorageService (CASSANDRA-13060)
   * Make reading of range tombstones more reliable (CASSANDRA-12811)
   * Fix startup problems due to schema tables not completely flushed 
(CASSANDRA-12213)
   * Fix view builder bug that can filter out data on restart (CASSANDRA-13405)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc834186/test/unit/org/apache/cassandra/index/internal/CassandraIndexTest.java
--
diff --cc test/unit/org/apache/cassandra/index/internal/CassandraIndexTest.java
index bfe3c32,68fe42d..1f8fe71
--- a/test/unit/org/apache/cassandra/index/internal/CassandraIndexTest.java
+++ b/test/unit/org/apache/cassandra/index/internal/CassandraIndexTest.java
@@@ -110,10 -106,9 +107,9 @@@ public class CassandraIndexTest extend
  // No update allowed on primary key columns, so this script has no 
update expression
  new TestScript().tableDefinition("CREATE TABLE %s (k1 int, k2 int, c1 
int, c2 int, v int, PRIMARY KEY ((k1, k2), c1, c2));")
  .target("k1")
- .indexName("k1_index")
  .withFirstRow(row(0, 0, 0, 0, 0))
  .withSecondRow(row(1, 1, 1, 1, 1))
 -.missingIndexMessage("Partition key parts: k2 must be 
restricted as other parts are")
 +
.missingIndexMessage(StatementRestrictions.REQUIRES_ALLOW_FILTERING_MESSAGE)
   

[3/6] cassandra git commit: Avoid name clashes in CassandraIndexTest

2017-04-20 Thread ifesdjeen
Avoid name clashes in CassandraIndexTest

Patch by Alex Petrov; reviewed by Andrés de la Peña for CASSANDRA-13427

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

Branch: refs/heads/trunk
Commit: e5c2a1839f2cdf16771dcba726f862e61fda8d4f
Parents: 5089e74
Author: Alex Petrov 
Authored: Fri Mar 10 15:39:30 2017 +0100
Committer: Alex Petrov 
Committed: Thu Apr 20 11:26:25 2017 +0200

--
 CHANGES.txt |  1 +
 .../index/internal/CassandraIndexTest.java  | 39 +---
 2 files changed, 10 insertions(+), 30 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e5c2a183/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index e55d4cb..11881e9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.14
+ * Avoid name clashes in CassandraIndexTest (CASSANDRA-13427)
  * Handling partially written hint files (CASSANDRA-12728) 
  * Interrupt replaying hints on decommission (CASSANDRA-13308)
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e5c2a183/test/unit/org/apache/cassandra/index/internal/CassandraIndexTest.java
--
diff --git 
a/test/unit/org/apache/cassandra/index/internal/CassandraIndexTest.java 
b/test/unit/org/apache/cassandra/index/internal/CassandraIndexTest.java
index 6c309ac..68fe42d 100644
--- a/test/unit/org/apache/cassandra/index/internal/CassandraIndexTest.java
+++ b/test/unit/org/apache/cassandra/index/internal/CassandraIndexTest.java
@@ -60,7 +60,6 @@ public class CassandraIndexTest extends CQLTester
 {
 new TestScript().tableDefinition("CREATE TABLE %s (k int, c int, v 
int, PRIMARY KEY (k, c));")
 .target("v")
-.indexName("v_index")
 .withFirstRow(row(0, 0, 0))
 .withSecondRow(row(1, 1, 1))
 
.missingIndexMessage(StatementRestrictions.REQUIRES_ALLOW_FILTERING_MESSAGE)
@@ -77,7 +76,6 @@ public class CassandraIndexTest extends CQLTester
 // No update allowed on primary key columns, so this script has no 
update expression
 new TestScript().tableDefinition("CREATE TABLE %s (k int, c int, v 
int, PRIMARY KEY (k, c));")
 .target("c")
-.indexName("c_index")
 .withFirstRow(row(0, 0, 0))
 .withSecondRow(row(1, 1, 1))
 
.missingIndexMessage(StatementRestrictions.REQUIRES_ALLOW_FILTERING_MESSAGE)
@@ -92,7 +90,6 @@ public class CassandraIndexTest extends CQLTester
 // No update allowed on primary key columns, so this script has no 
update expression
 new TestScript().tableDefinition("CREATE TABLE %s (k int, c1 int, c2 
int, v int, PRIMARY KEY (k, c1, c2));")
 .target("c2")
-.indexName("c2_index")
 .withFirstRow(row(0, 0, 0, 0))
 .withSecondRow(row(1, 1, 1, 1))
 .missingIndexMessage(String.format("PRIMARY KEY column 
\"%s\" cannot be restricted " +
@@ -109,7 +106,6 @@ public class CassandraIndexTest extends CQLTester
 // No update allowed on primary key columns, so this script has no 
update expression
 new TestScript().tableDefinition("CREATE TABLE %s (k1 int, k2 int, c1 
int, c2 int, v int, PRIMARY KEY ((k1, k2), c1, c2));")
 .target("k1")
-.indexName("k1_index")
 .withFirstRow(row(0, 0, 0, 0, 0))
 .withSecondRow(row(1, 1, 1, 1, 1))
 .missingIndexMessage("Partition key parts: k2 must be 
restricted as other parts are")
@@ -124,7 +120,6 @@ public class CassandraIndexTest extends CQLTester
 // No update allowed on primary key columns, so this script has no 
update expression
 new TestScript().tableDefinition("CREATE TABLE %s (k1 int, k2 int, c1 
int, c2 int, v int, PRIMARY KEY ((k1, k2), c1, c2));")
 .target("k2")
-.indexName("k2_index")
 .withFirstRow(row(0, 0, 0, 0, 0))
 .withSecondRow(row(1, 1, 1, 1, 1))
 .missingIndexMessage("Partition key parts: k1 must be 
restricted as other parts are")
@@ -138,7 +133,6 @@ public class CassandraIndexTest extends CQLTester
 {
 new 

[4/6] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.11

2017-04-20 Thread ifesdjeen
Merge branch 'cassandra-3.0' into cassandra-3.11


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

Branch: refs/heads/trunk
Commit: fc834186ff0faa5ff78512637badc59990e51173
Parents: 5f64454 e5c2a18
Author: Alex Petrov 
Authored: Thu Apr 20 11:29:22 2017 +0200
Committer: Alex Petrov 
Committed: Thu Apr 20 11:29:22 2017 +0200

--
 CHANGES.txt |  2 +
 .../index/internal/CassandraIndexTest.java  | 39 +---
 2 files changed, 11 insertions(+), 30 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc834186/CHANGES.txt
--
diff --cc CHANGES.txt
index 92ecb39,11881e9..8a2926b
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,34 -1,9 +1,36 @@@
 -3.0.14
 +3.11.0
 + * V5 protocol flags decoding broken (CASSANDRA-13443)
 + * Use write lock not read lock for removing sstables from compaction 
strategies. (CASSANDRA-13422)
 + * Use corePoolSize equal to maxPoolSize in JMXEnabledThreadPoolExecutors 
(CASSANDRA-13329)
 + * Avoid rebuilding SASI indexes containing no values (CASSANDRA-12962)
 + * Add charset to Analyser input stream (CASSANDRA-13151)
 + * Fix testLimitSSTables flake caused by concurrent flush (CASSANDRA-12820)
 + * cdc column addition strikes again (CASSANDRA-13382)
 + * Fix static column indexes (CASSANDRA-13277)
 + * DataOutputBuffer.asNewBuffer broken (CASSANDRA-13298)
 + * unittest CipherFactoryTest failed on MacOS (CASSANDRA-13370)
 + * Forbid SELECT restrictions and CREATE INDEX over non-frozen UDT columns 
(CASSANDRA-13247)
 + * Default logging we ship will incorrectly print "?:?" for "%F:%L" pattern 
(CASSANDRA-13317)
 + * Possible AssertionError in UnfilteredRowIteratorWithLowerBound 
(CASSANDRA-13366)
 + * Support unaligned memory access for AArch64 (CASSANDRA-13326)
 + * Improve SASI range iterator efficiency on intersection with an empty range 
(CASSANDRA-12915).
 + * Fix equality comparisons of columns using the duration type 
(CASSANDRA-13174)
 + * Obfuscate password in stress-graphs (CASSANDRA-12233)
 + * Move to FastThreadLocalThread and FastThreadLocal (CASSANDRA-13034)
 + * nodetool stopdaemon errors out (CASSANDRA-13030)
 + * Tables in system_distributed should not use gcgs of 0 (CASSANDRA-12954)
 + * Fix primary index calculation for SASI (CASSANDRA-12910)
 + * More fixes to the TokenAllocator (CASSANDRA-12990)
 + * NoReplicationTokenAllocator should work with zero replication factor 
(CASSANDRA-12983)
 + * Address message coalescing regression (CASSANDRA-12676)
 + * Delete illegal character from StandardTokenizerImpl.jflex (CASSANDRA-13417)
 + * Fix cqlsh automatic protocol downgrade regression (CASSANDRA-13307)
 +Merged from 3.0:
+  * Avoid name clashes in CassandraIndexTest (CASSANDRA-13427)
 - * Handling partially written hint files (CASSANDRA-12728) 
++ * Handling partially written hint files (CASSANDRA-12728)
   * Interrupt replaying hints on decommission (CASSANDRA-13308)
 -
 -3.0.13
 + * Handling partially written hint files (CASSANDRA-12728)
 + * Fix NPE issue in StorageService (CASSANDRA-13060)
   * Make reading of range tombstones more reliable (CASSANDRA-12811)
   * Fix startup problems due to schema tables not completely flushed 
(CASSANDRA-12213)
   * Fix view builder bug that can filter out data on restart (CASSANDRA-13405)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc834186/test/unit/org/apache/cassandra/index/internal/CassandraIndexTest.java
--
diff --cc test/unit/org/apache/cassandra/index/internal/CassandraIndexTest.java
index bfe3c32,68fe42d..1f8fe71
--- a/test/unit/org/apache/cassandra/index/internal/CassandraIndexTest.java
+++ b/test/unit/org/apache/cassandra/index/internal/CassandraIndexTest.java
@@@ -110,10 -106,9 +107,9 @@@ public class CassandraIndexTest extend
  // No update allowed on primary key columns, so this script has no 
update expression
  new TestScript().tableDefinition("CREATE TABLE %s (k1 int, k2 int, c1 
int, c2 int, v int, PRIMARY KEY ((k1, k2), c1, c2));")
  .target("k1")
- .indexName("k1_index")
  .withFirstRow(row(0, 0, 0, 0, 0))
  .withSecondRow(row(1, 1, 1, 1, 1))
 -.missingIndexMessage("Partition key parts: k2 must be 
restricted as other parts are")
 +
.missingIndexMessage(StatementRestrictions.REQUIRES_ALLOW_FILTERING_MESSAGE)
  

[1/6] cassandra git commit: Avoid name clashes in CassandraIndexTest

2017-04-20 Thread ifesdjeen
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.0 5089e74ef -> e5c2a1839
  refs/heads/cassandra-3.11 5f6445480 -> fc834186f
  refs/heads/trunk 9b1295e41 -> 37f5005a1


Avoid name clashes in CassandraIndexTest

Patch by Alex Petrov; reviewed by Andrés de la Peña for CASSANDRA-13427

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

Branch: refs/heads/cassandra-3.0
Commit: e5c2a1839f2cdf16771dcba726f862e61fda8d4f
Parents: 5089e74
Author: Alex Petrov 
Authored: Fri Mar 10 15:39:30 2017 +0100
Committer: Alex Petrov 
Committed: Thu Apr 20 11:26:25 2017 +0200

--
 CHANGES.txt |  1 +
 .../index/internal/CassandraIndexTest.java  | 39 +---
 2 files changed, 10 insertions(+), 30 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e5c2a183/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index e55d4cb..11881e9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.14
+ * Avoid name clashes in CassandraIndexTest (CASSANDRA-13427)
  * Handling partially written hint files (CASSANDRA-12728) 
  * Interrupt replaying hints on decommission (CASSANDRA-13308)
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e5c2a183/test/unit/org/apache/cassandra/index/internal/CassandraIndexTest.java
--
diff --git 
a/test/unit/org/apache/cassandra/index/internal/CassandraIndexTest.java 
b/test/unit/org/apache/cassandra/index/internal/CassandraIndexTest.java
index 6c309ac..68fe42d 100644
--- a/test/unit/org/apache/cassandra/index/internal/CassandraIndexTest.java
+++ b/test/unit/org/apache/cassandra/index/internal/CassandraIndexTest.java
@@ -60,7 +60,6 @@ public class CassandraIndexTest extends CQLTester
 {
 new TestScript().tableDefinition("CREATE TABLE %s (k int, c int, v 
int, PRIMARY KEY (k, c));")
 .target("v")
-.indexName("v_index")
 .withFirstRow(row(0, 0, 0))
 .withSecondRow(row(1, 1, 1))
 
.missingIndexMessage(StatementRestrictions.REQUIRES_ALLOW_FILTERING_MESSAGE)
@@ -77,7 +76,6 @@ public class CassandraIndexTest extends CQLTester
 // No update allowed on primary key columns, so this script has no 
update expression
 new TestScript().tableDefinition("CREATE TABLE %s (k int, c int, v 
int, PRIMARY KEY (k, c));")
 .target("c")
-.indexName("c_index")
 .withFirstRow(row(0, 0, 0))
 .withSecondRow(row(1, 1, 1))
 
.missingIndexMessage(StatementRestrictions.REQUIRES_ALLOW_FILTERING_MESSAGE)
@@ -92,7 +90,6 @@ public class CassandraIndexTest extends CQLTester
 // No update allowed on primary key columns, so this script has no 
update expression
 new TestScript().tableDefinition("CREATE TABLE %s (k int, c1 int, c2 
int, v int, PRIMARY KEY (k, c1, c2));")
 .target("c2")
-.indexName("c2_index")
 .withFirstRow(row(0, 0, 0, 0))
 .withSecondRow(row(1, 1, 1, 1))
 .missingIndexMessage(String.format("PRIMARY KEY column 
\"%s\" cannot be restricted " +
@@ -109,7 +106,6 @@ public class CassandraIndexTest extends CQLTester
 // No update allowed on primary key columns, so this script has no 
update expression
 new TestScript().tableDefinition("CREATE TABLE %s (k1 int, k2 int, c1 
int, c2 int, v int, PRIMARY KEY ((k1, k2), c1, c2));")
 .target("k1")
-.indexName("k1_index")
 .withFirstRow(row(0, 0, 0, 0, 0))
 .withSecondRow(row(1, 1, 1, 1, 1))
 .missingIndexMessage("Partition key parts: k2 must be 
restricted as other parts are")
@@ -124,7 +120,6 @@ public class CassandraIndexTest extends CQLTester
 // No update allowed on primary key columns, so this script has no 
update expression
 new TestScript().tableDefinition("CREATE TABLE %s (k1 int, k2 int, c1 
int, c2 int, v int, PRIMARY KEY ((k1, k2), c1, c2));")
 .target("k2")
-.indexName("k2_index")
 .withFirstRow(row(0, 0, 0, 0, 0))
 .withSecondRow(row(1, 1, 1, 1, 1))
 

[jira] [Created] (CASSANDRA-13464) Failed to create Materialized view with a specific token range

2017-04-20 Thread Natsumi Kojima (JIRA)
Natsumi Kojima created CASSANDRA-13464:
--

 Summary: Failed to create Materialized view with a specific token 
range
 Key: CASSANDRA-13464
 URL: https://issues.apache.org/jira/browse/CASSANDRA-13464
 Project: Cassandra
  Issue Type: Improvement
Reporter: Natsumi Kojima
Priority: Minor


Failed to create Materialized view with a specific token range.

Example :

{code:java}
$ ccm create "MaterializedView" -v 3.0.13
$ ccm populate  -n 3
$ ccm start
$ ccm status
Cluster: 'MaterializedView'
---
node1: UP
node3: UP
node2: UP
$ccm node1 cqlsh
Connected to MaterializedView at 127.0.0.1:9042.
[cqlsh 5.0.1 | Cassandra 3.0.13 | CQL spec 3.4.0 | Native protocol v4]
Use HELP for help.
cqlsh> CREATE KEYSPACE test WITH replication = {'class':'SimpleStrategy', 
'replication_factor':3};
cqlsh> CREATE TABLE test.test ( id text PRIMARY KEY , value1 text , value2 
text, value3 text);

$ccm node1 ring test 
Datacenter: datacenter1
==
AddressRackStatus State   LoadOwnsToken
  
3074457345618258602
127.0.0.1  rack1   Up Normal  64.86 KB100.00% 
-9223372036854775808
127.0.0.2  rack1   Up Normal  86.49 KB100.00% 
-3074457345618258603
127.0.0.3  rack1   Up Normal  89.04 KB100.00% 
3074457345618258602

$ ccm node1 cqlsh
cqlsh> INSERT INTO test.test (id, value1 , value2, value3 ) VALUES ('aaa', 
'aaa', 'aaa' ,'aaa');
cqlsh> INSERT INTO test.test (id, value1 , value2, value3 ) VALUES ('bbb', 
'bbb', 'bbb' ,'bbb');
cqlsh> SELECT token(id),id,value1 FROM test.test;

 system.token(id) | id  | value1
--+-+
 -4737872923231490581 | aaa |aaa
 -3071845237020185195 | bbb |bbb

(2 rows)

cqlsh> CREATE MATERIALIZED VIEW test.test_view AS SELECT value1, id FROM 
test.test WHERE id IS NOT NULL AND value1 IS NOT NULL AND TOKEN(id) > 
-9223372036854775808 AND TOKEN(id) < -3074457345618258603 PRIMARY KEY(value1, 
id) WITH CLUSTERING ORDER BY (id ASC);
ServerError: java.lang.ClassCastException: 
org.apache.cassandra.cql3.TokenRelation cannot be cast to 
org.apache.cassandra.cql3.SingleColumnRelation
{code}

Stacktrace :
{code:java}
INFO  [MigrationStage:1] 2017-04-19 18:32:48,131 ColumnFamilyStore.java:389 - 
Initializing test.test
WARN  [SharedPool-Worker-1] 2017-04-19 18:44:07,263 FBUtilities.java:337 - 
Trigger directory doesn't exist, please create it and try again.
ERROR [SharedPool-Worker-1] 2017-04-19 18:46:10,072 QueryMessage.java:128 - 
Unexpected error during query
java.lang.ClassCastException: org.apache.cassandra.cql3.TokenRelation cannot be 
cast to org.apache.cassandra.cql3.SingleColumnRelation
at 
org.apache.cassandra.db.view.View.relationsToWhereClause(View.java:275) 
~[apache-cassandra-3.0.13.jar:3.0.13]
at 
org.apache.cassandra.cql3.statements.CreateViewStatement.announceMigration(CreateViewStatement.java:219)
 ~[apache-cassandra-3.0.13.jar:3.0.13]
at 
org.apache.cassandra.cql3.statements.SchemaAlteringStatement.execute(SchemaAlteringStatement.java:93)
 ~[apache-cassandra-3.0.13.jar:3.0.13]
at 
org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:206)
 ~[apache-cassandra-3.0.13.jar:3.0.13]
at 
org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:237) 
~[apache-cassandra-3.0.13.jar:3.0.13]
at 
org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:222) 
~[apache-cassandra-3.0.13.jar:3.0.13]
at 
org.apache.cassandra.transport.messages.QueryMessage.execute(QueryMessage.java:115)
 ~[apache-cassandra-3.0.13.jar:3.0.13]
at 
org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:513)
 [apache-cassandra-3.0.13.jar:3.0.13]
at 
org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:407)
 [apache-cassandra-3.0.13.jar:3.0.13]
at 
io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
 [netty-all-4.0.44.Final.jar:4.0.44.Final]
at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:357)
 [netty-all-4.0.44.Final.jar:4.0.44.Final]
at 
io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:35)
 [netty-all-4.0.44.Final.jar:4.0.44.Final]
at 
io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:348)
 [netty-all-4.0.44.Final.jar:4.0.44.Final]
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
[na:1.8.0_121]
at 
org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:164)
 

[jira] [Updated] (CASSANDRA-13276) Regression on CASSANDRA-11416: can't load snapshots of tables with dropped columns

2017-04-20 Thread Alex Petrov (JIRA)

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

Alex Petrov updated CASSANDRA-13276:

Status: Ready to Commit  (was: Patch Available)

> Regression on CASSANDRA-11416: can't load snapshots of tables with dropped 
> columns
> --
>
> Key: CASSANDRA-13276
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13276
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Matt Kopit
>Assignee: Andrés de la Peña
> Fix For: 3.0.x, 3.11.x, 4.x
>
>
> I'm running Cassandra 3.10 and running into the exact same issue described in 
> CASSANDRA-11416: 
> 1. A table is created with columns 'a' and 'b'
> 2. Data is written to the table
> 3. Drop column 'b'
> 4. Take a snapshot
> 5. Drop the table
> 6. Run the snapshot schema.cql to recreate the table and the run the alter
> 7. Try to restore the snapshot data using sstableloader
> sstableloader yields the error:
> java.lang.RuntimeException: Unknown column b during deserialization



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13276) Regression on CASSANDRA-11416: can't load snapshots of tables with dropped columns

2017-04-20 Thread Alex Petrov (JIRA)

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

Alex Petrov commented on CASSANDRA-13276:
-

+1, the patch looks good!

> Regression on CASSANDRA-11416: can't load snapshots of tables with dropped 
> columns
> --
>
> Key: CASSANDRA-13276
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13276
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Matt Kopit
>Assignee: Andrés de la Peña
> Fix For: 3.0.x, 3.11.x, 4.x
>
>
> I'm running Cassandra 3.10 and running into the exact same issue described in 
> CASSANDRA-11416: 
> 1. A table is created with columns 'a' and 'b'
> 2. Data is written to the table
> 3. Drop column 'b'
> 4. Take a snapshot
> 5. Drop the table
> 6. Run the snapshot schema.cql to recreate the table and the run the alter
> 7. Try to restore the snapshot data using sstableloader
> sstableloader yields the error:
> java.lang.RuntimeException: Unknown column b during deserialization



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Assigned] (CASSANDRA-13403) nodetool repair breaks SASI index

2017-04-20 Thread Alex Petrov (JIRA)

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

Alex Petrov reassigned CASSANDRA-13403:
---

Assignee: Alex Petrov

> nodetool repair breaks SASI index
> -
>
> Key: CASSANDRA-13403
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13403
> Project: Cassandra
>  Issue Type: Bug
>  Components: sasi
> Environment: 3.10
>Reporter: Igor Novgorodov
>Assignee: Alex Petrov
>
> I've got table:
> {code}
> CREATE TABLE cservice.bulks_recipients (
> recipient text,
> bulk_id uuid,
> datetime_final timestamp,
> datetime_sent timestamp,
> request_id uuid,
> status int,
> PRIMARY KEY (recipient, bulk_id)
> ) WITH CLUSTERING ORDER BY (bulk_id ASC)
> AND bloom_filter_fp_chance = 0.01
> AND caching = {'keys': 'ALL', 'rows_per_partition': 'ALL'}
> AND comment = ''
> AND compaction = {'class': 
> 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 
> 'max_threshold': '32', 'min_threshold': '4'}
> AND compression = {'chunk_length_in_kb': '64', 'class': 
> 'org.apache.cassandra.io.compress.LZ4Compressor'}
> AND crc_check_chance = 1.0
> AND dclocal_read_repair_chance = 0.1
> AND default_time_to_live = 0
> AND gc_grace_seconds = 864000
> AND max_index_interval = 2048
> AND memtable_flush_period_in_ms = 0
> AND min_index_interval = 128
> AND read_repair_chance = 0.0
> AND speculative_retry = '99PERCENTILE';
> CREATE CUSTOM INDEX bulk_recipients_bulk_id ON cservice.bulks_recipients 
> (bulk_id) USING 'org.apache.cassandra.index.sasi.SASIIndex';
> {code}
> There are 11 rows in it:
> {code}
> > select * from bulks_recipients;
> ...
> (11 rows)
> {code}
> Let's query by index (all rows have the same *bulk_id*):
> {code}
> > select * from bulks_recipients where bulk_id = 
> > baa94815-e276-4ca4-adda-5b9734e6c4a5;   
> >   
> ...
> (11 rows)
> {code}
> Ok, everything is fine.
> Now i'm doing *nodetool repair --partitioner-range --job-threads 4 --full* on 
> each node in cluster sequentially.
> After it finished:
> {code}
> > select * from bulks_recipients where bulk_id = 
> > baa94815-e276-4ca4-adda-5b9734e6c4a5;
> ...
> (2 rows)
> {code}
> Only two rows.
> While the rows are actually there:
> {code}
> > select * from bulks_recipients;
> ...
> (11 rows)
> {code}
> If i issue an incremental repair on a random node, i can get like 7 rows 
> after index query.
> Dropping index and recreating it fixes the issue. Is it a bug or am i doing 
> the repair the wrong way?



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13412) Update of column with TTL results in secondary index not returning row

2017-04-20 Thread Alex Petrov (JIRA)

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

Alex Petrov commented on CASSANDRA-13412:
-

+1, the patch looks good.

Minor remark: we might want to add a test for a regular column expiry, too 
(e.g. that the new value isn't queryable) and possibly add same tests to 3.0+, 
as the behaviour is important (although it does work on the later branches).

> Update of column with TTL results in secondary index not returning row
> --
>
> Key: CASSANDRA-13412
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13412
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Enrique Bautista Barahona
>Assignee: Andrés de la Peña
> Fix For: 2.1.x, 2.2.x
>
>
> Cassandra versions: 2.2.3, 3.0.11
> 1 datacenter, keyspace has RF 3. Default consistency level.
> Steps:
> 1. I create these table and index.
> {code}
> CREATE TABLE my_table (
> a text,
> b text,
> c text,
> d set,
> e float,
> f text,
> g int,
> h double,
> j set,
> k float,
> m set,
> PRIMARY KEY (a, b, c)
> ) WITH read_repair_chance = 0.0
>AND dclocal_read_repair_chance = 0.1
>AND gc_grace_seconds = 864000
>AND bloom_filter_fp_chance = 0.01
>AND caching = { 'keys' : 'ALL', 'rows_per_partition' : 'NONE' }
>AND comment = ''
>AND compaction = { 'class' : 
> 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy' }
>AND compression = { 'sstable_compression' : 
> 'org.apache.cassandra.io.compress.LZ4Compressor' }
>AND default_time_to_live = 0
>AND speculative_retry = '99.0PERCENTILE'
>AND min_index_interval = 128
>AND max_index_interval = 2048;
> CREATE INDEX my_index ON my_table (c);
> {code}
> 2. I have 9951 INSERT statements in a file and I run the following command to 
> execute them. The INSERT statements have no TTL and no consistency level is 
> specified.
> {code}
> cqlsh   -u  -f 
> {code}
> 3. I update a column filtering by the whole primary key, and setting a TTL. 
> For example:
> {code}
> UPDATE my_table USING TTL 30 SET h = 10 WHERE a = 'test_a' AND b = 'test_b' 
> AND c = 'test_c';
> {code}
> 4. After the time specified in the TTL I run the following queries:
> {code}
> SELECT * FROM my_table WHERE a = 'test_a' AND b = 'test_b' AND c = 'test_c';
> SELECT * FROM my_table WHERE c = 'test_c';
> {code}
> The first one returns the correct row with an empty h column (as it has 
> expired). However, the second query (which uses the secondary index on column 
> c) returns nothing.
> I've done the query through my app which uses the Java driver v3.0.4 and 
> reads with CL local_one, from the cql shell and from DBeaver 3.8.5. All 
> display the same behaviour. The queries are performed minutes after the 
> writes and the servers don't have a high load, so I think it's unlikely to be 
> a consistency issue.
> I've tried to reproduce the issue in ccm and cqlsh by creating a new keyspace 
> and table, and inserting just 1 row, and the bug doesn't manifest. This leads 
> me to think that it's an issue only present with not trivially small amounts 
> of data, or maybe present only after Cassandra compacts or performs whatever 
> maintenance it needs to do.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Comment Edited] (CASSANDRA-13412) Update of column with TTL results in secondary index not returning row

2017-04-20 Thread Alex Petrov (JIRA)

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

Alex Petrov edited comment on CASSANDRA-13412 at 4/20/17 8:20 AM:
--

+1, the patch looks good.

Minor remark: we might want to add a test for a regular column, too (e.g. that 
the new value isn't queryable) and possibly add same tests to 3.0+, as the 
behaviour is important (although it does work on the later branches).


was (Author: ifesdjeen):
+1, the patch looks good.

Minor remark: we might want to add a test for a regular column expiry, too 
(e.g. that the new value isn't queryable) and possibly add same tests to 3.0+, 
as the behaviour is important (although it does work on the later branches).

> Update of column with TTL results in secondary index not returning row
> --
>
> Key: CASSANDRA-13412
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13412
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Enrique Bautista Barahona
>Assignee: Andrés de la Peña
> Fix For: 2.1.x, 2.2.x
>
>
> Cassandra versions: 2.2.3, 3.0.11
> 1 datacenter, keyspace has RF 3. Default consistency level.
> Steps:
> 1. I create these table and index.
> {code}
> CREATE TABLE my_table (
> a text,
> b text,
> c text,
> d set,
> e float,
> f text,
> g int,
> h double,
> j set,
> k float,
> m set,
> PRIMARY KEY (a, b, c)
> ) WITH read_repair_chance = 0.0
>AND dclocal_read_repair_chance = 0.1
>AND gc_grace_seconds = 864000
>AND bloom_filter_fp_chance = 0.01
>AND caching = { 'keys' : 'ALL', 'rows_per_partition' : 'NONE' }
>AND comment = ''
>AND compaction = { 'class' : 
> 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy' }
>AND compression = { 'sstable_compression' : 
> 'org.apache.cassandra.io.compress.LZ4Compressor' }
>AND default_time_to_live = 0
>AND speculative_retry = '99.0PERCENTILE'
>AND min_index_interval = 128
>AND max_index_interval = 2048;
> CREATE INDEX my_index ON my_table (c);
> {code}
> 2. I have 9951 INSERT statements in a file and I run the following command to 
> execute them. The INSERT statements have no TTL and no consistency level is 
> specified.
> {code}
> cqlsh   -u  -f 
> {code}
> 3. I update a column filtering by the whole primary key, and setting a TTL. 
> For example:
> {code}
> UPDATE my_table USING TTL 30 SET h = 10 WHERE a = 'test_a' AND b = 'test_b' 
> AND c = 'test_c';
> {code}
> 4. After the time specified in the TTL I run the following queries:
> {code}
> SELECT * FROM my_table WHERE a = 'test_a' AND b = 'test_b' AND c = 'test_c';
> SELECT * FROM my_table WHERE c = 'test_c';
> {code}
> The first one returns the correct row with an empty h column (as it has 
> expired). However, the second query (which uses the secondary index on column 
> c) returns nothing.
> I've done the query through my app which uses the Java driver v3.0.4 and 
> reads with CL local_one, from the cql shell and from DBeaver 3.8.5. All 
> display the same behaviour. The queries are performed minutes after the 
> writes and the servers don't have a high load, so I think it's unlikely to be 
> a consistency issue.
> I've tried to reproduce the issue in ccm and cqlsh by creating a new keyspace 
> and table, and inserting just 1 row, and the bug doesn't manifest. This leads 
> me to think that it's an issue only present with not trivially small amounts 
> of data, or maybe present only after Cassandra compacts or performs whatever 
> maintenance it needs to do.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13265) Expiration in OutboundTcpConnection can block the reader Thread

2017-04-20 Thread Christian Esken (JIRA)

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

Christian Esken commented on CASSANDRA-13265:
-

Unfortunately some test failed, not because of bugs but due to technical 
issues, mostly with 
"com.datastax.driver.core.exceptions.NoHostAvailableException". Are these the 
"dtest" issues in CircleCI you mentioned?

I tried to run the tests locally, but even "ant test" runs > 1 hour and keeps 
failing  with Timeout, NoHostAvailableException, or similar. I don't know why 
the tests fail, as my Laptop should be capable of doing it. I am frequently 
running a 3-node Cassandra on it via ccm and that works properly.

Currently I think I did all I can do. Let me know if I can check something 
else. What is your proposal how do we continue here?

> Expiration in OutboundTcpConnection can block the reader Thread
> ---
>
> Key: CASSANDRA-13265
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13265
> Project: Cassandra
>  Issue Type: Bug
> Environment: Cassandra 3.0.9
> Java HotSpot(TM) 64-Bit Server VM version 25.112-b15 (Java version 
> 1.8.0_112-b15)
> Linux 3.16
>Reporter: Christian Esken
>Assignee: Christian Esken
> Fix For: 3.0.x
>
> Attachments: cassandra.pb-cache4-dus.2017-02-17-19-36-26.chist.xz, 
> cassandra.pb-cache4-dus.2017-02-17-19-36-26.td.xz
>
>
> I observed that sometimes a single node in a Cassandra cluster fails to 
> communicate to the other nodes. This can happen at any time, during peak load 
> or low load. Restarting that single node from the cluster fixes the issue.
> Before going in to details, I want to state that I have analyzed the 
> situation and am already developing a possible fix. Here is the analysis so 
> far:
> - A Threaddump in this situation showed  324 Threads in the 
> OutboundTcpConnection class that want to lock the backlog queue for doing 
> expiration.
> - A class histogram shows 262508 instances of 
> OutboundTcpConnection$QueuedMessage.
> What is the effect of it? As soon as the Cassandra node has reached a certain 
> amount of queued messages, it starts thrashing itself to death. Each of the 
> Thread fully locks the Queue for reading and writing by calling 
> iterator.next(), making the situation worse and worse.
> - Writing: Only after 262508 locking operation it can progress with actually 
> writing to the Queue.
> - Reading: Is also blocked, as 324 Threads try to do iterator.next(), and 
> fully lock the Queue
> This means: Writing blocks the Queue for reading, and readers might even be 
> starved which makes the situation even worse.
> -
> The setup is:
>  - 3-node cluster
>  - replication factor 2
>  - Consistency LOCAL_ONE
>  - No remote DC's
>  - high write throughput (10 INSERT statements per second and more during 
> peak times).
>  



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-11409) set read repair chance to 0 but find read repair process in trace

2017-04-20 Thread JIRA

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

翟玉勇 commented on CASSANDRA-11409:
-

logger.trace("AlwaysSpeculatingReadExecutor=targetReplicas=" + targetReplicas + 
"keyspace=" + keyspace + " and allReplicas=" + allReplicas + " and 
repairDecision=" + repairDecision + " and 
blockfor="+consistencyLevel.blockFor(keyspace));
return new AlwaysSpeculatingReadExecutor(cfs, command, 
consistencyLevel, targetReplicas);

我在这里打印日志发现的

> set read repair chance to 0 but find read repair process in trace
> -
>
> Key: CASSANDRA-11409
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11409
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL, Distributed Metadata
> Environment: Cassandra 2.1.13 with centos 7
>Reporter: Ryan Cho
>  Labels: lhf
> Attachments: 螢幕快照 2016-03-23 下午2.06.10.png
>
>
> I have set  dclocal_read_repair_chance and read_repair_chance to 0.0 for one 
> month, but I still find "Read-repair DC_LOCAL" and "Initiating read-repair" 
> activities in system_trace.events, and  query was executed in these two days 
> and long time after set read repair chance to 0.0 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-11409) set read repair chance to 0 but find read repair process in trace

2017-04-20 Thread JIRA

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

翟玉勇 commented on CASSANDRA-11409:
-

这个不是bug,
那个Read-repair DC_LOCAL是每次操作读取system_auth keyspace 
的表时候dclocal_read_repair_chance = 0.1时候触发的,只不过把读取权限表的trace信息显示上去了


> set read repair chance to 0 but find read repair process in trace
> -
>
> Key: CASSANDRA-11409
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11409
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL, Distributed Metadata
> Environment: Cassandra 2.1.13 with centos 7
>Reporter: Ryan Cho
>  Labels: lhf
> Attachments: 螢幕快照 2016-03-23 下午2.06.10.png
>
>
> I have set  dclocal_read_repair_chance and read_repair_chance to 0.0 for one 
> month, but I still find "Read-repair DC_LOCAL" and "Initiating read-repair" 
> activities in system_trace.events, and  query was executed in these two days 
> and long time after set read repair chance to 0.0 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CASSANDRA-13462) Unexpected behaviour with range queries on UUIDs

2017-04-20 Thread Andrew Jefferson (JIRA)

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

Andrew Jefferson commented on CASSANDRA-13462:
--

Thanks for the response. I understand that this won't change because of the way 
the clustering relates to sorting on disk. I'm aware that sorting of timeuuids 
is important.

Because timeuuid and uuid are documented as different types and can be 
specified explicitly on a column I had thought that the time-based sorting 
would only apply if I did:

```
CREATE TABLE time_sorted (
  pk int PRIMARY KEY,
  ck timeuuid,
  val int
);
```

I had hoped that this would not force time-uuid style comparison:
```
CREATE TABLE if_only_it_were_value_sorted (
  pk int PRIMARY KEY,
  ck uuid,
  val int
);
```

> Unexpected behaviour with range queries on UUIDs
> 
>
> Key: CASSANDRA-13462
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13462
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Andrew Jefferson
>
> My expectation is that UUIDs should behave as 128 bit integers for comparison.
> However it seems that the Cassandra implementation compares first the uuid 
> version number, then the remaining values of the uuid.
> e.g. in C*
>  1000--3000--
>  is greater than 
> 2000--1000-- 
> (n.b. the 13th value is the uuid version)
>  - this is consistent across range queries and using ORDER BY 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (CASSANDRA-13412) Update of column with TTL results in secondary index not returning row

2017-04-20 Thread Alex Petrov (JIRA)

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

Alex Petrov updated CASSANDRA-13412:

Reproduced In: 2.2.9, 2.1.17  (was: 2.1.17, 2.2.9)
 Reviewer: Alex Petrov

> Update of column with TTL results in secondary index not returning row
> --
>
> Key: CASSANDRA-13412
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13412
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Enrique Bautista Barahona
>Assignee: Andrés de la Peña
> Fix For: 2.1.x, 2.2.x
>
>
> Cassandra versions: 2.2.3, 3.0.11
> 1 datacenter, keyspace has RF 3. Default consistency level.
> Steps:
> 1. I create these table and index.
> {code}
> CREATE TABLE my_table (
> a text,
> b text,
> c text,
> d set,
> e float,
> f text,
> g int,
> h double,
> j set,
> k float,
> m set,
> PRIMARY KEY (a, b, c)
> ) WITH read_repair_chance = 0.0
>AND dclocal_read_repair_chance = 0.1
>AND gc_grace_seconds = 864000
>AND bloom_filter_fp_chance = 0.01
>AND caching = { 'keys' : 'ALL', 'rows_per_partition' : 'NONE' }
>AND comment = ''
>AND compaction = { 'class' : 
> 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy' }
>AND compression = { 'sstable_compression' : 
> 'org.apache.cassandra.io.compress.LZ4Compressor' }
>AND default_time_to_live = 0
>AND speculative_retry = '99.0PERCENTILE'
>AND min_index_interval = 128
>AND max_index_interval = 2048;
> CREATE INDEX my_index ON my_table (c);
> {code}
> 2. I have 9951 INSERT statements in a file and I run the following command to 
> execute them. The INSERT statements have no TTL and no consistency level is 
> specified.
> {code}
> cqlsh   -u  -f 
> {code}
> 3. I update a column filtering by the whole primary key, and setting a TTL. 
> For example:
> {code}
> UPDATE my_table USING TTL 30 SET h = 10 WHERE a = 'test_a' AND b = 'test_b' 
> AND c = 'test_c';
> {code}
> 4. After the time specified in the TTL I run the following queries:
> {code}
> SELECT * FROM my_table WHERE a = 'test_a' AND b = 'test_b' AND c = 'test_c';
> SELECT * FROM my_table WHERE c = 'test_c';
> {code}
> The first one returns the correct row with an empty h column (as it has 
> expired). However, the second query (which uses the secondary index on column 
> c) returns nothing.
> I've done the query through my app which uses the Java driver v3.0.4 and 
> reads with CL local_one, from the cql shell and from DBeaver 3.8.5. All 
> display the same behaviour. The queries are performed minutes after the 
> writes and the servers don't have a high load, so I think it's unlikely to be 
> a consistency issue.
> I've tried to reproduce the issue in ccm and cqlsh by creating a new keyspace 
> and table, and inserting just 1 row, and the bug doesn't manifest. This leads 
> me to think that it's an issue only present with not trivially small amounts 
> of data, or maybe present only after Cassandra compacts or performs whatever 
> maintenance it needs to do.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (CASSANDRA-13455) lose check of null strings in decoding client token

2017-04-20 Thread Robert Stupp (JIRA)

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

Robert Stupp updated CASSANDRA-13455:
-
   Resolution: Not A Problem
Fix Version/s: (was: 3.10)
   Status: Resolved  (was: Patch Available)

> lose check of null strings in decoding client token
> ---
>
> Key: CASSANDRA-13455
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13455
> Project: Cassandra
>  Issue Type: Bug
> Environment: CentOS7.2
> Java 1.8
>Reporter: Amos Jianjun Kong
>Assignee: Amos Jianjun Kong
> Attachments: 0001-auth-check-both-null-points-and-null-strings.patch, 
> 0001-auth-strictly-delimit-in-decoding-client-token.patch
>
>
> RFC4616 requests AuthZID, USERNAME, PASSWORD are delimited by single '\000'.
> Current code actually delimits by serial '\000', when username or password
> is null, it caused decoding derangement.
> The problem was found in code review.
> 
> update: above description is wrong, the problem is that :
> When client responses null strings for username or password,
> current decodeCredentials() can't identify it.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)