[jira] [Commented] (CASSANDRA-7839) Support standard EC2 naming conventions in Ec2Snitch

2018-03-29 Thread Joseph Lynch (JIRA)

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

Joseph Lynch commented on CASSANDRA-7839:
-

Looks good to me. I left some 
[comments/suggestions|https://github.com/jolynch/cassandra/pull/1#pullrequestreview-108212903],
 mostly readability and clarity. I think the legacy option is all anyone should 
need when upgrading to 4.0 :-)

> Support standard EC2 naming conventions in Ec2Snitch
> 
>
> Key: CASSANDRA-7839
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7839
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Gregory Ramsperger
>Assignee: Jason Brown
>Priority: Major
>  Labels: docs-impacting
> Attachments: CASSANDRA-7839-aws-naming-conventions.patch
>
>
> The EC2 snitches use datacenter and rack naming conventions inconsistent with 
> those presented in Amazon EC2 APIs as region and availability zone. A 
> discussion of this is found in CASSANDRA-4026. This has not been changed for 
> valid backwards compatibility reasons. Using SnitchProperties, it is possible 
> to switch between the legacy naming and the full, AWS-style naming. 
> Proposal:
> * introduce a property (ec2_naming_scheme) to switch naming schemes.
> * default to current/legacy naming scheme
> * add support for a new scheme ("standard") which is consistent AWS 
> conventions
> ** data centers will be the region name, including the number
> ** racks will be the availability zone name, including the region name
> Examples:
> * * legacy* : datacenter is the part of the availability zone name preceding 
> the last "\-" when the zone ends in \-1 and includes the number if not \-1. 
> Rack is the portion of the availability zone name following  the last "\-".
> ** us-west-1a => dc: us-west, rack: 1a
> ** us-west-2b => dc: us-west-2, rack: 2b; 
> * *standard* : datacenter is the part of the availability zone name preceding 
> zone letter. rack is the entire availability zone name.
> ** us-west-1a => dc: us-west-1, rack: us-west-1a
> ** us-west-2b => dc: us-west-2, rack: us-west-2b; 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Created] (CASSANDRA-14355) Memory leak

2018-03-29 Thread Eric Evans (JIRA)
Eric Evans created CASSANDRA-14355:
--

 Summary: Memory leak
 Key: CASSANDRA-14355
 URL: https://issues.apache.org/jira/browse/CASSANDRA-14355
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: Debian Jessie, OpenJDK 1.8.0_151
Reporter: Eric Evans
 Fix For: 3.11.3


We're seeing regular, frequent {{OutOfMemoryError}} exceptions.  Similar to 
CASSANDRA-13754, an analysis of the heap dumps shows the heap consumed by the 
{{threadLocals}} member of the instances of 
{{io.netty.util.concurrent.FastThreadLocalThread}}.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-14222) Add hot reloading of SSL Certificates capability to Cassandra

2018-03-29 Thread Dinesh Joshi (JIRA)

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

Dinesh Joshi commented on CASSANDRA-14222:
--

If anybody is interested, here is the patch backported for 3.0 - 
https://github.com/dineshjoshi/cassandra/commit/de707671533d468bc22277fa525d2cec37aa040d

> Add hot reloading of SSL Certificates capability to Cassandra
> -
>
> Key: CASSANDRA-14222
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14222
> Project: Cassandra
>  Issue Type: New Feature
>Reporter: Dinesh Joshi
>Assignee: Dinesh Joshi
>Priority: Major
>  Labels: security
> Fix For: 4.0
>
>
> Cassandra does not currently hot reload SSL certificates. For ease of 
> operation it would be useful if we add this capability. This patch would 
> watch changes to the truststore & keystore and would reload them when they're 
> changed.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-12804) CQL docs table of contents links are broken

2018-03-29 Thread Jon Haddad (JIRA)

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

Jon Haddad updated CASSANDRA-12804:
---
Resolution: Won't Fix
Status: Resolved  (was: Patch Available)

This doc is no longer maintained, the CQL docs can now be found at 
https://cassandra.apache.org/doc/latest/cql/index.html

> CQL docs table of contents links are broken
> ---
>
> Key: CASSANDRA-12804
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12804
> Project: Cassandra
>  Issue Type: Bug
>  Components: Documentation and Website
>Reporter: Evan Prothro
>Priority: Minor
>  Labels: lhf
>
> Example: Clicking on a link in the table of contents at 
> https://cassandra.apache.org/doc/cql3/CQL-3.0.html results in a 404 to 
> https://cassandra.apache.org/doc/cql3/CQL.html#Preamble
> This ticket proposes changing the paths of legacy CQL.html files so they 
> work, removing the textile source for this legacy doc (as it is replaced by 
> the in-tree sphinx docs now),  and updating the live docs to a sphinx build 
> from 3.9.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-12151) Audit logging for database activity

2018-03-29 Thread Vinay Chella (JIRA)

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

Vinay Chella commented on CASSANDRA-12151:
--

[~spo...@gmail.com] ,
{quote}I'd not use the logback logger for query logging in production. As shown 
recently in CASSANDRA-14318, the performance impact is significant and your 
benchmark results show that as well. Rotating out log files by simply deleting 
them is probably also not what you'd expect from an auditing solution.
{quote}
Agreed, yes, BinAuditLogger is the default for obvious reasons based on my perf 
numbers, but if any users are willing to use log back based AuditLogger thereby 
willing to compromise on performance while benefiting on easy readability, they 
can by changing the yaml configuration.
{quote}NIT: check logger.isEnabled before toString in FileAuditLogger
{quote}
FileAuditLogger::log method is called only when AuditLogger is enabled, do you 
think the redundant check is needed inside the IAuditLogger implementations as 
well?
{quote}But maybe we can keep the logback logger for some simple auth related 
logging and make it also useful for users who would not enable auditing in 
first place. How about enabling the FileAuditLogger by default and let it 
create an auth.log, which would log all failed login attempts? Maybe add a 
comment on how to enable successful attempts as well.
{quote}
Logging just auth failure attempts can be achieved by either the design idea 
that you brought up or new feature to filter {{include_auditlog_types}}. But 
not sure, if everyone would like or need auth failures attempts by default.

 

I also see good design ideas in terms of {{multiple implementations in 
parallel}} and feature requests {{include_auditlog_types}}, however, do you 
agree with me that it is a {{nice to have}} but not {{must to have}} feature 
considering the scope of the first iteration, to keep the initial 
implementation simple, iterate faster and changeset smaller? If you do, I can 
create followup JIRAs for the ideas that you proposed.

 

Hi [~chovatia.jayd...@gmail.com] .
{quote}Currently if audit is enabled then it will log all types of statements 
DDL|DML|DCL, people will have different requirements for logging (say only log 
DCL OR DCL + DDL etc.) given DML would generate huge volume of data, so I think 
we need to give better control to users as to what they want to log
{quote}
Correct, the current design enables users to have control of what to log since 
the use cases could be different (eg., DCL or DCL+DDL etc.,) using yaml 
configurations
{quote}probably at what frequency as well.
{quote}
I don't know as a database when it promises for audit logging for compliance if 
it does based on some probability. However, if you have such one of use case 
(e.g., audit logging for debugging needs instead of compliance needs), you can 
implement {{IAuditLogger}} or extend one of existing loggers to have 
{{FrequencyBasedAuditLogger}} which logs based on some probability. 

> Audit logging for database activity
> ---
>
> Key: CASSANDRA-12151
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12151
> Project: Cassandra
>  Issue Type: New Feature
>Reporter: stefan setyadi
>Assignee: Vinay Chella
>Priority: Major
> Fix For: 4.x
>
> Attachments: 12151.txt, CASSANDRA_12151-benchmark.html, 
> DesignProposal_AuditingFeature_ApacheCassandra_v1.docx
>
>
> we would like a way to enable cassandra to log database activity being done 
> on our server.
> It should show username, remote address, timestamp, action type, keyspace, 
> column family, and the query statement.
> it should also be able to log connection attempt and changes to the 
> user/roles.
> I was thinking of making a new keyspace and insert an entry for every 
> activity that occurs.
> Then It would be possible to query for specific activity or a query targeting 
> a specific keyspace and column family.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-12151) Audit logging for database activity

2018-03-29 Thread Jaydeepkumar Chovatia (JIRA)

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

Jaydeepkumar Chovatia commented on CASSANDRA-12151:
---

Hi [~vinaykumarcse]

Currently if audit is enabled then it will log all types of statements 
{{DDL|DML|DCL}}, people will have different requirements for logging (say only 
log {{DCL }} OR  {{DCL + DDL}} etc.) given {{DML}} would generate huge volume 
of data, so I think we need to give better control to users as to what they 
want to log and probably at what frequency as well.

Jaydeep

> Audit logging for database activity
> ---
>
> Key: CASSANDRA-12151
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12151
> Project: Cassandra
>  Issue Type: New Feature
>Reporter: stefan setyadi
>Assignee: Vinay Chella
>Priority: Major
> Fix For: 4.x
>
> Attachments: 12151.txt, CASSANDRA_12151-benchmark.html, 
> DesignProposal_AuditingFeature_ApacheCassandra_v1.docx
>
>
> we would like a way to enable cassandra to log database activity being done 
> on our server.
> It should show username, remote address, timestamp, action type, keyspace, 
> column family, and the query statement.
> it should also be able to log connection attempt and changes to the 
> user/roles.
> I was thinking of making a new keyspace and insert an entry for every 
> activity that occurs.
> Then It would be possible to query for specific activity or a query targeting 
> a specific keyspace and column family.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Assigned] (CASSANDRA-13855) URL Seed provider

2018-03-29 Thread Jon Haddad (JIRA)

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

Jon Haddad reassigned CASSANDRA-13855:
--

Assignee: Jon Haddad  (was: Akash Gangil)

> URL Seed provider
> -
>
> Key: CASSANDRA-13855
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13855
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Coordination, Core
>Reporter: Jon Haddad
>Assignee: Jon Haddad
>Priority: Minor
>  Labels: lhf
> Attachments: 0001-Add-URL-Seed-Provider-trunk.txt
>
>
> Seems like including a dead simple seed provider that can fetch from a URL, 1 
> line per seed, would be useful.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-13884) sstableloader option to accept target keyspace name

2018-03-29 Thread Jaydeepkumar Chovatia (JIRA)

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

Jaydeepkumar Chovatia commented on CASSANDRA-13884:
---

Thanks [~jay.zhuang]!

> sstableloader option to accept target keyspace name
> ---
>
> Key: CASSANDRA-13884
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13884
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Tools
>Reporter: Jaydeepkumar Chovatia
>Assignee: Jaydeepkumar Chovatia
>Priority: Minor
> Fix For: 4.0
>
>
> Often as part of backup people store entire {{data}} directory. When they see 
> some corruption in data then they would like to restore data in same cluster 
> (for large clusters 200 nodes) but with different keyspace name. 
> Currently {{sstableloader}} uses parent folder as {{keyspace}}, it would be 
> nice to have an option to specify target keyspace name as part of 
> {{sstableloader}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-13884) sstableloader option to accept target keyspace name

2018-03-29 Thread Jay Zhuang (JIRA)

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

Jay Zhuang updated CASSANDRA-13884:
---
Fix Version/s: (was: 4.x)
   4.0

> sstableloader option to accept target keyspace name
> ---
>
> Key: CASSANDRA-13884
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13884
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Tools
>Reporter: Jaydeepkumar Chovatia
>Assignee: Jaydeepkumar Chovatia
>Priority: Minor
> Fix For: 4.0
>
>
> Often as part of backup people store entire {{data}} directory. When they see 
> some corruption in data then they would like to restore data in same cluster 
> (for large clusters 200 nodes) but with different keyspace name. 
> Currently {{sstableloader}} uses parent folder as {{keyspace}}, it would be 
> nice to have an option to specify target keyspace name as part of 
> {{sstableloader}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-13884) sstableloader option to accept target keyspace name

2018-03-29 Thread Jay Zhuang (JIRA)

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

Jay Zhuang updated CASSANDRA-13884:
---
Resolution: Fixed
Status: Resolved  (was: Ready to Commit)

> sstableloader option to accept target keyspace name
> ---
>
> Key: CASSANDRA-13884
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13884
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Tools
>Reporter: Jaydeepkumar Chovatia
>Assignee: Jaydeepkumar Chovatia
>Priority: Minor
> Fix For: 4.x
>
>
> Often as part of backup people store entire {{data}} directory. When they see 
> some corruption in data then they would like to restore data in same cluster 
> (for large clusters 200 nodes) but with different keyspace name. 
> Currently {{sstableloader}} uses parent folder as {{keyspace}}, it would be 
> nice to have an option to specify target keyspace name as part of 
> {{sstableloader}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-13884) sstableloader option to accept target keyspace name

2018-03-29 Thread Jay Zhuang (JIRA)

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

Jay Zhuang commented on CASSANDRA-13884:


Thanks [~chovatia.jayd...@gmail.com] for the fix.
Committed 
[c22ee2b|https://github.com/apache/cassandra/commit/c22ee2bd451d030e99cfb65be839bbc735a5352f].

> sstableloader option to accept target keyspace name
> ---
>
> Key: CASSANDRA-13884
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13884
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Tools
>Reporter: Jaydeepkumar Chovatia
>Assignee: Jaydeepkumar Chovatia
>Priority: Minor
> Fix For: 4.x
>
>
> Often as part of backup people store entire {{data}} directory. When they see 
> some corruption in data then they would like to restore data in same cluster 
> (for large clusters 200 nodes) but with different keyspace name. 
> Currently {{sstableloader}} uses parent folder as {{keyspace}}, it would be 
> nice to have an option to specify target keyspace name as part of 
> {{sstableloader}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



cassandra git commit: Add sstableloader option to accept target keyspace name

2018-03-29 Thread jzhuang
Repository: cassandra
Updated Branches:
  refs/heads/trunk fc2e420fd -> c22ee2bd4


Add sstableloader option to accept target keyspace name

patch by Jaydeepkumar Chovatia; reviewed by Jay Zhuang for CASSANDRA-13884


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

Branch: refs/heads/trunk
Commit: c22ee2bd451d030e99cfb65be839bbc735a5352f
Parents: fc2e420
Author: jaydeepkumar1984 
Authored: Mon Sep 18 17:07:56 2017 -0700
Committer: Jay Zhuang 
Committed: Thu Mar 29 10:41:27 2018 -0700

--
 CHANGES.txt |  1 +
 .../cassandra/io/sstable/SSTableLoader.java |  6 +--
 .../org/apache/cassandra/tools/BulkLoader.java  |  3 +-
 .../apache/cassandra/tools/LoaderOptions.java   | 14 ++
 .../cassandra/io/sstable/SSTableLoaderTest.java | 48 
 5 files changed, 68 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c22ee2bd/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index c0551b7..04705ba 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 4.0
+ * Add sstableloader option to accept target keyspace name (CASSANDRA-13884)
  * Move processing of EchoMessage response to gossip stage (CASSANDRA-13713)
  * Add coordinator write metric per CF (CASSANDRA-14232)
  * Fix scheduling of speculative retry threshold recalculation 
(CASSANDRA-14338)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c22ee2bd/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 980fdf1..a6985f7 100644
--- a/src/java/org/apache/cassandra/io/sstable/SSTableLoader.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTableLoader.java
@@ -56,13 +56,13 @@ public class SSTableLoader implements StreamEventHandler
 
 public SSTableLoader(File directory, Client client, OutputHandler 
outputHandler)
 {
-this(directory, client, outputHandler, 1);
+this(directory, client, outputHandler, 1, null);
 }
 
-public SSTableLoader(File directory, Client client, OutputHandler 
outputHandler, int connectionsPerHost)
+public SSTableLoader(File directory, Client client, OutputHandler 
outputHandler, int connectionsPerHost, String targetKeyspace)
 {
 this.directory = directory;
-this.keyspace = directory.getParentFile().getName();
+this.keyspace = targetKeyspace != null ? targetKeyspace : 
directory.getParentFile().getName();
 this.client = client;
 this.outputHandler = outputHandler;
 this.connectionsPerHost = connectionsPerHost;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c22ee2bd/src/java/org/apache/cassandra/tools/BulkLoader.java
--
diff --git a/src/java/org/apache/cassandra/tools/BulkLoader.java 
b/src/java/org/apache/cassandra/tools/BulkLoader.java
index 545d1f7..d85c605 100644
--- a/src/java/org/apache/cassandra/tools/BulkLoader.java
+++ b/src/java/org/apache/cassandra/tools/BulkLoader.java
@@ -65,7 +65,8 @@ public class BulkLoader
 buildSSLOptions(options.clientEncOptions),
 options.allowServerPortDiscovery),
 handler,
-options.connectionsPerHost);
+options.connectionsPerHost,
+options.targetKeyspace);
 
DatabaseDescriptor.setStreamThroughputOutboundMegabitsPerSec(options.throttle);
 
DatabaseDescriptor.setInterDCStreamThroughputOutboundMegabitsPerSec(options.interDcThrottle);
 StreamResultFuture future = null;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c22ee2bd/src/java/org/apache/cassandra/tools/LoaderOptions.java
--
diff --git a/src/java/org/apache/cassandra/tools/LoaderOptions.java 
b/src/java/org/apache/cassandra/tools/LoaderOptions.java
index 3686584..d6cb670 100644
--- a/src/java/org/apache/cassandra/tools/LoaderOptions.java
+++ b/src/java/org/apache/cassandra/tools/LoaderOptions.java
@@ -38,6 +38,7 @@ import org.apache.cassandra.tools.BulkLoader.CmdLineOptions;
 import com.datastax.driver.core.AuthProvider;
 import com.datastax.driver.core.PlainTextAuthProvider;
 import org.apache.commons.cli.*;
+import org.apache.commons.lang3.StringUtils;
 
 

[jira] [Commented] (CASSANDRA-13855) URL Seed provider

2018-03-29 Thread Jon Haddad (JIRA)

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

Jon Haddad commented on CASSANDRA-13855:


[~denniskline] I'd prefer to keep the scope simple in the first release of this.

I'm going to take the task - I opened it 6 months ago at this point I'd just 
like to see it finished.

> URL Seed provider
> -
>
> Key: CASSANDRA-13855
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13855
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Coordination, Core
>Reporter: Jon Haddad
>Assignee: Akash Gangil
>Priority: Minor
>  Labels: lhf
> Attachments: 0001-Add-URL-Seed-Provider-trunk.txt
>
>
> Seems like including a dead simple seed provider that can fetch from a URL, 1 
> line per seed, would be useful.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-13855) URL Seed provider

2018-03-29 Thread Dennis Kline (JIRA)

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

Dennis Kline commented on CASSANDRA-13855:
--

I really like this idea of a UrlSeedProvider.  How do you all feel about a 
couple minor tweaks:
 * Allow customers to downgrade to preconfigured seeds (ie: maybe extend 
SimpleSeedProvider) if the URL endpoint is unreachable and preconfigured seeds 
have been set?
 * Allow URL to return more than just newline delimited seeds (perhaps a JSON 
array)?
 * Expose the dynamic seed list for each node as an mbean

Jon Haddad / Akash Gangil - I'd be happy to take a stab at this too if you are 
swamped with other things.

> URL Seed provider
> -
>
> Key: CASSANDRA-13855
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13855
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Coordination, Core
>Reporter: Jon Haddad
>Assignee: Akash Gangil
>Priority: Minor
>  Labels: lhf
> Attachments: 0001-Add-URL-Seed-Provider-trunk.txt
>
>
> Seems like including a dead simple seed provider that can fetch from a URL, 1 
> line per seed, would be useful.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-14353) Fix some regressions caused by 14058

2018-03-29 Thread Blake Eggleston (JIRA)

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

Blake Eggleston updated CASSANDRA-14353:

 Reviewer: Aleksey Yeschenko
Fix Version/s: 4.0
   Status: Patch Available  (was: Open)

[trunk|https://github.com/bdeggleston/cassandra/tree/14353]
[tests|https://circleci.com/workflow-run/1df11733-c32c-40cb-a862-9e807efd6258]

> Fix some regressions caused by 14058
> 
>
> Key: CASSANDRA-14353
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14353
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Blake Eggleston
>Assignee: Blake Eggleston
>Priority: Major
> Fix For: 4.0
>
>
> As [~iamaleksey] pointed out, CASSANDRA-14058 introduced a few regressions:
> {quote}
> Noticed a couple regressions when merging up CASSANDRA-14330:
> 1. {{DataResolver}} no longer uses 
> {{cassandra.drop_oversized_readrepair_mutations}} prop - and 
> {{DROP_OVERSIZED_READ_REPAIR_MUTATIONS}} constant is now unused, and the 
> feature is missing.
> 2. {{RowIteratorMergeListener}} re-thrown {{AssertionError}} no longer 
> includes the responses. This should be restored, as without it debugging RR 
> issues is an even worse, potentially impossible, nightmare.
> Nit: In {{DataResolver}}, {{repairResults}} field is now unused.
> {quote}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-14340) Refactor ColumnFamilyStore to Table

2018-03-29 Thread Jon Haddad (JIRA)

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

Jon Haddad commented on CASSANDRA-14340:


{quote}
JMX relies on the MBean name convention if I am not mistaken so I guess only 
the first one should work.
{quote}

Yep, this is correct.  I initially renamed only the class and you get 
compilation errors.  

{quote}
Are you considering to rename ColumnFamilyStoreCQLHelper class too? If yes, 
would you mind if I submitting a patch for it?
{quote}

I'd like to see all remnants of Thrift removed from the codebase in 4.0 so yes. 
 I opened up CASSANDRA-14339 for it.  Each class rename will be done on its own 
to minimize patch size and conflicts.  

> Refactor ColumnFamilyStore to Table
> ---
>
> Key: CASSANDRA-14340
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14340
> Project: Cassandra
>  Issue Type: Sub-task
>  Components: Core
>Reporter: Jon Haddad
>Assignee: Jon Haddad
>Priority: Major
>
> This end result of this should change the ColumnFamily store, 
> ColumnFamilyStoreMBean, and tests that reference them by name.
> Deserves a note in news as this will break JMX compatibility and affect 
> scripts which change log level by class.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Created] (CASSANDRA-14354) rename ColumnFamilyStoreCQLHelper to TableCQLHelper

2018-03-29 Thread Jon Haddad (JIRA)
Jon Haddad created CASSANDRA-14354:
--

 Summary: rename ColumnFamilyStoreCQLHelper to TableCQLHelper
 Key: CASSANDRA-14354
 URL: https://issues.apache.org/jira/browse/CASSANDRA-14354
 Project: Cassandra
  Issue Type: Sub-task
Reporter: Jon Haddad


Seems like a simple 1:1 rename.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Created] (CASSANDRA-14353) Fix some regressions caused by 14058

2018-03-29 Thread Blake Eggleston (JIRA)
Blake Eggleston created CASSANDRA-14353:
---

 Summary: Fix some regressions caused by 14058
 Key: CASSANDRA-14353
 URL: https://issues.apache.org/jira/browse/CASSANDRA-14353
 Project: Cassandra
  Issue Type: Improvement
Reporter: Blake Eggleston
Assignee: Blake Eggleston


As [~iamaleksey] pointed out, CASSANDRA-14058 introduced a few regressions:

{quote}
Noticed a couple regressions when merging up CASSANDRA-14330:
1. {{DataResolver}} no longer uses 
{{cassandra.drop_oversized_readrepair_mutations}} prop - and 
{{DROP_OVERSIZED_READ_REPAIR_MUTATIONS}} constant is now unused, and the 
feature is missing.
2. {{RowIteratorMergeListener}} re-thrown {{AssertionError}} no longer includes 
the responses. This should be restored, as without it debugging RR issues is an 
even worse, potentially impossible, nightmare.

Nit: In {{DataResolver}}, {{repairResults}} field is now unused.
{quote}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Created] (CASSANDRA-14352) Clean up parsing speculative retry params from string

2018-03-29 Thread Aleksey Yeschenko (JIRA)
Aleksey Yeschenko created CASSANDRA-14352:
-

 Summary: Clean up parsing speculative retry params from string
 Key: CASSANDRA-14352
 URL: https://issues.apache.org/jira/browse/CASSANDRA-14352
 Project: Cassandra
  Issue Type: Improvement
Reporter: Aleksey Yeschenko
Assignee: Aleksey Yeschenko
 Fix For: 4.x


Follow-up to CASSANDRA-14293, to put parsing logic ({{fromString()}}) next to 
formatting logic ({{toString()}}).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-14340) Refactor ColumnFamilyStore to Table

2018-03-29 Thread Venkata Harikrishna Nukala (JIRA)

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

Venkata Harikrishna Nukala commented on CASSANDRA-14340:


[~rustyrazorblade] Are you considering to rename ColumnFamilyStoreCQLHelper 
class too? If yes, would you mind if I submitting a patch for it?

> Refactor ColumnFamilyStore to Table
> ---
>
> Key: CASSANDRA-14340
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14340
> Project: Cassandra
>  Issue Type: Sub-task
>  Components: Core
>Reporter: Jon Haddad
>Assignee: Jon Haddad
>Priority: Major
>
> This end result of this should change the ColumnFamily store, 
> ColumnFamilyStoreMBean, and tests that reference them by name.
> Deserves a note in news as this will break JMX compatibility and affect 
> scripts which change log level by class.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-9261) Prepare and Snapshot for repairs should use higher timeouts for expiring map

2018-03-29 Thread sankalp kohli (JIRA)

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

sankalp kohli commented on CASSANDRA-9261:
--

Did it wait for 1 hour before timing out?

> Prepare and Snapshot for repairs should use higher timeouts for expiring map
> 
>
> Key: CASSANDRA-9261
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9261
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: sankalp kohli
>Assignee: sankalp kohli
>Priority: Minor
> Fix For: 2.1.6, 2.2.0 beta 1
>
> Attachments: 0001-make-prepare-snapshot-timeout-to-1-hour.patch, 
> trunk_9261.txt
>
>
> We wait for 1 hour after sending the prepare message but expiring map will 
> remove it after RPC timeout. 
> In snapshot during repair, we only wait for RPC time. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-14284) Chunk checksum test needs to occur before uncompress to avoid JVM crash

2018-03-29 Thread Branimir Lambov (JIRA)

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

Branimir Lambov commented on CASSANDRA-14284:
-

The rest looks fine with one nit, which you can feel free to ignore: you could 
now extract the crc checking logic to a common method for the normal and 
memmapped case (in trunk, the normal+uncompressed case has to remain separate, 
though).

> Chunk checksum test needs to occur before uncompress to avoid JVM crash
> ---
>
> Key: CASSANDRA-14284
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14284
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
> Environment: The check-only-after-doing-the-decompress logic appears 
> to be in all current releases.
> Here are some samples at different evolution points :
> 3.11.2:
> [https://github.com/apache/cassandra/blob/cassandra-3.11.2/src/java/org/apache/cassandra/io/util/CompressedChunkReader.java#L146]
> https://github.com/apache/cassandra/blob/cassandra-3.11.2/src/java/org/apache/cassandra/io/util/CompressedChunkReader.java#L207
>  
> 3.5:
>  
> [https://github.com/apache/cassandra/blob/cassandra-3.5/src/java/org/apache/cassandra/io/compress/CompressedRandomAccessReader.java#L135]
> [https://github.com/apache/cassandra/blob/cassandra-3.5/src/java/org/apache/cassandra/io/compress/CompressedRandomAccessReader.java#L196]
> 2.1.17:
>  
> [https://github.com/apache/cassandra/blob/cassandra-2.1.17/src/java/org/apache/cassandra/io/compress/CompressedRandomAccessReader.java#L122]
>  
>Reporter: Gil Tene
>Assignee: Benjamin Lerer
>Priority: Major
>
> While checksums are (generally) performed on compressed data, the checksum 
> test when reading is currently (in all variants of C* 2.x, 3.x I've looked 
> at) done [on the compressed data] only after the uncompress operation has 
> completed. 
> The issue here is that LZ4_decompress_fast (as documented in e.g. 
> [https://github.com/lz4/lz4/blob/dev/lib/lz4.h#L214)] can result in memory 
> overruns when provided with malformed source data. This in turn can (and 
> does, e.g. in CASSANDRA-13757) lead to JVM crashes during the uncompress of 
> corrupted chunks. The checksum operation would obviously detect the issue, 
> but we'd never get to it if the JVM crashes first.
> Moving the checksum test of the compressed data to before the uncompress 
> operation (in cases where the checksum is done on compressed data) will 
> resolve this issue.
> -
> The check-only-after-doing-the-decompress logic appears to be in all current 
> releases.
> Here are some samples at different evolution points :
> 3.11.2:
> [https://github.com/apache/cassandra/blob/cassandra-3.11.2/src/java/org/apache/cassandra/io/util/CompressedChunkReader.java#L146]
> https://github.com/apache/cassandra/blob/cassandra-3.11.2/src/java/org/apache/cassandra/io/util/CompressedChunkReader.java#L207
>  
> 3.5:
>  
> [https://github.com/apache/cassandra/blob/cassandra-3.5/src/java/org/apache/cassandra/io/compress/CompressedRandomAccessReader.java#L135]
> [https://github.com/apache/cassandra/blob/cassandra-3.5/src/java/org/apache/cassandra/io/compress/CompressedRandomAccessReader.java#L196]
> 2.1.17:
>  
> [https://github.com/apache/cassandra/blob/cassandra-2.1.17/src/java/org/apache/cassandra/io/compress/CompressedRandomAccessReader.java#L122]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-14155) [TRUNK] Gossiper somewhat frequently hitting an NPE on node startup with dtests at org.apache.cassandra.gms.Gossiper.isSafeForStartup(Gossiper.java:769)

2018-03-29 Thread Jason Brown (JIRA)

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

Jason Brown commented on CASSANDRA-14155:
-

bq. it would not include any state for that peer as the generation/version in 
the digest would match the one in the local epState

The SYN from the peer in a shadow round has an empty digest list; see 
{{Gossiper#doShadowRound()}} where the {{gDigests}} is created but nothing 
added to it. Thus, I believe node B from my example would send a list of 
{{InetAddress}} es with no {{ApplicationStates}}.

Either way, distributed data races are hard :) and I'm not sure we need to beat 
this horse further without more evidence.

bq. So I'm all for adding the check & assertion error in isSafeForStartup, 
although I think we ought to log more detail here, probably the epStates map in 
its entireity. I'm less comfortable with changing the behaviour of the shadow 
round if we're not really clear on what's causing it.

This is reasonable. Since we're adding logging for now for debug purposes, 
should I add to both 3.11 and trunk, or just trunk? (I'm leaning toward just 
trunk, but I'm fine either way)


> [TRUNK] Gossiper somewhat frequently hitting an NPE on node startup with 
> dtests at 
> org.apache.cassandra.gms.Gossiper.isSafeForStartup(Gossiper.java:769)
> 
>
> Key: CASSANDRA-14155
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14155
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Michael Kjellman
>Assignee: Jason Brown
>Priority: Major
>
> Gossiper is somewhat frequently hitting an NPE on node startup with dtests at 
> org.apache.cassandra.gms.Gossiper.isSafeForStartup(Gossiper.java:769)
> {code}
> test teardown failure
> Unexpected error found in node logs (see stdout for full details). Errors: 
> [ERROR [main] 2018-01-08 21:41:01,832 CassandraDaemon.java:675 - Exception 
> encountered during startup
> java.lang.NullPointerException: null
> at 
> org.apache.cassandra.gms.Gossiper.isSafeForStartup(Gossiper.java:769) 
> ~[main/:na]
> at 
> org.apache.cassandra.service.StorageService.checkForEndpointCollision(StorageService.java:511)
>  ~[main/:na]
> at 
> org.apache.cassandra.service.StorageService.prepareToJoin(StorageService.java:761)
>  ~[main/:na]
> at 
> org.apache.cassandra.service.StorageService.initServer(StorageService.java:621)
>  ~[main/:na]
> at 
> org.apache.cassandra.service.StorageService.initServer(StorageService.java:568)
>  ~[main/:na]
> at 
> org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:360) 
> [main/:na]
> at 
> org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:569)
>  [main/:na]
> at 
> org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:658) 
> [main/:na], ERROR [main] 2018-01-08 21:41:01,832 CassandraDaemon.java:675 - 
> Exception encountered during startup
> java.lang.NullPointerException: null
> at 
> org.apache.cassandra.gms.Gossiper.isSafeForStartup(Gossiper.java:769) 
> ~[main/:na]
> at 
> org.apache.cassandra.service.StorageService.checkForEndpointCollision(StorageService.java:511)
>  ~[main/:na]
> at 
> org.apache.cassandra.service.StorageService.prepareToJoin(StorageService.java:761)
>  ~[main/:na]
> at 
> org.apache.cassandra.service.StorageService.initServer(StorageService.java:621)
>  ~[main/:na]
> at 
> org.apache.cassandra.service.StorageService.initServer(StorageService.java:568)
>  ~[main/:na]
> at 
> org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:360) 
> [main/:na]
> at 
> org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:569)
>  [main/:na]
> at 
> org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:658) 
> [main/:na]]
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-14284) Chunk checksum test needs to occur before uncompress to avoid JVM crash

2018-03-29 Thread Branimir Lambov (JIRA)

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

Branimir Lambov commented on CASSANDRA-14284:
-

Shouldn't 
[this|https://github.com/apache/cassandra/compare/cassandra-2.1...blerer:14284-2.1#diff-67366d25fce65930f46564d6ea8e0f40R139]
 be using {{bytes}} instead of {{compressed.array()}}?

> Chunk checksum test needs to occur before uncompress to avoid JVM crash
> ---
>
> Key: CASSANDRA-14284
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14284
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
> Environment: The check-only-after-doing-the-decompress logic appears 
> to be in all current releases.
> Here are some samples at different evolution points :
> 3.11.2:
> [https://github.com/apache/cassandra/blob/cassandra-3.11.2/src/java/org/apache/cassandra/io/util/CompressedChunkReader.java#L146]
> https://github.com/apache/cassandra/blob/cassandra-3.11.2/src/java/org/apache/cassandra/io/util/CompressedChunkReader.java#L207
>  
> 3.5:
>  
> [https://github.com/apache/cassandra/blob/cassandra-3.5/src/java/org/apache/cassandra/io/compress/CompressedRandomAccessReader.java#L135]
> [https://github.com/apache/cassandra/blob/cassandra-3.5/src/java/org/apache/cassandra/io/compress/CompressedRandomAccessReader.java#L196]
> 2.1.17:
>  
> [https://github.com/apache/cassandra/blob/cassandra-2.1.17/src/java/org/apache/cassandra/io/compress/CompressedRandomAccessReader.java#L122]
>  
>Reporter: Gil Tene
>Assignee: Benjamin Lerer
>Priority: Major
>
> While checksums are (generally) performed on compressed data, the checksum 
> test when reading is currently (in all variants of C* 2.x, 3.x I've looked 
> at) done [on the compressed data] only after the uncompress operation has 
> completed. 
> The issue here is that LZ4_decompress_fast (as documented in e.g. 
> [https://github.com/lz4/lz4/blob/dev/lib/lz4.h#L214)] can result in memory 
> overruns when provided with malformed source data. This in turn can (and 
> does, e.g. in CASSANDRA-13757) lead to JVM crashes during the uncompress of 
> corrupted chunks. The checksum operation would obviously detect the issue, 
> but we'd never get to it if the JVM crashes first.
> Moving the checksum test of the compressed data to before the uncompress 
> operation (in cases where the checksum is done on compressed data) will 
> resolve this issue.
> -
> The check-only-after-doing-the-decompress logic appears to be in all current 
> releases.
> Here are some samples at different evolution points :
> 3.11.2:
> [https://github.com/apache/cassandra/blob/cassandra-3.11.2/src/java/org/apache/cassandra/io/util/CompressedChunkReader.java#L146]
> https://github.com/apache/cassandra/blob/cassandra-3.11.2/src/java/org/apache/cassandra/io/util/CompressedChunkReader.java#L207
>  
> 3.5:
>  
> [https://github.com/apache/cassandra/blob/cassandra-3.5/src/java/org/apache/cassandra/io/compress/CompressedRandomAccessReader.java#L135]
> [https://github.com/apache/cassandra/blob/cassandra-3.5/src/java/org/apache/cassandra/io/compress/CompressedRandomAccessReader.java#L196]
> 2.1.17:
>  
> [https://github.com/apache/cassandra/blob/cassandra-2.1.17/src/java/org/apache/cassandra/io/compress/CompressedRandomAccessReader.java#L122]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-14080) Handle incompletely written hint descriptors during startup

2018-03-29 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-14080:
--
   Resolution: Fixed
Fix Version/s: 3.11.3
   3.0.17
   4.0
   Status: Resolved  (was: Patch Available)

> Handle incompletely written hint descriptors during startup
> ---
>
> Key: CASSANDRA-14080
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14080
> Project: Cassandra
>  Issue Type: Bug
>  Components: Hints
>Reporter: Aleksandr Ivanov
>Assignee: Alex Lourie
>Priority: Major
> Fix For: 4.0, 3.0.17, 3.11.3
>
>
> Continuation of CASSANDRA-12728 bug.
> Problem: Cassandra didn't start due to 0 size hints files
> Log form v3.0.14:
> {code:java}
> INFO  [main] 2017-11-28 19:10:13,554 StorageService.java:575 - Cassandra 
> version: 3.0.14
> INFO  [main] 2017-11-28 19:10:13,555 StorageService.java:576 - Thrift API 
> version: 20.1.0
> INFO  [main] 2017-11-28 19:10:13,555 StorageService.java:577 - CQL supported 
> versions: 3.4.0 (default: 3.4.0)
> ERROR [main] 2017-11-28 19:10:13,592 CassandraDaemon.java:710 - Exception 
> encountered during startup
> org.apache.cassandra.io.FSReadError: java.io.EOFException
> at 
> org.apache.cassandra.hints.HintsDescriptor.readFromFile(HintsDescriptor.java:142)
>  ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) 
> ~[na:1.8.0_141]
> at 
> java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) 
> ~[na:1.8.0_141]
> at java.util.Iterator.forEachRemaining(Iterator.java:116) 
> ~[na:1.8.0_141]
> at 
> java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
>  ~[na:1.8.0_141]
> at 
> java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) 
> ~[na:1.8.0_141]
> at 
> java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) 
> ~[na:1.8.0_141]
> at 
> java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) 
> ~[na:1.8.0_141]
> at 
> java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) 
> ~[na:1.8.0_141]
> at 
> java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) 
> ~[na:1.8.0_141]
> at org.apache.cassandra.hints.HintsCatalog.load(HintsCatalog.java:65) 
> ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.hints.HintsService.(HintsService.java:88) 
> ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.hints.HintsService.(HintsService.java:63) 
> ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.service.StorageProxy.(StorageProxy.java:121) 
> ~[apache-cassandra-3.0.14.jar:3.0.14]
> at java.lang.Class.forName0(Native Method) ~[na:1.8.0_141]
> at java.lang.Class.forName(Class.java:264) ~[na:1.8.0_141]
> at 
> org.apache.cassandra.service.StorageService.initServer(StorageService.java:585)
>  ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.service.StorageService.initServer(StorageService.java:570)
>  ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:346) 
> [apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:569)
>  [apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:697) 
> [apache-cassandra-3.0.14.jar:3.0.14]
> Caused by: java.io.EOFException: null
> at java.io.RandomAccessFile.readInt(RandomAccessFile.java:803) 
> ~[na:1.8.0_141]
> at 
> org.apache.cassandra.hints.HintsDescriptor.deserialize(HintsDescriptor.java:237)
>  ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.hints.HintsDescriptor.readFromFile(HintsDescriptor.java:138)
>  ~[apache-cassandra-3.0.14.jar:3.0.14]
> ... 20 common frames omitted
> {code}
> After several 0 size hints files deletion Cassandra started successfully.
> Jeff Jirsa added a comment - Yesterday
> Aleksandr Ivanov can you open a new JIRA and link it back to this one? It's 
> possible that the original patch didn't consider 0 byte files (I don't have 
> time to go back and look at the commit, and it was long enough ago that I've 
> forgotten) - were all of your files 0 bytes?
> Not all, 8..10 hints files were with 0 size.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: 

[jira] [Updated] (CASSANDRA-14080) Handle incompletely written hint descriptors during startup

2018-03-29 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-14080:
--
Priority: Minor  (was: Major)

> Handle incompletely written hint descriptors during startup
> ---
>
> Key: CASSANDRA-14080
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14080
> Project: Cassandra
>  Issue Type: Bug
>  Components: Hints
>Reporter: Aleksandr Ivanov
>Assignee: Alex Lourie
>Priority: Minor
> Fix For: 4.0, 3.0.17, 3.11.3
>
>
> Continuation of CASSANDRA-12728 bug.
> Problem: Cassandra didn't start due to 0 size hints files
> Log form v3.0.14:
> {code:java}
> INFO  [main] 2017-11-28 19:10:13,554 StorageService.java:575 - Cassandra 
> version: 3.0.14
> INFO  [main] 2017-11-28 19:10:13,555 StorageService.java:576 - Thrift API 
> version: 20.1.0
> INFO  [main] 2017-11-28 19:10:13,555 StorageService.java:577 - CQL supported 
> versions: 3.4.0 (default: 3.4.0)
> ERROR [main] 2017-11-28 19:10:13,592 CassandraDaemon.java:710 - Exception 
> encountered during startup
> org.apache.cassandra.io.FSReadError: java.io.EOFException
> at 
> org.apache.cassandra.hints.HintsDescriptor.readFromFile(HintsDescriptor.java:142)
>  ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) 
> ~[na:1.8.0_141]
> at 
> java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) 
> ~[na:1.8.0_141]
> at java.util.Iterator.forEachRemaining(Iterator.java:116) 
> ~[na:1.8.0_141]
> at 
> java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
>  ~[na:1.8.0_141]
> at 
> java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) 
> ~[na:1.8.0_141]
> at 
> java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) 
> ~[na:1.8.0_141]
> at 
> java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) 
> ~[na:1.8.0_141]
> at 
> java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) 
> ~[na:1.8.0_141]
> at 
> java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) 
> ~[na:1.8.0_141]
> at org.apache.cassandra.hints.HintsCatalog.load(HintsCatalog.java:65) 
> ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.hints.HintsService.(HintsService.java:88) 
> ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.hints.HintsService.(HintsService.java:63) 
> ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.service.StorageProxy.(StorageProxy.java:121) 
> ~[apache-cassandra-3.0.14.jar:3.0.14]
> at java.lang.Class.forName0(Native Method) ~[na:1.8.0_141]
> at java.lang.Class.forName(Class.java:264) ~[na:1.8.0_141]
> at 
> org.apache.cassandra.service.StorageService.initServer(StorageService.java:585)
>  ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.service.StorageService.initServer(StorageService.java:570)
>  ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:346) 
> [apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:569)
>  [apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:697) 
> [apache-cassandra-3.0.14.jar:3.0.14]
> Caused by: java.io.EOFException: null
> at java.io.RandomAccessFile.readInt(RandomAccessFile.java:803) 
> ~[na:1.8.0_141]
> at 
> org.apache.cassandra.hints.HintsDescriptor.deserialize(HintsDescriptor.java:237)
>  ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.hints.HintsDescriptor.readFromFile(HintsDescriptor.java:138)
>  ~[apache-cassandra-3.0.14.jar:3.0.14]
> ... 20 common frames omitted
> {code}
> After several 0 size hints files deletion Cassandra started successfully.
> Jeff Jirsa added a comment - Yesterday
> Aleksandr Ivanov can you open a new JIRA and link it back to this one? It's 
> possible that the original patch didn't consider 0 byte files (I don't have 
> time to go back and look at the commit, and it was long enough ago that I've 
> forgotten) - were all of your files 0 bytes?
> Not all, 8..10 hints files were with 0 size.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-14080) Handle incompletely written hint descriptors during startup

2018-03-29 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-14080:
--
Reviewer: Aleksey Yeschenko

> Handle incompletely written hint descriptors during startup
> ---
>
> Key: CASSANDRA-14080
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14080
> Project: Cassandra
>  Issue Type: Bug
>  Components: Hints
>Reporter: Aleksandr Ivanov
>Assignee: Alex Lourie
>Priority: Major
> Fix For: 4.0, 3.0.17, 3.11.3
>
>
> Continuation of CASSANDRA-12728 bug.
> Problem: Cassandra didn't start due to 0 size hints files
> Log form v3.0.14:
> {code:java}
> INFO  [main] 2017-11-28 19:10:13,554 StorageService.java:575 - Cassandra 
> version: 3.0.14
> INFO  [main] 2017-11-28 19:10:13,555 StorageService.java:576 - Thrift API 
> version: 20.1.0
> INFO  [main] 2017-11-28 19:10:13,555 StorageService.java:577 - CQL supported 
> versions: 3.4.0 (default: 3.4.0)
> ERROR [main] 2017-11-28 19:10:13,592 CassandraDaemon.java:710 - Exception 
> encountered during startup
> org.apache.cassandra.io.FSReadError: java.io.EOFException
> at 
> org.apache.cassandra.hints.HintsDescriptor.readFromFile(HintsDescriptor.java:142)
>  ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) 
> ~[na:1.8.0_141]
> at 
> java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) 
> ~[na:1.8.0_141]
> at java.util.Iterator.forEachRemaining(Iterator.java:116) 
> ~[na:1.8.0_141]
> at 
> java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
>  ~[na:1.8.0_141]
> at 
> java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) 
> ~[na:1.8.0_141]
> at 
> java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) 
> ~[na:1.8.0_141]
> at 
> java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) 
> ~[na:1.8.0_141]
> at 
> java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) 
> ~[na:1.8.0_141]
> at 
> java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) 
> ~[na:1.8.0_141]
> at org.apache.cassandra.hints.HintsCatalog.load(HintsCatalog.java:65) 
> ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.hints.HintsService.(HintsService.java:88) 
> ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.hints.HintsService.(HintsService.java:63) 
> ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.service.StorageProxy.(StorageProxy.java:121) 
> ~[apache-cassandra-3.0.14.jar:3.0.14]
> at java.lang.Class.forName0(Native Method) ~[na:1.8.0_141]
> at java.lang.Class.forName(Class.java:264) ~[na:1.8.0_141]
> at 
> org.apache.cassandra.service.StorageService.initServer(StorageService.java:585)
>  ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.service.StorageService.initServer(StorageService.java:570)
>  ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:346) 
> [apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:569)
>  [apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:697) 
> [apache-cassandra-3.0.14.jar:3.0.14]
> Caused by: java.io.EOFException: null
> at java.io.RandomAccessFile.readInt(RandomAccessFile.java:803) 
> ~[na:1.8.0_141]
> at 
> org.apache.cassandra.hints.HintsDescriptor.deserialize(HintsDescriptor.java:237)
>  ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.hints.HintsDescriptor.readFromFile(HintsDescriptor.java:138)
>  ~[apache-cassandra-3.0.14.jar:3.0.14]
> ... 20 common frames omitted
> {code}
> After several 0 size hints files deletion Cassandra started successfully.
> Jeff Jirsa added a comment - Yesterday
> Aleksandr Ivanov can you open a new JIRA and link it back to this one? It's 
> possible that the original patch didn't consider 0 byte files (I don't have 
> time to go back and look at the commit, and it was long enough ago that I've 
> forgotten) - were all of your files 0 bytes?
> Not all, 8..10 hints files were with 0 size.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-14080) Handle incompletely written hint descriptors during startup

2018-03-29 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-14080:
---

Committed to 3.0 as 
[68079e4b2ed4e58dbede70af45414b3d4214e195|https://github.com/apache/cassandra/commit/68079e4b2ed4e58dbede70af45414b3d4214e195]
 and merged up with 3.11 and trunk, thanks.

> Handle incompletely written hint descriptors during startup
> ---
>
> Key: CASSANDRA-14080
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14080
> Project: Cassandra
>  Issue Type: Bug
>  Components: Hints
>Reporter: Aleksandr Ivanov
>Assignee: Alex Lourie
>Priority: Major
>
> Continuation of CASSANDRA-12728 bug.
> Problem: Cassandra didn't start due to 0 size hints files
> Log form v3.0.14:
> {code:java}
> INFO  [main] 2017-11-28 19:10:13,554 StorageService.java:575 - Cassandra 
> version: 3.0.14
> INFO  [main] 2017-11-28 19:10:13,555 StorageService.java:576 - Thrift API 
> version: 20.1.0
> INFO  [main] 2017-11-28 19:10:13,555 StorageService.java:577 - CQL supported 
> versions: 3.4.0 (default: 3.4.0)
> ERROR [main] 2017-11-28 19:10:13,592 CassandraDaemon.java:710 - Exception 
> encountered during startup
> org.apache.cassandra.io.FSReadError: java.io.EOFException
> at 
> org.apache.cassandra.hints.HintsDescriptor.readFromFile(HintsDescriptor.java:142)
>  ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) 
> ~[na:1.8.0_141]
> at 
> java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) 
> ~[na:1.8.0_141]
> at java.util.Iterator.forEachRemaining(Iterator.java:116) 
> ~[na:1.8.0_141]
> at 
> java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
>  ~[na:1.8.0_141]
> at 
> java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) 
> ~[na:1.8.0_141]
> at 
> java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) 
> ~[na:1.8.0_141]
> at 
> java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) 
> ~[na:1.8.0_141]
> at 
> java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) 
> ~[na:1.8.0_141]
> at 
> java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) 
> ~[na:1.8.0_141]
> at org.apache.cassandra.hints.HintsCatalog.load(HintsCatalog.java:65) 
> ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.hints.HintsService.(HintsService.java:88) 
> ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.hints.HintsService.(HintsService.java:63) 
> ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.service.StorageProxy.(StorageProxy.java:121) 
> ~[apache-cassandra-3.0.14.jar:3.0.14]
> at java.lang.Class.forName0(Native Method) ~[na:1.8.0_141]
> at java.lang.Class.forName(Class.java:264) ~[na:1.8.0_141]
> at 
> org.apache.cassandra.service.StorageService.initServer(StorageService.java:585)
>  ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.service.StorageService.initServer(StorageService.java:570)
>  ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:346) 
> [apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:569)
>  [apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:697) 
> [apache-cassandra-3.0.14.jar:3.0.14]
> Caused by: java.io.EOFException: null
> at java.io.RandomAccessFile.readInt(RandomAccessFile.java:803) 
> ~[na:1.8.0_141]
> at 
> org.apache.cassandra.hints.HintsDescriptor.deserialize(HintsDescriptor.java:237)
>  ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.hints.HintsDescriptor.readFromFile(HintsDescriptor.java:138)
>  ~[apache-cassandra-3.0.14.jar:3.0.14]
> ... 20 common frames omitted
> {code}
> After several 0 size hints files deletion Cassandra started successfully.
> Jeff Jirsa added a comment - Yesterday
> Aleksandr Ivanov can you open a new JIRA and link it back to this one? It's 
> possible that the original patch didn't consider 0 byte files (I don't have 
> time to go back and look at the commit, and it was long enough ago that I've 
> forgotten) - were all of your files 0 bytes?
> Not all, 8..10 hints files were with 0 size.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For 

[2/6] cassandra git commit: Handle incompletely written hint descriptors during startup

2018-03-29 Thread aleksey
Handle incompletely written hint descriptors during startup

patch by Alex Lourie; reviewed by Aleksey Yeschenko for CASSANDRA-14080


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

Branch: refs/heads/cassandra-3.11
Commit: 68079e4b2ed4e58dbede70af45414b3d4214e195
Parents: 3153c63
Author: Alex Lourie 
Authored: Thu Mar 29 13:21:43 2018 +0100
Committer: Aleksey Yeshchenko 
Committed: Thu Mar 29 13:56:18 2018 +0100

--
 CHANGES.txt |  1 +
 .../hints/ChecksumMismatchException.java| 28 
 .../apache/cassandra/hints/HintsCatalog.java|  4 ++-
 .../apache/cassandra/hints/HintsDescriptor.java | 24 -
 4 files changed, 55 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/68079e4b/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index d701a22..7917712 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.17
+ * Handle incompletely written hint descriptors during startup 
(CASSANDRA-14080)
  * Handle repeat open bound from SRP in read repair (CASSANDRA-14330)
  * Use zero as default score in DynamicEndpointSnitch (CASSANDRA-14252)
  * Respect max hint window when hinting for LWT (CASSANDRA-14215)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/68079e4b/src/java/org/apache/cassandra/hints/ChecksumMismatchException.java
--
diff --git a/src/java/org/apache/cassandra/hints/ChecksumMismatchException.java 
b/src/java/org/apache/cassandra/hints/ChecksumMismatchException.java
new file mode 100644
index 000..84dbbb2
--- /dev/null
+++ b/src/java/org/apache/cassandra/hints/ChecksumMismatchException.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cassandra.hints;
+
+import java.io.IOException;
+
+final class ChecksumMismatchException extends IOException
+{
+ChecksumMismatchException(String message)
+{
+super(message);
+}
+}

http://git-wip-us.apache.org/repos/asf/cassandra/blob/68079e4b/src/java/org/apache/cassandra/hints/HintsCatalog.java
--
diff --git a/src/java/org/apache/cassandra/hints/HintsCatalog.java 
b/src/java/org/apache/cassandra/hints/HintsCatalog.java
index 5ebe65b..6d01629 100644
--- a/src/java/org/apache/cassandra/hints/HintsCatalog.java
+++ b/src/java/org/apache/cassandra/hints/HintsCatalog.java
@@ -61,7 +61,9 @@ final class HintsCatalog
 Map stores =
 Files.list(hintsDirectory.toPath())
  .filter(HintsDescriptor::isHintFileName)
- .map(HintsDescriptor::readFromFile)
+ .map(HintsDescriptor::readFromFileQuietly)
+ .filter(Optional::isPresent)
+ .map(Optional::get)
  .collect(groupingBy(h -> h.hostId));
 return new HintsCatalog(hintsDirectory, writerParams, stores);
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/68079e4b/src/java/org/apache/cassandra/hints/HintsDescriptor.java
--
diff --git a/src/java/org/apache/cassandra/hints/HintsDescriptor.java 
b/src/java/org/apache/cassandra/hints/HintsDescriptor.java
index 916da4e..e9e1c30 100644
--- a/src/java/org/apache/cassandra/hints/HintsDescriptor.java
+++ b/src/java/org/apache/cassandra/hints/HintsDescriptor.java
@@ -23,6 +23,7 @@ import java.io.RandomAccessFile;
 import java.nio.charset.StandardCharsets;
 import java.nio.file.Path;
 import java.util.Map;
+import java.util.Optional;
 import java.util.UUID;
 import java.util.regex.Pattern;
 import 

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

2018-03-29 Thread aleksey
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/18278e42
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/18278e42
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/18278e42

Branch: refs/heads/cassandra-3.11
Commit: 18278e42249bbb298c9a8a805b7f1604925fb138
Parents: 5cbe08b 68079e4
Author: Aleksey Yeshchenko 
Authored: Thu Mar 29 14:00:06 2018 +0100
Committer: Aleksey Yeshchenko 
Committed: Thu Mar 29 14:00:06 2018 +0100

--
 CHANGES.txt |  1 +
 .../hints/ChecksumMismatchException.java| 28 
 .../apache/cassandra/hints/HintsCatalog.java|  4 ++-
 .../apache/cassandra/hints/HintsDescriptor.java | 20 +-
 4 files changed, 51 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/18278e42/CHANGES.txt
--
diff --cc CHANGES.txt
index 1f4ffb8,7917712..62f4345
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,11 -1,5 +1,12 @@@
 -3.0.17
 +3.11.3
 + * Serialize empty buffer as empty string for json output format 
(CASSANDRA-14245)
 + * Allow logging implementation to be interchanged for embedded testing 
(CASSANDRA-13396)
 + * SASI tokenizer for simple delimiter based entries (CASSANDRA-14247)
 + * Fix Loss of digits when doing CAST from varint/bigint to decimal 
(CASSANDRA-14170)
 + * RateBasedBackPressure unnecessarily invokes a lock on the Guava 
RateLimiter (CASSANDRA-14163)
 + * Fix wildcard GROUP BY queries (CASSANDRA-14209)
 +Merged from 3.0:
+  * Handle incompletely written hint descriptors during startup 
(CASSANDRA-14080)
   * Handle repeat open bound from SRP in read repair (CASSANDRA-14330)
   * Use zero as default score in DynamicEndpointSnitch (CASSANDRA-14252)
   * Respect max hint window when hinting for LWT (CASSANDRA-14215)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/18278e42/src/java/org/apache/cassandra/hints/HintsDescriptor.java
--
diff --cc src/java/org/apache/cassandra/hints/HintsDescriptor.java
index f99f9d8,e9e1c30..00224e2
--- a/src/java/org/apache/cassandra/hints/HintsDescriptor.java
+++ b/src/java/org/apache/cassandra/hints/HintsDescriptor.java
@@@ -22,8 -22,8 +22,9 @@@ import java.io.IOException
  import java.io.RandomAccessFile;
  import java.nio.charset.StandardCharsets;
  import java.nio.file.Path;
 +import java.util.HashMap;
  import java.util.Map;
+ import java.util.Optional;
  import java.util.UUID;
  import java.util.regex.Pattern;
  import java.util.zip.CRC32;


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



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

2018-03-29 Thread aleksey
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/18278e42
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/18278e42
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/18278e42

Branch: refs/heads/trunk
Commit: 18278e42249bbb298c9a8a805b7f1604925fb138
Parents: 5cbe08b 68079e4
Author: Aleksey Yeshchenko 
Authored: Thu Mar 29 14:00:06 2018 +0100
Committer: Aleksey Yeshchenko 
Committed: Thu Mar 29 14:00:06 2018 +0100

--
 CHANGES.txt |  1 +
 .../hints/ChecksumMismatchException.java| 28 
 .../apache/cassandra/hints/HintsCatalog.java|  4 ++-
 .../apache/cassandra/hints/HintsDescriptor.java | 20 +-
 4 files changed, 51 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/18278e42/CHANGES.txt
--
diff --cc CHANGES.txt
index 1f4ffb8,7917712..62f4345
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,11 -1,5 +1,12 @@@
 -3.0.17
 +3.11.3
 + * Serialize empty buffer as empty string for json output format 
(CASSANDRA-14245)
 + * Allow logging implementation to be interchanged for embedded testing 
(CASSANDRA-13396)
 + * SASI tokenizer for simple delimiter based entries (CASSANDRA-14247)
 + * Fix Loss of digits when doing CAST from varint/bigint to decimal 
(CASSANDRA-14170)
 + * RateBasedBackPressure unnecessarily invokes a lock on the Guava 
RateLimiter (CASSANDRA-14163)
 + * Fix wildcard GROUP BY queries (CASSANDRA-14209)
 +Merged from 3.0:
+  * Handle incompletely written hint descriptors during startup 
(CASSANDRA-14080)
   * Handle repeat open bound from SRP in read repair (CASSANDRA-14330)
   * Use zero as default score in DynamicEndpointSnitch (CASSANDRA-14252)
   * Respect max hint window when hinting for LWT (CASSANDRA-14215)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/18278e42/src/java/org/apache/cassandra/hints/HintsDescriptor.java
--
diff --cc src/java/org/apache/cassandra/hints/HintsDescriptor.java
index f99f9d8,e9e1c30..00224e2
--- a/src/java/org/apache/cassandra/hints/HintsDescriptor.java
+++ b/src/java/org/apache/cassandra/hints/HintsDescriptor.java
@@@ -22,8 -22,8 +22,9 @@@ import java.io.IOException
  import java.io.RandomAccessFile;
  import java.nio.charset.StandardCharsets;
  import java.nio.file.Path;
 +import java.util.HashMap;
  import java.util.Map;
+ import java.util.Optional;
  import java.util.UUID;
  import java.util.regex.Pattern;
  import java.util.zip.CRC32;


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



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

2018-03-29 Thread aleksey
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/fc2e420f
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/fc2e420f
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/fc2e420f

Branch: refs/heads/trunk
Commit: fc2e420fdcea827da24a0dd1908a53da0ac025bb
Parents: 674addd 18278e4
Author: Aleksey Yeshchenko 
Authored: Thu Mar 29 14:01:09 2018 +0100
Committer: Aleksey Yeshchenko 
Committed: Thu Mar 29 14:01:09 2018 +0100

--
 CHANGES.txt |  1 +
 .../hints/ChecksumMismatchException.java| 28 
 .../apache/cassandra/hints/HintsCatalog.java|  4 ++-
 .../apache/cassandra/hints/HintsDescriptor.java | 20 +-
 4 files changed, 51 insertions(+), 2 deletions(-)
--


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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fc2e420f/src/java/org/apache/cassandra/hints/HintsDescriptor.java
--


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[3/6] cassandra git commit: Handle incompletely written hint descriptors during startup

2018-03-29 Thread aleksey
Handle incompletely written hint descriptors during startup

patch by Alex Lourie; reviewed by Aleksey Yeschenko for CASSANDRA-14080


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

Branch: refs/heads/trunk
Commit: 68079e4b2ed4e58dbede70af45414b3d4214e195
Parents: 3153c63
Author: Alex Lourie 
Authored: Thu Mar 29 13:21:43 2018 +0100
Committer: Aleksey Yeshchenko 
Committed: Thu Mar 29 13:56:18 2018 +0100

--
 CHANGES.txt |  1 +
 .../hints/ChecksumMismatchException.java| 28 
 .../apache/cassandra/hints/HintsCatalog.java|  4 ++-
 .../apache/cassandra/hints/HintsDescriptor.java | 24 -
 4 files changed, 55 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/68079e4b/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index d701a22..7917712 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.17
+ * Handle incompletely written hint descriptors during startup 
(CASSANDRA-14080)
  * Handle repeat open bound from SRP in read repair (CASSANDRA-14330)
  * Use zero as default score in DynamicEndpointSnitch (CASSANDRA-14252)
  * Respect max hint window when hinting for LWT (CASSANDRA-14215)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/68079e4b/src/java/org/apache/cassandra/hints/ChecksumMismatchException.java
--
diff --git a/src/java/org/apache/cassandra/hints/ChecksumMismatchException.java 
b/src/java/org/apache/cassandra/hints/ChecksumMismatchException.java
new file mode 100644
index 000..84dbbb2
--- /dev/null
+++ b/src/java/org/apache/cassandra/hints/ChecksumMismatchException.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cassandra.hints;
+
+import java.io.IOException;
+
+final class ChecksumMismatchException extends IOException
+{
+ChecksumMismatchException(String message)
+{
+super(message);
+}
+}

http://git-wip-us.apache.org/repos/asf/cassandra/blob/68079e4b/src/java/org/apache/cassandra/hints/HintsCatalog.java
--
diff --git a/src/java/org/apache/cassandra/hints/HintsCatalog.java 
b/src/java/org/apache/cassandra/hints/HintsCatalog.java
index 5ebe65b..6d01629 100644
--- a/src/java/org/apache/cassandra/hints/HintsCatalog.java
+++ b/src/java/org/apache/cassandra/hints/HintsCatalog.java
@@ -61,7 +61,9 @@ final class HintsCatalog
 Map stores =
 Files.list(hintsDirectory.toPath())
  .filter(HintsDescriptor::isHintFileName)
- .map(HintsDescriptor::readFromFile)
+ .map(HintsDescriptor::readFromFileQuietly)
+ .filter(Optional::isPresent)
+ .map(Optional::get)
  .collect(groupingBy(h -> h.hostId));
 return new HintsCatalog(hintsDirectory, writerParams, stores);
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/68079e4b/src/java/org/apache/cassandra/hints/HintsDescriptor.java
--
diff --git a/src/java/org/apache/cassandra/hints/HintsDescriptor.java 
b/src/java/org/apache/cassandra/hints/HintsDescriptor.java
index 916da4e..e9e1c30 100644
--- a/src/java/org/apache/cassandra/hints/HintsDescriptor.java
+++ b/src/java/org/apache/cassandra/hints/HintsDescriptor.java
@@ -23,6 +23,7 @@ import java.io.RandomAccessFile;
 import java.nio.charset.StandardCharsets;
 import java.nio.file.Path;
 import java.util.Map;
+import java.util.Optional;
 import java.util.UUID;
 import java.util.regex.Pattern;
 import 

[1/6] cassandra git commit: Handle incompletely written hint descriptors during startup

2018-03-29 Thread aleksey
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.0 3153c630c -> 68079e4b2
  refs/heads/cassandra-3.11 5cbe08b6a -> 18278e422
  refs/heads/trunk 674addd03 -> fc2e420fd


Handle incompletely written hint descriptors during startup

patch by Alex Lourie; reviewed by Aleksey Yeschenko for CASSANDRA-14080


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

Branch: refs/heads/cassandra-3.0
Commit: 68079e4b2ed4e58dbede70af45414b3d4214e195
Parents: 3153c63
Author: Alex Lourie 
Authored: Thu Mar 29 13:21:43 2018 +0100
Committer: Aleksey Yeshchenko 
Committed: Thu Mar 29 13:56:18 2018 +0100

--
 CHANGES.txt |  1 +
 .../hints/ChecksumMismatchException.java| 28 
 .../apache/cassandra/hints/HintsCatalog.java|  4 ++-
 .../apache/cassandra/hints/HintsDescriptor.java | 24 -
 4 files changed, 55 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/68079e4b/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index d701a22..7917712 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.17
+ * Handle incompletely written hint descriptors during startup 
(CASSANDRA-14080)
  * Handle repeat open bound from SRP in read repair (CASSANDRA-14330)
  * Use zero as default score in DynamicEndpointSnitch (CASSANDRA-14252)
  * Respect max hint window when hinting for LWT (CASSANDRA-14215)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/68079e4b/src/java/org/apache/cassandra/hints/ChecksumMismatchException.java
--
diff --git a/src/java/org/apache/cassandra/hints/ChecksumMismatchException.java 
b/src/java/org/apache/cassandra/hints/ChecksumMismatchException.java
new file mode 100644
index 000..84dbbb2
--- /dev/null
+++ b/src/java/org/apache/cassandra/hints/ChecksumMismatchException.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cassandra.hints;
+
+import java.io.IOException;
+
+final class ChecksumMismatchException extends IOException
+{
+ChecksumMismatchException(String message)
+{
+super(message);
+}
+}

http://git-wip-us.apache.org/repos/asf/cassandra/blob/68079e4b/src/java/org/apache/cassandra/hints/HintsCatalog.java
--
diff --git a/src/java/org/apache/cassandra/hints/HintsCatalog.java 
b/src/java/org/apache/cassandra/hints/HintsCatalog.java
index 5ebe65b..6d01629 100644
--- a/src/java/org/apache/cassandra/hints/HintsCatalog.java
+++ b/src/java/org/apache/cassandra/hints/HintsCatalog.java
@@ -61,7 +61,9 @@ final class HintsCatalog
 Map stores =
 Files.list(hintsDirectory.toPath())
  .filter(HintsDescriptor::isHintFileName)
- .map(HintsDescriptor::readFromFile)
+ .map(HintsDescriptor::readFromFileQuietly)
+ .filter(Optional::isPresent)
+ .map(Optional::get)
  .collect(groupingBy(h -> h.hostId));
 return new HintsCatalog(hintsDirectory, writerParams, stores);
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/68079e4b/src/java/org/apache/cassandra/hints/HintsDescriptor.java
--
diff --git a/src/java/org/apache/cassandra/hints/HintsDescriptor.java 
b/src/java/org/apache/cassandra/hints/HintsDescriptor.java
index 916da4e..e9e1c30 100644
--- a/src/java/org/apache/cassandra/hints/HintsDescriptor.java
+++ b/src/java/org/apache/cassandra/hints/HintsDescriptor.java
@@ -23,6 +23,7 @@ import java.io.RandomAccessFile;
 import 

[jira] [Updated] (CASSANDRA-14080) Handle incompletely written hint descriptors during startup

2018-03-29 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-14080:
--
Summary: Handle incompletely written hint descriptors during startup  (was: 
Handling 0 size hint files during start)

> Handle incompletely written hint descriptors during startup
> ---
>
> Key: CASSANDRA-14080
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14080
> Project: Cassandra
>  Issue Type: Bug
>  Components: Hints
>Reporter: Aleksandr Ivanov
>Assignee: Alex Lourie
>Priority: Major
>
> Continuation of CASSANDRA-12728 bug.
> Problem: Cassandra didn't start due to 0 size hints files
> Log form v3.0.14:
> {code:java}
> INFO  [main] 2017-11-28 19:10:13,554 StorageService.java:575 - Cassandra 
> version: 3.0.14
> INFO  [main] 2017-11-28 19:10:13,555 StorageService.java:576 - Thrift API 
> version: 20.1.0
> INFO  [main] 2017-11-28 19:10:13,555 StorageService.java:577 - CQL supported 
> versions: 3.4.0 (default: 3.4.0)
> ERROR [main] 2017-11-28 19:10:13,592 CassandraDaemon.java:710 - Exception 
> encountered during startup
> org.apache.cassandra.io.FSReadError: java.io.EOFException
> at 
> org.apache.cassandra.hints.HintsDescriptor.readFromFile(HintsDescriptor.java:142)
>  ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) 
> ~[na:1.8.0_141]
> at 
> java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) 
> ~[na:1.8.0_141]
> at java.util.Iterator.forEachRemaining(Iterator.java:116) 
> ~[na:1.8.0_141]
> at 
> java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
>  ~[na:1.8.0_141]
> at 
> java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) 
> ~[na:1.8.0_141]
> at 
> java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) 
> ~[na:1.8.0_141]
> at 
> java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) 
> ~[na:1.8.0_141]
> at 
> java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) 
> ~[na:1.8.0_141]
> at 
> java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) 
> ~[na:1.8.0_141]
> at org.apache.cassandra.hints.HintsCatalog.load(HintsCatalog.java:65) 
> ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.hints.HintsService.(HintsService.java:88) 
> ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.hints.HintsService.(HintsService.java:63) 
> ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.service.StorageProxy.(StorageProxy.java:121) 
> ~[apache-cassandra-3.0.14.jar:3.0.14]
> at java.lang.Class.forName0(Native Method) ~[na:1.8.0_141]
> at java.lang.Class.forName(Class.java:264) ~[na:1.8.0_141]
> at 
> org.apache.cassandra.service.StorageService.initServer(StorageService.java:585)
>  ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.service.StorageService.initServer(StorageService.java:570)
>  ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:346) 
> [apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:569)
>  [apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:697) 
> [apache-cassandra-3.0.14.jar:3.0.14]
> Caused by: java.io.EOFException: null
> at java.io.RandomAccessFile.readInt(RandomAccessFile.java:803) 
> ~[na:1.8.0_141]
> at 
> org.apache.cassandra.hints.HintsDescriptor.deserialize(HintsDescriptor.java:237)
>  ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.hints.HintsDescriptor.readFromFile(HintsDescriptor.java:138)
>  ~[apache-cassandra-3.0.14.jar:3.0.14]
> ... 20 common frames omitted
> {code}
> After several 0 size hints files deletion Cassandra started successfully.
> Jeff Jirsa added a comment - Yesterday
> Aleksandr Ivanov can you open a new JIRA and link it back to this one? It's 
> possible that the original patch didn't consider 0 byte files (I don't have 
> time to go back and look at the commit, and it was long enough ago that I've 
> forgotten) - were all of your files 0 bytes?
> Not all, 8..10 hints files were with 0 size.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-14284) Chunk checksum test needs to occur before uncompress to avoid JVM crash

2018-03-29 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer commented on CASSANDRA-14284:


[~blambov], [~giltene] Thanks for the reviews. I completely missed the 
pre-compression checksum logic in 2.1.

I force pushed some new patches for 
[2.1|https://github.com/apache/cassandra/compare/cassandra-2.1...blerer:14284-2.1]
 , 
[3.1|https://github.com/apache/cassandra/compare/cassandra-3.11...blerer:14284-3.11],
 and 
[trunk|https://github.com/apache/cassandra/compare/trunk...blerer:14284-trunk] 
that address the different problems.

> Chunk checksum test needs to occur before uncompress to avoid JVM crash
> ---
>
> Key: CASSANDRA-14284
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14284
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
> Environment: The check-only-after-doing-the-decompress logic appears 
> to be in all current releases.
> Here are some samples at different evolution points :
> 3.11.2:
> [https://github.com/apache/cassandra/blob/cassandra-3.11.2/src/java/org/apache/cassandra/io/util/CompressedChunkReader.java#L146]
> https://github.com/apache/cassandra/blob/cassandra-3.11.2/src/java/org/apache/cassandra/io/util/CompressedChunkReader.java#L207
>  
> 3.5:
>  
> [https://github.com/apache/cassandra/blob/cassandra-3.5/src/java/org/apache/cassandra/io/compress/CompressedRandomAccessReader.java#L135]
> [https://github.com/apache/cassandra/blob/cassandra-3.5/src/java/org/apache/cassandra/io/compress/CompressedRandomAccessReader.java#L196]
> 2.1.17:
>  
> [https://github.com/apache/cassandra/blob/cassandra-2.1.17/src/java/org/apache/cassandra/io/compress/CompressedRandomAccessReader.java#L122]
>  
>Reporter: Gil Tene
>Assignee: Benjamin Lerer
>Priority: Major
>
> While checksums are (generally) performed on compressed data, the checksum 
> test when reading is currently (in all variants of C* 2.x, 3.x I've looked 
> at) done [on the compressed data] only after the uncompress operation has 
> completed. 
> The issue here is that LZ4_decompress_fast (as documented in e.g. 
> [https://github.com/lz4/lz4/blob/dev/lib/lz4.h#L214)] can result in memory 
> overruns when provided with malformed source data. This in turn can (and 
> does, e.g. in CASSANDRA-13757) lead to JVM crashes during the uncompress of 
> corrupted chunks. The checksum operation would obviously detect the issue, 
> but we'd never get to it if the JVM crashes first.
> Moving the checksum test of the compressed data to before the uncompress 
> operation (in cases where the checksum is done on compressed data) will 
> resolve this issue.
> -
> The check-only-after-doing-the-decompress logic appears to be in all current 
> releases.
> Here are some samples at different evolution points :
> 3.11.2:
> [https://github.com/apache/cassandra/blob/cassandra-3.11.2/src/java/org/apache/cassandra/io/util/CompressedChunkReader.java#L146]
> https://github.com/apache/cassandra/blob/cassandra-3.11.2/src/java/org/apache/cassandra/io/util/CompressedChunkReader.java#L207
>  
> 3.5:
>  
> [https://github.com/apache/cassandra/blob/cassandra-3.5/src/java/org/apache/cassandra/io/compress/CompressedRandomAccessReader.java#L135]
> [https://github.com/apache/cassandra/blob/cassandra-3.5/src/java/org/apache/cassandra/io/compress/CompressedRandomAccessReader.java#L196]
> 2.1.17:
>  
> [https://github.com/apache/cassandra/blob/cassandra-2.1.17/src/java/org/apache/cassandra/io/compress/CompressedRandomAccessReader.java#L122]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Resolved] (CASSANDRA-13713) Move processing of EchoMessage response to gossip stage

2018-03-29 Thread Jason Brown (JIRA)

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

Jason Brown resolved CASSANDRA-13713.
-
   Resolution: Fixed
Fix Version/s: (was: 4.x)
   4.0

Decided to be very cautious and only committed to trunk (4.0) as sha 
{{674addd03701abf1bce7d6b47978761c00d0a431}}

> Move processing of EchoMessage response to gossip stage
> ---
>
> Key: CASSANDRA-13713
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13713
> Project: Cassandra
>  Issue Type: Bug
>  Components: Distributed Metadata
>Reporter: Jason Brown
>Assignee: Jason Brown
>Priority: Minor
> Fix For: 4.0
>
>
> Currently, when a node receives an {{EchoMessage}}, is sends a simple ACK 
> reply back (see {{EchoVerbHandler}}). The ACK is sent on the small message 
> connection, and because it is 'generically' typed as 
> {{Verb.REQUEST_RESPONSE}}, is consumed on a {{Stage.REQUEST_RESPONSE}} 
> thread. The proper thread for this response to be consumed is 
> {{Stage.GOSSIP}}, that way we can move more of the updating of the gossip 
> state to a single, centralized thread, and less abuse of gossip's shared 
> mutable state can occur.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-12151) Audit logging for database activity

2018-03-29 Thread Stefan Podkowinski (JIRA)

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

Stefan Podkowinski commented on CASSANDRA-12151:


I'd not use the logback logger for query logging in production. As shown 
recently in CASSANDRA-14318, the performance impact is significant and your 
benchmark results show that as well. Rotating out log files by simply deleting 
them is probably also not what you'd expect from a auditing solution. But maybe 
we can keep the logback logger for some simple auth related logging and make it 
also useful for users who would not enable auditing in first place. How about 
enabling the {{FileAuditLogger}} by default and let it create an {{auth.log}}, 
which would log all failed login attempts? Maybe add a comment on how to enable 
successful attempts as well.

Looks like this won't be possible with the current {{included_categories}} 
filtering, which is based on the DDL, DML, .. categories. I'd suggest to make 
the filter work for both the category and actual AuditLogEntryType (SELECT, 
UPDATE, DELETE,..).

Full query logging should be done using the BinLogger or a custom 
implementation. It would be nice to be able to use mutliple implementations in 
parallel, in case we want to enable FileAuditLogger by default.

NIT: check logger.isEnabled before toString in FileAuditLogger

> Audit logging for database activity
> ---
>
> Key: CASSANDRA-12151
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12151
> Project: Cassandra
>  Issue Type: New Feature
>Reporter: stefan setyadi
>Assignee: Vinay Chella
>Priority: Major
> Fix For: 4.x
>
> Attachments: 12151.txt, CASSANDRA_12151-benchmark.html, 
> DesignProposal_AuditingFeature_ApacheCassandra_v1.docx
>
>
> we would like a way to enable cassandra to log database activity being done 
> on our server.
> It should show username, remote address, timestamp, action type, keyspace, 
> column family, and the query statement.
> it should also be able to log connection attempt and changes to the 
> user/roles.
> I was thinking of making a new keyspace and insert an entry for every 
> activity that occurs.
> Then It would be possible to query for specific activity or a query targeting 
> a specific keyspace and column family.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



cassandra git commit: Move processing of EchoMessage response to gossip stage

2018-03-29 Thread jasobrown
Repository: cassandra
Updated Branches:
  refs/heads/trunk d38694afe -> 674addd03


 Move processing of EchoMessage response to gossip stage

patch by jasobrown, reviewed by jkni for CASSANDRA-13713


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

Branch: refs/heads/trunk
Commit: 674addd03701abf1bce7d6b47978761c00d0a431
Parents: d38694a
Author: Jason Brown 
Authored: Thu Mar 29 05:41:28 2018 -0700
Committer: Jason Brown 
Committed: Thu Mar 29 05:41:28 2018 -0700

--
 CHANGES.txt | 1 +
 src/java/org/apache/cassandra/gms/Gossiper.java | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/674addd0/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 5763720..5af348b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 4.0
+ * Move processing of EchoMessage response to gossip stage (CASSANDRA-13713)
  * Add coordinator write metric per CF (CASSANDRA-14232)
  * Fix scheduling of speculative retry threshold recalculation 
(CASSANDRA-14338)
  * Add support for hybrid MIN(), MAX() speculative retry policies 
(CASSANDRA-14293)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/674addd0/src/java/org/apache/cassandra/gms/Gossiper.java
--
diff --git a/src/java/org/apache/cassandra/gms/Gossiper.java 
b/src/java/org/apache/cassandra/gms/Gossiper.java
index a4e46f2..24b659b 100644
--- a/src/java/org/apache/cassandra/gms/Gossiper.java
+++ b/src/java/org/apache/cassandra/gms/Gossiper.java
@@ -1015,7 +1015,8 @@ public class Gossiper implements 
IFailureDetectionEventListener, GossiperMBean
 
 public void response(MessageIn msg)
 {
-realMarkAlive(addr, localState);
+// force processing of the echo response onto the gossip 
stage, as it comes in on the REQUEST_RESPONSE stage
+StageManager.getStage(Stage.GOSSIP).submit(() -> 
realMarkAlive(addr, localState));
 }
 };
 


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-14080) Handling 0 size hint files during start

2018-03-29 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-14080:
---

So, arguably the original code was written somewhat lazily (by me).

Swallowing any IOException there and re-trhowing as an FSError, while making 
the code slightly simpler - by avoiding the need to handle IOException properly 
elsewhere - was too blunt.

We should still throw the FSError on checksum mismatches - but not in other 
scenarios. I'll expand a bit, on top of your patch, to differentiate between 
these two different exceptions.

> Handling 0 size hint files during start
> ---
>
> Key: CASSANDRA-14080
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14080
> Project: Cassandra
>  Issue Type: Bug
>  Components: Hints
>Reporter: Aleksandr Ivanov
>Assignee: Alex Lourie
>Priority: Major
>
> Continuation of CASSANDRA-12728 bug.
> Problem: Cassandra didn't start due to 0 size hints files
> Log form v3.0.14:
> {code:java}
> INFO  [main] 2017-11-28 19:10:13,554 StorageService.java:575 - Cassandra 
> version: 3.0.14
> INFO  [main] 2017-11-28 19:10:13,555 StorageService.java:576 - Thrift API 
> version: 20.1.0
> INFO  [main] 2017-11-28 19:10:13,555 StorageService.java:577 - CQL supported 
> versions: 3.4.0 (default: 3.4.0)
> ERROR [main] 2017-11-28 19:10:13,592 CassandraDaemon.java:710 - Exception 
> encountered during startup
> org.apache.cassandra.io.FSReadError: java.io.EOFException
> at 
> org.apache.cassandra.hints.HintsDescriptor.readFromFile(HintsDescriptor.java:142)
>  ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) 
> ~[na:1.8.0_141]
> at 
> java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) 
> ~[na:1.8.0_141]
> at java.util.Iterator.forEachRemaining(Iterator.java:116) 
> ~[na:1.8.0_141]
> at 
> java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
>  ~[na:1.8.0_141]
> at 
> java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) 
> ~[na:1.8.0_141]
> at 
> java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) 
> ~[na:1.8.0_141]
> at 
> java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) 
> ~[na:1.8.0_141]
> at 
> java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) 
> ~[na:1.8.0_141]
> at 
> java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) 
> ~[na:1.8.0_141]
> at org.apache.cassandra.hints.HintsCatalog.load(HintsCatalog.java:65) 
> ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.hints.HintsService.(HintsService.java:88) 
> ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.hints.HintsService.(HintsService.java:63) 
> ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.service.StorageProxy.(StorageProxy.java:121) 
> ~[apache-cassandra-3.0.14.jar:3.0.14]
> at java.lang.Class.forName0(Native Method) ~[na:1.8.0_141]
> at java.lang.Class.forName(Class.java:264) ~[na:1.8.0_141]
> at 
> org.apache.cassandra.service.StorageService.initServer(StorageService.java:585)
>  ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.service.StorageService.initServer(StorageService.java:570)
>  ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:346) 
> [apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:569)
>  [apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:697) 
> [apache-cassandra-3.0.14.jar:3.0.14]
> Caused by: java.io.EOFException: null
> at java.io.RandomAccessFile.readInt(RandomAccessFile.java:803) 
> ~[na:1.8.0_141]
> at 
> org.apache.cassandra.hints.HintsDescriptor.deserialize(HintsDescriptor.java:237)
>  ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.hints.HintsDescriptor.readFromFile(HintsDescriptor.java:138)
>  ~[apache-cassandra-3.0.14.jar:3.0.14]
> ... 20 common frames omitted
> {code}
> After several 0 size hints files deletion Cassandra started successfully.
> Jeff Jirsa added a comment - Yesterday
> Aleksandr Ivanov can you open a new JIRA and link it back to this one? It's 
> possible that the original patch didn't consider 0 byte files (I don't have 
> time to go back and look at the commit, and it was long enough ago that I've 
> forgotten) - were all of your files 0 bytes?
> Not all, 8..10 hints files were 

[jira] [Resolved] (CASSANDRA-13714) response to EchoMessage is sent on wrong connection

2018-03-29 Thread Jason Brown (JIRA)

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

Jason Brown resolved CASSANDRA-13714.
-
Resolution: Duplicate

This was fixed in CASSANDRA-13993

> response to EchoMessage is sent on wrong connection
> ---
>
> Key: CASSANDRA-13714
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13714
> Project: Cassandra
>  Issue Type: Bug
>  Components: Distributed Metadata
>Reporter: Jason Brown
>Priority: Trivial
>
> Followup to CASSANDRA-13713. To force the {{EchoResponse}} response onto the 
> correct stage, we should create a new message type, {{EchoResponseMessage}}, 
> and map it appropriately in {{MessagingService.verbStages}}. Mapping the 
> response message correctly will allow the response to be sent on the gossip 
> connection, and then allow us to process it immediately on the gossip stage, 
> rather the request_response stage.
> One serious problem to consider is the upgrade scenario, where the 
> non-upgraded node expects a simple RequestResponse message that maps to a 
> callback. If the upgraded node tries to send the new {{EchoResponseMessage}}, 
> it will be ignored by the old node. And thus we get into some weird state 
> where gossip can't communicate directly, even though the actual TCP 
> connection and wrapper channel is setup correctly. (I haven't thought about 
> all the oddball fall out that can occur as a rolling upgrade rolls out).
> Thus, due to that complexity, versus the triviality/near-zero impact of the 
> bug (sending the response on the wrong channel is not a big deal), I feel 
> this ticket is largely not worth bothering with. That said, I at least want 
> to capture the problem for posterity.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-14080) Handling 0 size hint files during start

2018-03-29 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-14080:
---

The logic is sound. Let me have a look and commit.

> Handling 0 size hint files during start
> ---
>
> Key: CASSANDRA-14080
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14080
> Project: Cassandra
>  Issue Type: Bug
>  Components: Hints
>Reporter: Aleksandr Ivanov
>Assignee: Alex Lourie
>Priority: Major
>
> Continuation of CASSANDRA-12728 bug.
> Problem: Cassandra didn't start due to 0 size hints files
> Log form v3.0.14:
> {code:java}
> INFO  [main] 2017-11-28 19:10:13,554 StorageService.java:575 - Cassandra 
> version: 3.0.14
> INFO  [main] 2017-11-28 19:10:13,555 StorageService.java:576 - Thrift API 
> version: 20.1.0
> INFO  [main] 2017-11-28 19:10:13,555 StorageService.java:577 - CQL supported 
> versions: 3.4.0 (default: 3.4.0)
> ERROR [main] 2017-11-28 19:10:13,592 CassandraDaemon.java:710 - Exception 
> encountered during startup
> org.apache.cassandra.io.FSReadError: java.io.EOFException
> at 
> org.apache.cassandra.hints.HintsDescriptor.readFromFile(HintsDescriptor.java:142)
>  ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) 
> ~[na:1.8.0_141]
> at 
> java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) 
> ~[na:1.8.0_141]
> at java.util.Iterator.forEachRemaining(Iterator.java:116) 
> ~[na:1.8.0_141]
> at 
> java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
>  ~[na:1.8.0_141]
> at 
> java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) 
> ~[na:1.8.0_141]
> at 
> java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) 
> ~[na:1.8.0_141]
> at 
> java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) 
> ~[na:1.8.0_141]
> at 
> java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) 
> ~[na:1.8.0_141]
> at 
> java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) 
> ~[na:1.8.0_141]
> at org.apache.cassandra.hints.HintsCatalog.load(HintsCatalog.java:65) 
> ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.hints.HintsService.(HintsService.java:88) 
> ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.hints.HintsService.(HintsService.java:63) 
> ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.service.StorageProxy.(StorageProxy.java:121) 
> ~[apache-cassandra-3.0.14.jar:3.0.14]
> at java.lang.Class.forName0(Native Method) ~[na:1.8.0_141]
> at java.lang.Class.forName(Class.java:264) ~[na:1.8.0_141]
> at 
> org.apache.cassandra.service.StorageService.initServer(StorageService.java:585)
>  ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.service.StorageService.initServer(StorageService.java:570)
>  ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:346) 
> [apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:569)
>  [apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:697) 
> [apache-cassandra-3.0.14.jar:3.0.14]
> Caused by: java.io.EOFException: null
> at java.io.RandomAccessFile.readInt(RandomAccessFile.java:803) 
> ~[na:1.8.0_141]
> at 
> org.apache.cassandra.hints.HintsDescriptor.deserialize(HintsDescriptor.java:237)
>  ~[apache-cassandra-3.0.14.jar:3.0.14]
> at 
> org.apache.cassandra.hints.HintsDescriptor.readFromFile(HintsDescriptor.java:138)
>  ~[apache-cassandra-3.0.14.jar:3.0.14]
> ... 20 common frames omitted
> {code}
> After several 0 size hints files deletion Cassandra started successfully.
> Jeff Jirsa added a comment - Yesterday
> Aleksandr Ivanov can you open a new JIRA and link it back to this one? It's 
> possible that the original patch didn't consider 0 byte files (I don't have 
> time to go back and look at the commit, and it was long enough ago that I've 
> forgotten) - were all of your files 0 bytes?
> Not all, 8..10 hints files were with 0 size.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-14340) Refactor ColumnFamilyStore to Table

2018-03-29 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer commented on CASSANDRA-14340:


{quote}But we don't have to rename the interface? Or, we can have the new 
interface extend the old interface?
{quote}
JMX relies on the {{MBean}} name convention if I am not mistaken so I guess 
only the first one should work.

> Refactor ColumnFamilyStore to Table
> ---
>
> Key: CASSANDRA-14340
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14340
> Project: Cassandra
>  Issue Type: Sub-task
>  Components: Core
>Reporter: Jon Haddad
>Assignee: Jon Haddad
>Priority: Major
>
> This end result of this should change the ColumnFamily store, 
> ColumnFamilyStoreMBean, and tests that reference them by name.
> Deserves a note in news as this will break JMX compatibility and affect 
> scripts which change log level by class.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-14340) Refactor ColumnFamilyStore to Table

2018-03-29 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-14340:
---

Yeah. But we don't have to rename the interface? Or, we can have the new 
interface extend the old interface?

 

I'm not a JMX expert. [~beobal] what do you think?

> Refactor ColumnFamilyStore to Table
> ---
>
> Key: CASSANDRA-14340
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14340
> Project: Cassandra
>  Issue Type: Sub-task
>  Components: Core
>Reporter: Jon Haddad
>Assignee: Jon Haddad
>Priority: Major
>
> This end result of this should change the ColumnFamily store, 
> ColumnFamilyStoreMBean, and tests that reference them by name.
> Deserves a note in news as this will break JMX compatibility and affect 
> scripts which change log level by class.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Comment Edited] (CASSANDRA-14340) Refactor ColumnFamilyStore to Table

2018-03-29 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer edited comment on CASSANDRA-14340 at 3/29/18 10:22 AM:
--

I quickly scanned the patch. It seems to me that it will break backward 
compatibility for JMX in a surprising way for the users as the mbean name does 
not change but the interface change.

I think that for example it will be impossible to use nodetool from the 4.0 
version to manage a 3.11 node or the opposite. I do not know how much of a 
problem it can be during a cluster migration.

We should at least put an entry for that in the {{NEWS.txt}}

 

 


was (Author: blerer):
I quickly scanned the patch. It seems to me that it will break backward 
compatibility for JMX in a surprising way for the users as the mbean name does 
not change but the interface change. As this change is in 4.0 it should be ok 
as long as the change is clearly mentionned in the {{NEWS.txt}}.

> Refactor ColumnFamilyStore to Table
> ---
>
> Key: CASSANDRA-14340
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14340
> Project: Cassandra
>  Issue Type: Sub-task
>  Components: Core
>Reporter: Jon Haddad
>Assignee: Jon Haddad
>Priority: Major
>
> This end result of this should change the ColumnFamily store, 
> ColumnFamilyStoreMBean, and tests that reference them by name.
> Deserves a note in news as this will break JMX compatibility and affect 
> scripts which change log level by class.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-14340) Refactor ColumnFamilyStore to Table

2018-03-29 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer commented on CASSANDRA-14340:


I quickly scanned the patch. It seems to me that it will break backward 
compatibility for JMX in a surprising way for the users as the mbean name does 
not change but the interface change. As this change is in 4.0 it should be ok 
as long as the change is clearly mentionned in the {{NEWS.txt}}.

> Refactor ColumnFamilyStore to Table
> ---
>
> Key: CASSANDRA-14340
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14340
> Project: Cassandra
>  Issue Type: Sub-task
>  Components: Core
>Reporter: Jon Haddad
>Assignee: Jon Haddad
>Priority: Major
>
> This end result of this should change the ColumnFamily store, 
> ColumnFamilyStoreMBean, and tests that reference them by name.
> Deserves a note in news as this will break JMX compatibility and affect 
> scripts which change log level by class.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Created] (CASSANDRA-14351) Support systemd SD_NOTIFY interface during startup

2018-03-29 Thread Thomas Bechtold (JIRA)
Thomas Bechtold created CASSANDRA-14351:
---

 Summary: Support systemd SD_NOTIFY interface during startup
 Key: CASSANDRA-14351
 URL: https://issues.apache.org/jira/browse/CASSANDRA-14351
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Thomas Bechtold


When cassandra is started via systemd, it would be nice to support the 
[SD_NOTIFY|https://www.freedesktop.org/software/systemd/man/sd_notify.html] 
protocol so systemd know, when cassandra is ready (that can be use for 
dependencies or when you need to wait until cassandra startup is done).
A very simple implementation could be done using the 
{code:java}
systemd-notify --ready
{code}
command line tool (and ignore it if the tool is not there)




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-14350) RHEL 7.4 compatibilty with: Apache cassandra 2.x and 3.x version Apache Zookeeper 3.x version Apache spark 1.x and 2.x version spark cassandra connector 1.x and

2018-03-29 Thread Apoorva Maheshwari (JIRA)

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

Apoorva Maheshwari updated CASSANDRA-14350:
---
Description: 
RHEL 7.4 compatibilty with:

Apache cassandra 2.x and 3.x version

Apache Zookeeper 3.x version

Apache spark 1.x and 2.x version

spark cassandra connector 1.x and 2.x version  

  was:Al

Summary: RHEL 7.4 compatibilty with:  Apache cassandra 2.x and 3.x 
version  Apache Zookeeper 3.x version  Apache spark 1.x and 2.x version  spark 
cassandra connector 1.x and 2.x version  (was: RHEL 7.4 compatibilty with: 
Apache cassandra 2.x and 3.x version)

> RHEL 7.4 compatibilty with:  Apache cassandra 2.x and 3.x version  Apache 
> Zookeeper 3.x version  Apache spark 1.x and 2.x version  spark cassandra 
> connector 1.x and 2.x version
> 
>
> Key: CASSANDRA-14350
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14350
> Project: Cassandra
>  Issue Type: Wish
>Reporter: Apoorva Maheshwari
>Priority: Major
>
> RHEL 7.4 compatibilty with:
> Apache cassandra 2.x and 3.x version
> Apache Zookeeper 3.x version
> Apache spark 1.x and 2.x version
> spark cassandra connector 1.x and 2.x version  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-14350) RHEL 7.4 compatibilty with: Apache cassandra 2.x and 3.x version

2018-03-29 Thread Apoorva Maheshwari (JIRA)

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

Apoorva Maheshwari updated CASSANDRA-14350:
---
Description: Al

> RHEL 7.4 compatibilty with: Apache cassandra 2.x and 3.x version
> 
>
> Key: CASSANDRA-14350
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14350
> Project: Cassandra
>  Issue Type: Wish
>Reporter: Apoorva Maheshwari
>Priority: Major
>
> Al



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Created] (CASSANDRA-14350) RHEL 7.4 compatibilty with: Apache cassandra 2.x and 3.x version

2018-03-29 Thread Apoorva Maheshwari (JIRA)
Apoorva Maheshwari created CASSANDRA-14350:
--

 Summary: RHEL 7.4 compatibilty with: Apache cassandra 2.x and 3.x 
version
 Key: CASSANDRA-14350
 URL: https://issues.apache.org/jira/browse/CASSANDRA-14350
 Project: Cassandra
  Issue Type: Wish
Reporter: Apoorva Maheshwari






--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-14284) Chunk checksum test needs to occur before uncompress to avoid JVM crash

2018-03-29 Thread Branimir Lambov (JIRA)

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

Branimir Lambov updated CASSANDRA-14284:

Status: In Progress  (was: Ready to Commit)

> Chunk checksum test needs to occur before uncompress to avoid JVM crash
> ---
>
> Key: CASSANDRA-14284
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14284
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
> Environment: The check-only-after-doing-the-decompress logic appears 
> to be in all current releases.
> Here are some samples at different evolution points :
> 3.11.2:
> [https://github.com/apache/cassandra/blob/cassandra-3.11.2/src/java/org/apache/cassandra/io/util/CompressedChunkReader.java#L146]
> https://github.com/apache/cassandra/blob/cassandra-3.11.2/src/java/org/apache/cassandra/io/util/CompressedChunkReader.java#L207
>  
> 3.5:
>  
> [https://github.com/apache/cassandra/blob/cassandra-3.5/src/java/org/apache/cassandra/io/compress/CompressedRandomAccessReader.java#L135]
> [https://github.com/apache/cassandra/blob/cassandra-3.5/src/java/org/apache/cassandra/io/compress/CompressedRandomAccessReader.java#L196]
> 2.1.17:
>  
> [https://github.com/apache/cassandra/blob/cassandra-2.1.17/src/java/org/apache/cassandra/io/compress/CompressedRandomAccessReader.java#L122]
>  
>Reporter: Gil Tene
>Assignee: Benjamin Lerer
>Priority: Major
>
> While checksums are (generally) performed on compressed data, the checksum 
> test when reading is currently (in all variants of C* 2.x, 3.x I've looked 
> at) done [on the compressed data] only after the uncompress operation has 
> completed. 
> The issue here is that LZ4_decompress_fast (as documented in e.g. 
> [https://github.com/lz4/lz4/blob/dev/lib/lz4.h#L214)] can result in memory 
> overruns when provided with malformed source data. This in turn can (and 
> does, e.g. in CASSANDRA-13757) lead to JVM crashes during the uncompress of 
> corrupted chunks. The checksum operation would obviously detect the issue, 
> but we'd never get to it if the JVM crashes first.
> Moving the checksum test of the compressed data to before the uncompress 
> operation (in cases where the checksum is done on compressed data) will 
> resolve this issue.
> -
> The check-only-after-doing-the-decompress logic appears to be in all current 
> releases.
> Here are some samples at different evolution points :
> 3.11.2:
> [https://github.com/apache/cassandra/blob/cassandra-3.11.2/src/java/org/apache/cassandra/io/util/CompressedChunkReader.java#L146]
> https://github.com/apache/cassandra/blob/cassandra-3.11.2/src/java/org/apache/cassandra/io/util/CompressedChunkReader.java#L207
>  
> 3.5:
>  
> [https://github.com/apache/cassandra/blob/cassandra-3.5/src/java/org/apache/cassandra/io/compress/CompressedRandomAccessReader.java#L135]
> [https://github.com/apache/cassandra/blob/cassandra-3.5/src/java/org/apache/cassandra/io/compress/CompressedRandomAccessReader.java#L196]
> 2.1.17:
>  
> [https://github.com/apache/cassandra/blob/cassandra-2.1.17/src/java/org/apache/cassandra/io/compress/CompressedRandomAccessReader.java#L122]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-14245) SELECT JSON prints null on empty strings

2018-03-29 Thread Norbert Schultz (JIRA)

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

Norbert Schultz commented on CASSANDRA-14245:
-

Thanks for fixing.

 

> SELECT JSON prints null on empty strings
> 
>
> Key: CASSANDRA-14245
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14245
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
> Environment: Cassandra 3.11.2, Ubuntu 16.04 LTS
>  
>Reporter: Norbert Schultz
>Assignee: Francisco Fernandez
>Priority: Major
> Fix For: 4.0, 3.11.3
>
>
> SELECT JSON reports an empty string as null.
>  
> Example:
> {code:java}
> cqlsh:unittest> create table test(id INT, name TEXT, PRIMARY KEY(id));
> cqlsh:unittest> insert into test (id, name) VALUES (1, 'Foo');
> cqlsh:unittest> insert into test (id, name) VALUES (2, '');
> cqlsh:unittest> insert into test (id, name) VALUES (3, null);
> cqlsh:unittest> select * from test;
> id | name
> +--
>   1 |  Foo
>   2 |     
>   3 | null
> (3 rows)
> cqlsh:unittest> select JSON * from test;
> [json]
> --
> {"id": 1, "name": "Foo"}
> {"id": 2, "name": null}
> {"id": 3, "name": null}
> (3 rows){code}
>  
> This even happens, if the string is part of the Primary Key, which makes the 
> generated string not insertable.
>  
> {code:java}
> cqlsh:unittest> create table test2 (id INT, name TEXT, age INT, PRIMARY 
> KEY(id, name));
> cqlsh:unittest> insert into test2 (id, name, age) VALUES (1, '', 42);
> cqlsh:unittest> select JSON * from test2;
> [json]
> 
> {"id": 1, "name": null, "age": 42}
> (1 rows)
> cqlsh:unittest> insert into test2 JSON '{"id": 1, "name": null, "age": 42}';
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Invalid 
> null value in condition for column name"{code}
>  
> On an older version of Cassandra (3.0.8) does not have this problem.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-14242) Indexed static column returns inconsistent results

2018-03-29 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer updated CASSANDRA-14242:
---
Reviewer: Benjamin Lerer

> Indexed static column returns inconsistent results
> --
>
> Key: CASSANDRA-14242
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14242
> Project: Cassandra
>  Issue Type: Bug
> Environment: Cassandra 3.11.2
> Java driver 3.4.0
> Ubuntu - 4.4.0-112-generic
>Reporter: Ross Black
>Assignee: Andrés de la Peña
>Priority: Major
> Fix For: 3.0.x, 3.11.x
>
>
> I am using Cassandra 3.11.2, and the Java driver 3.4.0
> I have a table that has a static column, where the static column has a 
> secondary index.
> When querying the table I get incomplete or duplicated results, depending on 
> the fetch size.
> e.g.
> {code:java}
> CREATE KEYSPACE hack WITH replication = {'class': 'SimpleStrategy', 
> 'replication_factor': 1};
> CREATE TABLE hack.stuff (id int, kind text, chunk int static, val1 int, 
> PRIMARY KEY (id, kind));
> CREATE INDEX stuff_chunk_index ON hack.stuff (chunk);{code}
> -- repeat with thousands of values for id =>
> {code:java}
>   INSERT INTO hack.stuff (id, chunk, kind, val1 ) VALUES (${id}, 777, 'A', 
> 123);{code}
> Querying from Java:
> {code:java}
>     final SimpleStatement statement = new SimpleStatement("SELECT id, kind, 
> val1 FROM hack.stuff WHERE chunk = " + chunk); 
>     statement.setFetchSize(fetchSize);
>     statement.setConsistencyLevel(ConsistencyLevel.ALL);
>     final ResultSet resultSet = connection.getSession().execute(statement);
>     for (Row row : resultSet) {
>     final int id = row.getInt("id");
>     }{code}
> *The number of results returned depends on the fetch-size.*
> e.g. For 30k values inserted, I get the following:
> ||fetch-size||result-size||
> |4|3|
> |2|30001|
> |5000|30006|
> |100|30303|
> In production, I have a much larger table where the correct result size for a 
> specific chunk is 20019, but some fetch sizes will return _significantly 
> fewer_ results.
> ||fetch-size||result-size|| ||
> |25000|20019| |
> |5000||*<== this one is has far fewer results*|
> |5001|20026| |
> (so far been unable to reproduce this with the simpler test table)
> Thanks,
> Ross



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Resolved] (CASSANDRA-14245) SELECT JSON prints null on empty strings

2018-03-29 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer resolved CASSANDRA-14245.

   Resolution: Fixed
Fix Version/s: 3.11.3
   4.0

Committed into 3.11 at 5cbe08b6a84cfa51ffd952a7c997b9a5f5e46e92 and merged into 
trunk.

> SELECT JSON prints null on empty strings
> 
>
> Key: CASSANDRA-14245
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14245
> Project: Cassandra
>  Issue Type: Bug
>  Components: CQL
> Environment: Cassandra 3.11.2, Ubuntu 16.04 LTS
>  
>Reporter: Norbert Schultz
>Assignee: Francisco Fernandez
>Priority: Major
> Fix For: 4.0, 3.11.3
>
>
> SELECT JSON reports an empty string as null.
>  
> Example:
> {code:java}
> cqlsh:unittest> create table test(id INT, name TEXT, PRIMARY KEY(id));
> cqlsh:unittest> insert into test (id, name) VALUES (1, 'Foo');
> cqlsh:unittest> insert into test (id, name) VALUES (2, '');
> cqlsh:unittest> insert into test (id, name) VALUES (3, null);
> cqlsh:unittest> select * from test;
> id | name
> +--
>   1 |  Foo
>   2 |     
>   3 | null
> (3 rows)
> cqlsh:unittest> select JSON * from test;
> [json]
> --
> {"id": 1, "name": "Foo"}
> {"id": 2, "name": null}
> {"id": 3, "name": null}
> (3 rows){code}
>  
> This even happens, if the string is part of the Primary Key, which makes the 
> generated string not insertable.
>  
> {code:java}
> cqlsh:unittest> create table test2 (id INT, name TEXT, age INT, PRIMARY 
> KEY(id, name));
> cqlsh:unittest> insert into test2 (id, name, age) VALUES (1, '', 42);
> cqlsh:unittest> select JSON * from test2;
> [json]
> 
> {"id": 1, "name": null, "age": 42}
> (1 rows)
> cqlsh:unittest> insert into test2 JSON '{"id": 1, "name": null, "age": 42}';
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Invalid 
> null value in condition for column name"{code}
>  
> On an older version of Cassandra (3.0.8) does not have this problem.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-12106) Add ability to blacklist a CQL partition so all requests are ignored

2018-03-29 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer updated CASSANDRA-12106:
---
Reviewer:   (was: Benjamin Lerer)

> Add ability to blacklist a CQL partition so all requests are ignored
> 
>
> Key: CASSANDRA-12106
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12106
> Project: Cassandra
>  Issue Type: New Feature
>Reporter: Geoffrey Yu
>Assignee: Geoffrey Yu
>Priority: Minor
> Fix For: 4.x
>
> Attachments: 12106-trunk.txt
>
>
> Sometimes reads/writes to a given partition may cause problems due to the 
> data present. It would be useful to have a manual way to blacklist such 
> partitions so all read and write requests to them are rejected.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-14319) nodetool rebuild from DC lets you pass invalid datacenters

2018-03-29 Thread Vinay Chella (JIRA)

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

Vinay Chella commented on CASSANDRA-14319:
--

Hi [~rustyrazorblade],

I took a stab at it and implemented #1 and #2 from the list above, attached the 
patch with this implementation. Waiting for more information on #3. 

> nodetool rebuild from DC lets you pass invalid datacenters 
> ---
>
> Key: CASSANDRA-14319
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14319
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Jon Haddad
>Assignee: Vinay Chella
>Priority: Major
> Fix For: 2.1.x, 2.2.x, 3.0.x, 3.11.x, 4.x
>
> Attachments: CASSANDRA-14319-trunk.txt
>
>
> If you pass an invalid datacenter to nodetool rebuild, you'll get an error 
> like this:
> {code}
> Unable to find sufficient sources for streaming range 
> (3074457345618258602,-9223372036854775808] in keyspace system_distributed
> {code}
> Unfortunately, this is a rabbit hole of frustration if you are using caps for 
> your DC names and you pass in a lowercase DC name, or you just typo the DC.  
> Let's do the following:
> # Check the DC name that's passed in against the list of DCs we know about
> # If we don't find it, let's output a reasonable error, and list all the DCs 
> someone could put in.
> # Ideally we indicate which keyspaces are set to replicate to this DC and 
> which aren't



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-14319) nodetool rebuild from DC lets you pass invalid datacenters

2018-03-29 Thread Vinay Chella (JIRA)

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

Vinay Chella updated CASSANDRA-14319:
-
Attachment: CASSANDRA-14319-trunk.txt

> nodetool rebuild from DC lets you pass invalid datacenters 
> ---
>
> Key: CASSANDRA-14319
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14319
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Jon Haddad
>Assignee: Vinay Chella
>Priority: Major
> Fix For: 2.1.x, 2.2.x, 3.0.x, 3.11.x, 4.x
>
> Attachments: CASSANDRA-14319-trunk.txt
>
>
> If you pass an invalid datacenter to nodetool rebuild, you'll get an error 
> like this:
> {code}
> Unable to find sufficient sources for streaming range 
> (3074457345618258602,-9223372036854775808] in keyspace system_distributed
> {code}
> Unfortunately, this is a rabbit hole of frustration if you are using caps for 
> your DC names and you pass in a lowercase DC name, or you just typo the DC.  
> Let's do the following:
> # Check the DC name that's passed in against the list of DCs we know about
> # If we don't find it, let's output a reasonable error, and list all the DCs 
> someone could put in.
> # Ideally we indicate which keyspaces are set to replicate to this DC and 
> which aren't



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org