[jira] [Commented] (CASSANDRA-12734) Materialized View schema file for snapshots created as tables

2019-05-08 Thread Tellier Benoit (JIRA)


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

Tellier Benoit commented on CASSANDRA-12734:



{code:java}
cqlsh -e "DESCRIBE SCHEMA" > schema.cql
{code}

Is able to export the creation command for the dematerialized view. One can 
thus create the right tables prior importing the snapshots.

> Materialized View schema file for snapshots created as tables
> -
>
> Key: CASSANDRA-12734
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12734
> Project: Cassandra
>  Issue Type: Bug
>  Components: Feature/Materialized Views, Legacy/Tools
>Reporter: Hau Phan
>Assignee: Alex Petrov
>Priority: Normal
> Fix For: 3.0.x
>
>
> The materialized view schema file that gets created and stored with the 
> sstables is created as a table instead of a materialized view.  
> Can the materialized view be created and added to the corresponding table's  
> schema file?



--
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-14883) Let Cassandra support the new JVM, Eclipse Openj9.

2019-05-08 Thread Blake Eggleston (JIRA)


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

Blake Eggleston reassigned CASSANDRA-14883:
---

Assignee: (was: Blake Eggleston)

> Let Cassandra support the new JVM, Eclipse Openj9.
> --
>
> Key: CASSANDRA-14883
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14883
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Packaging
> Environment: jdk8u192-b12_openj9-0.11.0
> cassandra 4.0.0_beta_20181109_build
>Reporter: Lee Sangboo
>Priority: Normal
> Fix For: 4.0.x
>
> Attachments: jamm-0.3.2.jar, jamm.zip
>
>
> Cassandra does not currently support the new JVM, Eclipse Openj9. In internal 
> testing, Openj9 outperforms Hotspot. I have deployed a modified jamm library 
> that has a problem with the current startup, but when I started Cassandra, I 
> got a log message saying "Non-Oracle JVM detected." Some features, such as 
> unimported compact SSTables, may not work as intended "If there is no 
> problem, I would also like to delete the above message.



--
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-14883) Let Cassandra support the new JVM, Eclipse Openj9.

2019-05-08 Thread Blake Eggleston (JIRA)


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

Blake Eggleston reassigned CASSANDRA-14883:
---

Assignee: Blake Eggleston

> Let Cassandra support the new JVM, Eclipse Openj9.
> --
>
> Key: CASSANDRA-14883
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14883
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Packaging
> Environment: jdk8u192-b12_openj9-0.11.0
> cassandra 4.0.0_beta_20181109_build
>Reporter: Lee Sangboo
>Assignee: Blake Eggleston
>Priority: Normal
> Fix For: 4.0.x
>
> Attachments: jamm-0.3.2.jar, jamm.zip
>
>
> Cassandra does not currently support the new JVM, Eclipse Openj9. In internal 
> testing, Openj9 outperforms Hotspot. I have deployed a modified jamm library 
> that has a problem with the current startup, but when I started Cassandra, I 
> got a log message saying "Non-Oracle JVM detected." Some features, such as 
> unimported compact SSTables, may not work as intended "If there is no 
> problem, I would also like to delete the above message.



--
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-14883) Let Cassandra support the new JVM, Eclipse Openj9.

2019-05-08 Thread Blake Eggleston (JIRA)


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

Blake Eggleston edited comment on CASSANDRA-14883 at 5/8/19 8:12 PM:
-

[~avermeerbergen] do you see this log message (logged at INFO) when starting 
your Cassandra 3.x install with OpenJ9?

 
{quote}Cannot initialize un-mmaper. (Are you using a non-Oracle JVM?) Compacted 
data files will not be removed promptly. Consider using an Oracle JVM or using 
standard disk access mode
{quote}


was (Author: bdeggleston):
[~avermeerbergen] do you see this message when starting your Cassandra 3.x 
install with OpenJ9?

 
{quote}Cannot initialize un-mmaper. (Are you using a non-Oracle JVM?) Compacted 
data files will not be removed promptly. Consider using an Oracle JVM or using 
standard disk access mode{quote}

> Let Cassandra support the new JVM, Eclipse Openj9.
> --
>
> Key: CASSANDRA-14883
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14883
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Packaging
> Environment: jdk8u192-b12_openj9-0.11.0
> cassandra 4.0.0_beta_20181109_build
>Reporter: Lee Sangboo
>Priority: Normal
> Fix For: 4.0.x
>
> Attachments: jamm-0.3.2.jar, jamm.zip
>
>
> Cassandra does not currently support the new JVM, Eclipse Openj9. In internal 
> testing, Openj9 outperforms Hotspot. I have deployed a modified jamm library 
> that has a problem with the current startup, but when I started Cassandra, I 
> got a log message saying "Non-Oracle JVM detected." Some features, such as 
> unimported compact SSTables, may not work as intended "If there is no 
> problem, I would also like to delete the above message.



--
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-14883) Let Cassandra support the new JVM, Eclipse Openj9.

2019-05-08 Thread Blake Eggleston (JIRA)


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

Blake Eggleston commented on CASSANDRA-14883:
-

[~avermeerbergen] do you see this message when starting your Cassandra 3.x 
install with OpenJ9?

 
{quote}Cannot initialize un-mmaper. (Are you using a non-Oracle JVM?) Compacted 
data files will not be removed promptly. Consider using an Oracle JVM or using 
standard disk access mode{quote}

> Let Cassandra support the new JVM, Eclipse Openj9.
> --
>
> Key: CASSANDRA-14883
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14883
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Packaging
> Environment: jdk8u192-b12_openj9-0.11.0
> cassandra 4.0.0_beta_20181109_build
>Reporter: Lee Sangboo
>Priority: Normal
> Fix For: 4.0.x
>
> Attachments: jamm-0.3.2.jar, jamm.zip
>
>
> Cassandra does not currently support the new JVM, Eclipse Openj9. In internal 
> testing, Openj9 outperforms Hotspot. I have deployed a modified jamm library 
> that has a problem with the current startup, but when I started Cassandra, I 
> got a log message saying "Non-Oracle JVM detected." Some features, such as 
> unimported compact SSTables, may not work as intended "If there is no 
> problem, I would also like to delete the above message.



--
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-15103) Add Failure Detection Documentation

2019-05-08 Thread Elijah Augustin (JIRA)


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

Elijah Augustin commented on CASSANDRA-15103:
-

Also I would suggest getting in contact with my friend who worked on the 
overview [~Shane-Lester99]

> Add Failure Detection Documentation
> ---
>
> Key: CASSANDRA-15103
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15103
> Project: Cassandra
>  Issue Type: Task
>Reporter: Elijah Augustin
>Assignee: Elijah Augustin
>Priority: Normal
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Topics/Concepts To Cover
>  * Why Failure Detection is needed and used
>  * State tracking with Gossip
>  * Typical Reasons for Node Failure



--
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-15103) Add Failure Detection Documentation

2019-05-08 Thread Elijah Augustin (JIRA)


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

Elijah Augustin commented on CASSANDRA-15103:
-

[~zznate] No problem. Descriptions have been updated

> Add Failure Detection Documentation
> ---
>
> Key: CASSANDRA-15103
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15103
> Project: Cassandra
>  Issue Type: Task
>Reporter: Elijah Augustin
>Assignee: Elijah Augustin
>Priority: Normal
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Topics/Concepts To Cover
>  * Why Failure Detection is needed and used
>  * State tracking with Gossip
>  * Typical Reasons for Node Failure



--
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-15102) Add Architecture Overview Documentation

2019-05-08 Thread Elijah Augustin (JIRA)


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

Elijah Augustin updated CASSANDRA-15102:

Description: 
{color:#FF} {color}

Topics/Concepts To Cover

 
 * High level overview of the architecture
 * Principles of Dynamo and how it is implemented in Cassandra
 * Brief explanation of Gossip protocol
 * Data distribution over nodes
 * Brief explanation of partition key
 * How replication of data is possible

> Add Architecture Overview Documentation
> ---
>
> Key: CASSANDRA-15102
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15102
> Project: Cassandra
>  Issue Type: Task
>Reporter: Elijah Augustin
>Assignee: Shane Lester
>Priority: Normal
>  Labels: pull-request-available
>
> {color:#FF} {color}
> Topics/Concepts To Cover
>  
>  * High level overview of the architecture
>  * Principles of Dynamo and how it is implemented in Cassandra
>  * Brief explanation of Gossip protocol
>  * Data distribution over nodes
>  * Brief explanation of partition key
>  * How replication of data is possible



--
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-15103) Add Failure Detection Documentation

2019-05-08 Thread Elijah Augustin (JIRA)


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

Elijah Augustin updated CASSANDRA-15103:

Description: 
Topics/Concepts To Cover
 * Why Failure Detection is needed and used
 * State tracking with Gossip
 * Typical Reasons for Node Failure

> Add Failure Detection Documentation
> ---
>
> Key: CASSANDRA-15103
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15103
> Project: Cassandra
>  Issue Type: Task
>Reporter: Elijah Augustin
>Assignee: Elijah Augustin
>Priority: Normal
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Topics/Concepts To Cover
>  * Why Failure Detection is needed and used
>  * State tracking with Gossip
>  * Typical Reasons for Node Failure



--
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-15101) Add Token Ring/Range Documentation

2019-05-08 Thread Elijah Augustin (JIRA)


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

Elijah Augustin updated CASSANDRA-15101:

Description: 
Topics/Concepts To Cover

 
 * What the Token Ring is used for
 * How Cassandra decides where data is store within the Token Ring

> Add Token Ring/Range Documentation
> --
>
> Key: CASSANDRA-15101
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15101
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Documentation/Blog, Legacy/Documentation and Website
>Reporter: Elijah Augustin
>Assignee: Elijah Augustin
>Priority: Normal
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Topics/Concepts To Cover
>  
>  * What the Token Ring is used for
>  * How Cassandra decides where data is store within the Token Ring



--
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-15102) Add Architecture Overview Documentation

2019-05-08 Thread Shane Lester (JIRA)


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

Shane Lester updated CASSANDRA-15102:
-
Labels: pull-request-available  (was: )

> Add Architecture Overview Documentation
> ---
>
> Key: CASSANDRA-15102
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15102
> Project: Cassandra
>  Issue Type: Task
>Reporter: Elijah Augustin
>Assignee: Shane Lester
>Priority: Normal
>  Labels: pull-request-available
>




--
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-15115) WindowsFailedSnapshotTracker.deleteOldSnapshots() throws RuntimeException when it failed to create a file

2019-05-08 Thread eBugs (JIRA)


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

eBugs commented on CASSANDRA-15115:
---

Thanks Jon!

If throwing a RuntimeException is preferred, maybe it can wrap its cause 
exception, i.e., the caught IOException, before throwing:
{code:java}
try
{
_failedSnapshotFile = new PrintWriter(new FileWriter(TODELETEFILE, true));
}
catch (IOException e)
{
throw new RuntimeException(String.format("Failed to create failed snapshot 
tracking file [%s]. Aborting", TODELETEFILE));
}
{code}

> WindowsFailedSnapshotTracker.deleteOldSnapshots() throws RuntimeException 
> when it failed to create a file
> -
>
> Key: CASSANDRA-15115
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15115
> Project: Cassandra
>  Issue Type: Bug
>Reporter: eBugs
>Assignee: Jon Meredith
>Priority: Normal
>
> Dear Cassandra developers, we are developing a tool to detect 
> exception-related bugs in Java. Our prototype has spotted the following 
> {{throw}} statement whose exception class and error message indicate 
> different error conditions.
>  
> Version: Cassandra-3.11 (commit: 123113f7b887370a248669ee0db6fdf13df0146e) 
> File: 
> CASSANDRA-ROOT/src/java/org/apache/cassandra/db/WindowsFailedSnapshotTracker.java
> Line: 98
> {code:java}
> throw new RuntimeException(String.format("Failed to create failed snapshot 
> tracking file [%s]. Aborting", TODELETEFILE));{code}
>  
> {{RuntimeException}} is usually used to represent errors in the program logic 
> (think of one of its subclasses, {{NullPointerException}}), while the error 
> message indicates that {{deleteOldSnapshots()}} failed to create a file. This 
> mismatch could be a problem. For example, the callers may miss the 
> possibility that {{deleteOldSnapshots()}} can fail to create a file because 
> it does not throw any {{IOException}}. Or, the callers trying to handle other 
> {{RuntimeException}} may accidentally (and incorrectly) handle the file 
> creation failure.



--
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-15114) Cassandra does not follow user's disk_failure_policy when getWriteDirectory() runs out of disk space

2019-05-08 Thread Jon Meredith (JIRA)


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

Jon Meredith commented on CASSANDRA-15114:
--

Thanks for filing the bug report. I'll be investigating over the next few days. 

> Cassandra does not follow user's disk_failure_policy when getWriteDirectory() 
> runs out of disk space
> 
>
> Key: CASSANDRA-15114
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15114
> Project: Cassandra
>  Issue Type: Bug
>Reporter: eBugs
>Assignee: Jon Meredith
>Priority: Normal
>
> Dear Cassandra developers, we are developing a tool to detect 
> exception-related bugs in Java. Our prototype has spotted the following two 
> {{throw}} statements whose exception class and error message indicate 
> different error conditions.
>  
> Version: Cassandra-3.11 (commit: 123113f7b887370a248669ee0db6fdf13df0146e) 
> File: 
> CASSANDRA-ROOT/src/java/org/apache/cassandra/db/compaction/writers/CompactionAwareWriter.java
> Line: 222 & 231
> {code:java}
> if (availableSpace < estimatedWriteSize)
> throw new RuntimeException(String.format("Not enough space to write %s to 
> %s (%s available)",
>  
> FBUtilities.prettyPrintMemory(estimatedWriteSize),
>  d.location,
>  
> FBUtilities.prettyPrintMemory(availableSpace)));{code}
> {code:java}
> d = getDirectories().getWriteableLocation(estimatedWriteSize);
> if (d == null)
> throw new RuntimeException(String.format("Not enough disk space to store 
> %s",
>  
> FBUtilities.prettyPrintMemory(estimatedWriteSize)));
> {code}
>  
> {{RuntimeException}} is usually used to represent errors in the program logic 
> (think of one of its subclasses, {{NullPointerException}}), while the error 
> messages indicate that the Cassandra node is running out of disk space. This 
> mismatch could be a problem. For example, the callers may miss the 
> possibility that {{getWriteDirectory()}} can run out of disk space because it 
> does not throw an accurate exception class (e.g., CASSANDRA-11448). Or, the 
> callers trying to handle other {{RuntimeException}} may accidentally (and 
> incorrectly) handle the out of disk space scenario.



--
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-15117) CommitLogArchiver.maybeRestoreArchive() throws a RuntimeException when it failed to list a directory

2019-05-08 Thread Jon Meredith (JIRA)


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

Jon Meredith commented on CASSANDRA-15117:
--

Thanks for filing the bug report. I'll be investigating over the next few days.

> CommitLogArchiver.maybeRestoreArchive() throws a RuntimeException when it 
> failed to list a directory
> 
>
> Key: CASSANDRA-15117
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15117
> Project: Cassandra
>  Issue Type: Bug
>Reporter: eBugs
>Assignee: Jon Meredith
>Priority: Normal
>
> Dear Cassandra developers, we are developing a tool to detect 
> exception-related bugs in Java. Our prototype has spotted the following 
> {{throw}} statement whose exception class and error message indicate 
> different error conditions.
>  
> Version: Cassandra-3.11 (commit: 123113f7b887370a248669ee0db6fdf13df0146e) 
> File: 
> CASSANDRA-ROOT/src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java
> Line: 225
> {code:java}
> throw new RuntimeException("Unable to list directory " + dir);{code}
>  
> {{RuntimeException}} is usually used to represent errors in the program logic 
> (think of one of its subclasses, {{NullPointerException}}), while the error 
> message indicates that {{maybeRestoreArchive()}} failed to list a directory. 
> This mismatch could be a problem. For example, the callers may miss the 
> possibility that {{maybeRestoreArchive()}} can fail to list a directory 
> because it does not throw any {{IOException}}. Or, the callers trying to 
> handle other {{RuntimeException}} may accidentally (and incorrectly) handle 
> the directory listing failure.



--
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-15116) CommitLogArchiver.construct() throws a RuntimeException when it failed to create a directory

2019-05-08 Thread Jon Meredith (JIRA)


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

Jon Meredith commented on CASSANDRA-15116:
--

Thanks for filing the bug report. I'll be investigating over the next few days.

> CommitLogArchiver.construct() throws a RuntimeException when it failed to 
> create a directory
> 
>
> Key: CASSANDRA-15116
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15116
> Project: Cassandra
>  Issue Type: Bug
>Reporter: eBugs
>Assignee: Jon Meredith
>Priority: Normal
>
> Dear Cassandra developers, we are developing a tool to detect 
> exception-related bugs in Java. Our prototype has spotted the following 
> {{throw}} statement whose exception class and error message indicate 
> different error conditions.
>  
> Version: Cassandra-3.11 (commit: 123113f7b887370a248669ee0db6fdf13df0146e) 
> File: 
> CASSANDRA-ROOT/src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java
> Line: 110
> {code:java}
> throw new RuntimeException("Unable to create directory: " + dir);{code}
>  
> {{RuntimeException}} is usually used to represent errors in the program logic 
> (think of one of its subclasses, {{NullPointerException}}), while the error 
> message indicates that {{construct()}} failed to create a directory. This 
> mismatch could be a problem. For example, the callers may miss the 
> possibility that {{construct()}} can fail to create a directory because it 
> does not throw any {{IOException}}. Or, the callers trying to handle other 
> {{RuntimeException}} may accidentally (and incorrectly) handle the directory 
> creation failure.



--
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-15115) WindowsFailedSnapshotTracker.deleteOldSnapshots() throws RuntimeException when it failed to create a file

2019-05-08 Thread Jon Meredith (JIRA)


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

Jon Meredith commented on CASSANDRA-15115:
--

Thanks for filing the bug report. I'll be investigating over the next few days.

> WindowsFailedSnapshotTracker.deleteOldSnapshots() throws RuntimeException 
> when it failed to create a file
> -
>
> Key: CASSANDRA-15115
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15115
> Project: Cassandra
>  Issue Type: Bug
>Reporter: eBugs
>Assignee: Jon Meredith
>Priority: Normal
>
> Dear Cassandra developers, we are developing a tool to detect 
> exception-related bugs in Java. Our prototype has spotted the following 
> {{throw}} statement whose exception class and error message indicate 
> different error conditions.
>  
> Version: Cassandra-3.11 (commit: 123113f7b887370a248669ee0db6fdf13df0146e) 
> File: 
> CASSANDRA-ROOT/src/java/org/apache/cassandra/db/WindowsFailedSnapshotTracker.java
> Line: 98
> {code:java}
> throw new RuntimeException(String.format("Failed to create failed snapshot 
> tracking file [%s]. Aborting", TODELETEFILE));{code}
>  
> {{RuntimeException}} is usually used to represent errors in the program logic 
> (think of one of its subclasses, {{NullPointerException}}), while the error 
> message indicates that {{deleteOldSnapshots()}} failed to create a file. This 
> mismatch could be a problem. For example, the callers may miss the 
> possibility that {{deleteOldSnapshots()}} can fail to create a file because 
> it does not throw any {{IOException}}. Or, the callers trying to handle other 
> {{RuntimeException}} may accidentally (and incorrectly) handle the file 
> creation failure.



--
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-15117) CommitLogArchiver.maybeRestoreArchive() throws a RuntimeException when it failed to list a directory

2019-05-08 Thread Jon Meredith (JIRA)


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

Jon Meredith reassigned CASSANDRA-15117:


Assignee: Jon Meredith

> CommitLogArchiver.maybeRestoreArchive() throws a RuntimeException when it 
> failed to list a directory
> 
>
> Key: CASSANDRA-15117
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15117
> Project: Cassandra
>  Issue Type: Bug
>Reporter: eBugs
>Assignee: Jon Meredith
>Priority: Normal
>
> Dear Cassandra developers, we are developing a tool to detect 
> exception-related bugs in Java. Our prototype has spotted the following 
> {{throw}} statement whose exception class and error message indicate 
> different error conditions.
>  
> Version: Cassandra-3.11 (commit: 123113f7b887370a248669ee0db6fdf13df0146e) 
> File: 
> CASSANDRA-ROOT/src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java
> Line: 225
> {code:java}
> throw new RuntimeException("Unable to list directory " + dir);{code}
>  
> {{RuntimeException}} is usually used to represent errors in the program logic 
> (think of one of its subclasses, {{NullPointerException}}), while the error 
> message indicates that {{maybeRestoreArchive()}} failed to list a directory. 
> This mismatch could be a problem. For example, the callers may miss the 
> possibility that {{maybeRestoreArchive()}} can fail to list a directory 
> because it does not throw any {{IOException}}. Or, the callers trying to 
> handle other {{RuntimeException}} may accidentally (and incorrectly) handle 
> the directory listing failure.



--
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-15115) WindowsFailedSnapshotTracker.deleteOldSnapshots() throws RuntimeException when it failed to create a file

2019-05-08 Thread Jon Meredith (JIRA)


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

Jon Meredith reassigned CASSANDRA-15115:


Assignee: Jon Meredith

> WindowsFailedSnapshotTracker.deleteOldSnapshots() throws RuntimeException 
> when it failed to create a file
> -
>
> Key: CASSANDRA-15115
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15115
> Project: Cassandra
>  Issue Type: Bug
>Reporter: eBugs
>Assignee: Jon Meredith
>Priority: Normal
>
> Dear Cassandra developers, we are developing a tool to detect 
> exception-related bugs in Java. Our prototype has spotted the following 
> {{throw}} statement whose exception class and error message indicate 
> different error conditions.
>  
> Version: Cassandra-3.11 (commit: 123113f7b887370a248669ee0db6fdf13df0146e) 
> File: 
> CASSANDRA-ROOT/src/java/org/apache/cassandra/db/WindowsFailedSnapshotTracker.java
> Line: 98
> {code:java}
> throw new RuntimeException(String.format("Failed to create failed snapshot 
> tracking file [%s]. Aborting", TODELETEFILE));{code}
>  
> {{RuntimeException}} is usually used to represent errors in the program logic 
> (think of one of its subclasses, {{NullPointerException}}), while the error 
> message indicates that {{deleteOldSnapshots()}} failed to create a file. This 
> mismatch could be a problem. For example, the callers may miss the 
> possibility that {{deleteOldSnapshots()}} can fail to create a file because 
> it does not throw any {{IOException}}. Or, the callers trying to handle other 
> {{RuntimeException}} may accidentally (and incorrectly) handle the file 
> creation failure.



--
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-15116) CommitLogArchiver.construct() throws a RuntimeException when it failed to create a directory

2019-05-08 Thread Jon Meredith (JIRA)


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

Jon Meredith reassigned CASSANDRA-15116:


Assignee: Jon Meredith

> CommitLogArchiver.construct() throws a RuntimeException when it failed to 
> create a directory
> 
>
> Key: CASSANDRA-15116
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15116
> Project: Cassandra
>  Issue Type: Bug
>Reporter: eBugs
>Assignee: Jon Meredith
>Priority: Normal
>
> Dear Cassandra developers, we are developing a tool to detect 
> exception-related bugs in Java. Our prototype has spotted the following 
> {{throw}} statement whose exception class and error message indicate 
> different error conditions.
>  
> Version: Cassandra-3.11 (commit: 123113f7b887370a248669ee0db6fdf13df0146e) 
> File: 
> CASSANDRA-ROOT/src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java
> Line: 110
> {code:java}
> throw new RuntimeException("Unable to create directory: " + dir);{code}
>  
> {{RuntimeException}} is usually used to represent errors in the program logic 
> (think of one of its subclasses, {{NullPointerException}}), while the error 
> message indicates that {{construct()}} failed to create a directory. This 
> mismatch could be a problem. For example, the callers may miss the 
> possibility that {{construct()}} can fail to create a directory because it 
> does not throw any {{IOException}}. Or, the callers trying to handle other 
> {{RuntimeException}} may accidentally (and incorrectly) handle the directory 
> creation failure.



--
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-15121) Apache Cassandra session reuse vulnerability (TALOS-2019-0828)

2019-05-08 Thread Cisco Talos (JIRA)


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

Cisco Talos commented on CASSANDRA-15121:
-

2019-05-08 Issue emailed to [secur...@apache.org|mailto:secur...@apache.org] 
per Sam Tunnicliffe at j...@apache.org

> Apache Cassandra session reuse vulnerability (TALOS-2019-0828)
> --
>
> Key: CASSANDRA-15121
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15121
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Cisco Talos
>Priority: Normal
>
> Hello, the Cisco Talos team found a security vulnerability affecting Apache 
> Cassandra. An exploitable authentication vulnerability exists in Apache 
> Cassandra, versions 2.1.14 and 3.11.3.
> As this is a sensitive security issue, please confirm maintainer for this 
> issue to accept the detailed security advisory report and trigger input files.
>  
> For further information about the Cisco Vendor Vulnerability Reporting and 
> Disclosure Policy please refer to this document which also links to our 
> public PGP key. 
> https://tools.cisco.com/security/center/resources/vendor_vulnerability_policy.html
> Please CC [vuln...@cisco.com|mailto:vuln...@cisco.com] on all correspondence 
> related to this issue. 
>  



--
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-15121) Apache Cassandra session reuse vulnerability (TALOS-2019-0828)

2019-05-08 Thread Sam Tunnicliffe (JIRA)


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

Sam Tunnicliffe commented on CASSANDRA-15121:
-

Thanks, please submit the vulnerability report to secur...@apache.org, from 
where it will be recorded and forwarded to the Cassandra PMC. 

> Apache Cassandra session reuse vulnerability (TALOS-2019-0828)
> --
>
> Key: CASSANDRA-15121
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15121
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Cisco Talos
>Priority: Normal
>
> Hello, the Cisco Talos team found a security vulnerability affecting Apache 
> Cassandra. An exploitable authentication vulnerability exists in Apache 
> Cassandra, versions 2.1.14 and 3.11.3.
> As this is a sensitive security issue, please confirm maintainer for this 
> issue to accept the detailed security advisory report and trigger input files.
>  
> For further information about the Cisco Vendor Vulnerability Reporting and 
> Disclosure Policy please refer to this document which also links to our 
> public PGP key. 
> https://tools.cisco.com/security/center/resources/vendor_vulnerability_policy.html
> Please CC [vuln...@cisco.com|mailto:vuln...@cisco.com] on all correspondence 
> related to this issue. 
>  



--
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-15121) Apache Cassandra session reuse vulnerability (TALOS-2019-0828)

2019-05-08 Thread Cisco Talos (JIRA)
Cisco Talos created CASSANDRA-15121:
---

 Summary: Apache Cassandra session reuse vulnerability 
(TALOS-2019-0828)
 Key: CASSANDRA-15121
 URL: https://issues.apache.org/jira/browse/CASSANDRA-15121
 Project: Cassandra
  Issue Type: Bug
Reporter: Cisco Talos


Hello, the Cisco Talos team found a security vulnerability affecting Apache 
Cassandra. An exploitable authentication vulnerability exists in Apache 
Cassandra, versions 2.1.14 and 3.11.3.

As this is a sensitive security issue, please confirm maintainer for this issue 
to accept the detailed security advisory report and trigger input files.

 

For further information about the Cisco Vendor Vulnerability Reporting and 
Disclosure Policy please refer to this document which also links to our public 
PGP key. 
https://tools.cisco.com/security/center/resources/vendor_vulnerability_policy.html

Please CC [vuln...@cisco.com|mailto:vuln...@cisco.com] on all correspondence 
related to this issue. 

 



--
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-15086) Illegal column names make legacy sstables unreadable in 3.0/3.x

2019-05-08 Thread Sam Tunnicliffe (JIRA)


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

Sam Tunnicliffe updated CASSANDRA-15086:

Fix Version/s: (was: 3.11.x)
   (was: 3.0.x)
   3.11.5
   3.0.19
Since Version: 3.0.0
   Status: Resolved  (was: Ready to Commit)
   Resolution: Fixed

Thanks, committed to 3.0 in {{daf6c85b0530fb45ad1d8433efa0c5e13d7e182c}} and 
merged to 3.11 and trunk (with {{-s ours}})

> Illegal column names make legacy sstables unreadable in 3.0/3.x
> ---
>
> Key: CASSANDRA-15086
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15086
> Project: Cassandra
>  Issue Type: Bug
>  Components: Local/SSTable
>Reporter: Sam Tunnicliffe
>Assignee: Sam Tunnicliffe
>Priority: Normal
> Fix For: 3.0.19, 3.11.5
>
>
> CASSANDRA-10608 adds extra validation when decoding a bytebuffer representing 
> a legacy cellname. If the table is not COMPACT and the column name component 
> of the cellname refers to a primary key column, an IllegalArgumentException 
> is thrown. It looks like the original intent of 10608 was to prevent Thrift 
> writes from inserting these invalid cells, but the same code path is 
> exercised on the read path. The problem is that this kind of cells may exist 
> in pre-3.0 sstables, either due to Thrift writes or through side loading of 
> externally generated SSTables. Following an upgrade to 3.0, these partitions 
> become unreadable, breaking both the read and compaction paths (and so also 
> upgradesstables). Scrub in 2.1 does not help here as it blindly reproduces 
> the invalid cells.



--
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] 01/01: Merge branch 'cassandra-3.11' into trunk

2019-05-08 Thread samt
This is an automated email from the ASF dual-hosted git repository.

samt pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git

commit 67bb5dbf1da8827831045f79b85e5e25ffaab6fe
Merge: b0bb339 ba01089
Author: Sam Tunnicliffe 
AuthorDate: Wed May 8 10:06:10 2019 +0100

Merge branch 'cassandra-3.11' into trunk



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



[cassandra] branch trunk updated (b0bb339 -> 67bb5db)

2019-05-08 Thread samt
This is an automated email from the ASF dual-hosted git repository.

samt pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git.


from b0bb339  Merge branch 'cassandra-3.11' into trunk
 new daf6c85  Skip cells with illegal column names when reading legacy 
sstables
 new ba01089  Merge branch 'cassandra-3.0' into cassandra-3.11
 new 67bb5db  Merge branch 'cassandra-3.11' into trunk

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:


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



[cassandra] 01/01: Merge branch 'cassandra-3.0' into cassandra-3.11

2019-05-08 Thread samt
This is an automated email from the ASF dual-hosted git repository.

samt pushed a commit to branch cassandra-3.11
in repository https://gitbox.apache.org/repos/asf/cassandra.git

commit ba01089a0f08c6d8429a2de851d360f9c5af1527
Merge: c86f9b8 daf6c85
Author: Sam Tunnicliffe 
AuthorDate: Wed May 8 10:03:42 2019 +0100

Merge branch 'cassandra-3.0' into cassandra-3.11

 CHANGES.txt|   1 +
 ...tion.java => IllegalLegacyColumnException.java} |  28 --
 src/java/org/apache/cassandra/db/LegacyLayout.java |  57 +
 src/java/org/apache/cassandra/db/ReadCommand.java  |   2 +-
 .../cassandra/db/UnfilteredDeserializer.java   |   7 +++
 .../cassandra/db/UnknownColumnException.java   |  16 +-
 .../apache/cassandra/thrift/CassandraServer.java   |  34 ++--
 .../apache/cassandra/thrift/ThriftValidation.java  |   5 +-
 ...s-legacy_ka_with_illegal_cell_names-ka-1-CRC.db | Bin 0 -> 8 bytes
 ...-legacy_ka_with_illegal_cell_names-ka-1-Data.db | Bin 0 -> 292 bytes
 ...acy_ka_with_illegal_cell_names-ka-1-Digest.sha1 |   1 +
 ...egacy_ka_with_illegal_cell_names-ka-1-Filter.db | Bin 0 -> 16 bytes
 ...legacy_ka_with_illegal_cell_names-ka-1-Index.db | Bin 0 -> 36 bytes
 ...y_ka_with_illegal_cell_names-ka-1-Statistics.db | Bin 0 -> 4464 bytes
 ...gacy_ka_with_illegal_cell_names-ka-1-Summary.db | Bin 0 -> 128 bytes
 ...-legacy_ka_with_illegal_cell_names-ka-1-TOC.txt |   8 +++
 .../apache/cassandra/db/LegacyCellNameTest.java|  17 +-
 .../cassandra/io/sstable/LegacySSTableTest.java|  36 +
 18 files changed, 147 insertions(+), 65 deletions(-)

diff --cc CHANGES.txt
index 0506da7,0dac500..0deaa97
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,7 -1,5 +1,8 @@@
 -3.0.19
 +3.11.5
 + * Fixed nodetool cfstats printing index name twice (CASSANDRA-14903)
 + * Add flag to disable SASI indexes, and warnings on creation 
(CASSANDRA-14866)
 +Merged from 3.0:
+  * Skip cells with illegal column names when reading legacy sstables 
(CASSANDRA-15086)
   * Fix assorted gossip races and add related runtime checks (CASSANDRA-15059)
   * Fix mixed mode partition range scans with limit (CASSANDRA-15072)
   * cassandra-stress works with frozen collections: list and set 
(CASSANDRA-14907)
diff --cc src/java/org/apache/cassandra/db/LegacyLayout.java
index 87b5d58,cfaa71f..50fd945
--- a/src/java/org/apache/cassandra/db/LegacyLayout.java
+++ b/src/java/org/apache/cassandra/db/LegacyLayout.java
@@@ -187,12 -188,18 +189,18 @@@ public abstract class LegacyLayou
  {
  // If it's a compact table, it means the column is in fact a 
"dynamic" one
  if (metadata.isCompactTable())
 -return new LegacyCellName(new Clustering(column), 
metadata.compactValueColumn(), null);
 +return new LegacyCellName(Clustering.make(column), 
metadata.compactValueColumn(), null);
  
  if (def == null)
+ {
  throw new UnknownColumnException(metadata, column);
+ }
  else
- throw new IllegalArgumentException("Cannot add primary key 
column to partition update");
+ {
+ noSpamLogger.warn("Illegal cell name for CQL3 table {}.{}. {} 
is defined as a primary key column",
+  metadata.ksName, metadata.cfName, 
stringify(column));
+ throw new IllegalLegacyColumnException(metadata, column);
+ }
  }
  
  ByteBuffer collectionElement = metadata.isCompound() ? 
CompositeType.extractComponent(cellname, metadata.comparator.size() + 1) : null;
diff --cc src/java/org/apache/cassandra/thrift/CassandraServer.java
index 444a938,3a41df0..868f937
--- a/src/java/org/apache/cassandra/thrift/CassandraServer.java
+++ b/src/java/org/apache/cassandra/thrift/CassandraServer.java
@@@ -2203,9 -2176,9 +2203,9 @@@ public class CassandraServer implement
  PartitionUpdate update = 
PartitionUpdate.singleRowUpdate(metadata, key, 
BTreeRow.singleCellRow(name.clustering, cell));
  
  org.apache.cassandra.db.Mutation mutation = new 
org.apache.cassandra.db.Mutation(update);
 -doInsert(consistency_level, Arrays.asList(new 
CounterMutation(mutation, ThriftConversion.fromThrift(consistency_level;
 +doInsert(consistency_level, Arrays.asList(new 
CounterMutation(mutation, ThriftConversion.fromThrift(consistency_level))), 
queryStartNanoTime);
  }
- catch (MarshalException|UnknownColumnException e)
+ catch (MarshalException | UnknownColumnException | 
IllegalLegacyColumnException e)
  {
  throw new InvalidRequestException(e.getMessage());
  }
diff --cc src/java/org/apache/cassandra/thrift/ThriftValidation.java
index 575db66,e7a344a..602f15a
--- a/src/java/org/apache/cassandra/thrift/ThriftValidation.java
+++ 

[cassandra] branch cassandra-3.11 updated (c86f9b8 -> ba01089)

2019-05-08 Thread samt
This is an automated email from the ASF dual-hosted git repository.

samt pushed a change to branch cassandra-3.11
in repository https://gitbox.apache.org/repos/asf/cassandra.git.


from c86f9b8  Merge branch 'cassandra-3.0' into cassandra-3.11
 new daf6c85  Skip cells with illegal column names when reading legacy 
sstables
 new ba01089  Merge branch 'cassandra-3.0' into cassandra-3.11

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGES.txt|   1 +
 ...tion.java => IllegalLegacyColumnException.java} |  28 --
 src/java/org/apache/cassandra/db/LegacyLayout.java |  57 +
 src/java/org/apache/cassandra/db/ReadCommand.java  |   2 +-
 .../cassandra/db/UnfilteredDeserializer.java   |   7 +++
 .../cassandra/db/UnknownColumnException.java   |  16 +-
 .../apache/cassandra/thrift/CassandraServer.java   |  34 ++--
 .../apache/cassandra/thrift/ThriftValidation.java  |   5 +-
 ...s-legacy_ka_with_illegal_cell_names-ka-1-CRC.db | Bin 0 -> 8 bytes
 ...-legacy_ka_with_illegal_cell_names-ka-1-Data.db | Bin 0 -> 292 bytes
 ...acy_ka_with_illegal_cell_names-ka-1-Digest.sha1 |   1 +
 ...egacy_ka_with_illegal_cell_names-ka-1-Filter.db | Bin 0 -> 16 bytes
 ...legacy_ka_with_illegal_cell_names-ka-1-Index.db | Bin 0 -> 36 bytes
 ..._ka_with_illegal_cell_names-ka-1-Statistics.db} | Bin 4474 -> 4464 bytes
 ...gacy_ka_with_illegal_cell_names-ka-1-Summary.db | Bin 0 -> 128 bytes
 ...legacy_ka_with_illegal_cell_names-ka-1-TOC.txt} |  10 ++--
 .../apache/cassandra/db/LegacyCellNameTest.java|  17 +-
 .../cassandra/io/sstable/LegacySSTableTest.java|  36 +
 18 files changed, 144 insertions(+), 70 deletions(-)
 copy src/java/org/apache/cassandra/db/{UnknownColumnException.java => 
IllegalLegacyColumnException.java} (57%)
 create mode 100644 
test/data/legacy-sstables/ka/legacy_tables/legacy_ka_with_illegal_cell_names/legacy_tables-legacy_ka_with_illegal_cell_names-ka-1-CRC.db
 create mode 100644 
test/data/legacy-sstables/ka/legacy_tables/legacy_ka_with_illegal_cell_names/legacy_tables-legacy_ka_with_illegal_cell_names-ka-1-Data.db
 create mode 100644 
test/data/legacy-sstables/ka/legacy_tables/legacy_ka_with_illegal_cell_names/legacy_tables-legacy_ka_with_illegal_cell_names-ka-1-Digest.sha1
 create mode 100644 
test/data/legacy-sstables/ka/legacy_tables/legacy_ka_with_illegal_cell_names/legacy_tables-legacy_ka_with_illegal_cell_names-ka-1-Filter.db
 create mode 100644 
test/data/legacy-sstables/ka/legacy_tables/legacy_ka_with_illegal_cell_names/legacy_tables-legacy_ka_with_illegal_cell_names-ka-1-Index.db
 copy 
test/data/legacy-sstables/ka/legacy_tables/{legacy_ka_14912/legacy_tables-legacy_ka_14912-ka-1-Statistics.db
 => 
legacy_ka_with_illegal_cell_names/legacy_tables-legacy_ka_with_illegal_cell_names-ka-1-Statistics.db}
 (92%)
 create mode 100644 
test/data/legacy-sstables/ka/legacy_tables/legacy_ka_with_illegal_cell_names/legacy_tables-legacy_ka_with_illegal_cell_names-ka-1-Summary.db
 copy test/data/legacy-sstables/{jb/Keyspace1/Keyspace1-Standard1-jb-0-TOC.txt 
=> 
ka/legacy_tables/legacy_ka_with_illegal_cell_names/legacy_tables-legacy_ka_with_illegal_cell_names-ka-1-TOC.txt}
 (100%)


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



[cassandra] branch cassandra-3.0 updated: Skip cells with illegal column names when reading legacy sstables

2019-05-08 Thread samt
This is an automated email from the ASF dual-hosted git repository.

samt pushed a commit to branch cassandra-3.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/cassandra-3.0 by this push:
 new daf6c85  Skip cells with illegal column names when reading legacy 
sstables
daf6c85 is described below

commit daf6c85b0530fb45ad1d8433efa0c5e13d7e182c
Author: Sam Tunnicliffe 
AuthorDate: Thu Apr 11 17:32:17 2019 +0100

Skip cells with illegal column names when reading legacy sstables

Patch by Sam Tunnicliffe; reviewed by Aleksey Yeschenko for CASSANDRA-15086
---
 CHANGES.txt|   1 +
 ...tion.java => IllegalLegacyColumnException.java} |  28 --
 src/java/org/apache/cassandra/db/LegacyLayout.java |  57 +
 src/java/org/apache/cassandra/db/ReadCommand.java  |   2 +-
 .../cassandra/db/UnfilteredDeserializer.java   |   7 +++
 .../cassandra/db/UnknownColumnException.java   |  16 +-
 .../apache/cassandra/thrift/CassandraServer.java   |  34 ++--
 .../apache/cassandra/thrift/ThriftValidation.java  |   5 +-
 ...s-legacy_ka_with_illegal_cell_names-ka-1-CRC.db | Bin 0 -> 8 bytes
 ...-legacy_ka_with_illegal_cell_names-ka-1-Data.db | Bin 0 -> 292 bytes
 ...acy_ka_with_illegal_cell_names-ka-1-Digest.sha1 |   1 +
 ...egacy_ka_with_illegal_cell_names-ka-1-Filter.db | Bin 0 -> 16 bytes
 ...legacy_ka_with_illegal_cell_names-ka-1-Index.db | Bin 0 -> 36 bytes
 ...y_ka_with_illegal_cell_names-ka-1-Statistics.db | Bin 0 -> 4464 bytes
 ...gacy_ka_with_illegal_cell_names-ka-1-Summary.db | Bin 0 -> 128 bytes
 ...-legacy_ka_with_illegal_cell_names-ka-1-TOC.txt |   8 +++
 .../apache/cassandra/db/LegacyCellNameTest.java|  17 +-
 .../cassandra/io/sstable/LegacySSTableTest.java|  36 +
 18 files changed, 147 insertions(+), 65 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index 596d902..0dac500 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.19
+ * Skip cells with illegal column names when reading legacy sstables 
(CASSANDRA-15086)
  * Fix assorted gossip races and add related runtime checks (CASSANDRA-15059)
  * Fix mixed mode partition range scans with limit (CASSANDRA-15072)
  * cassandra-stress works with frozen collections: list and set 
(CASSANDRA-14907)
diff --git a/src/java/org/apache/cassandra/db/UnknownColumnException.java 
b/src/java/org/apache/cassandra/db/IllegalLegacyColumnException.java
similarity index 57%
copy from src/java/org/apache/cassandra/db/UnknownColumnException.java
copy to src/java/org/apache/cassandra/db/IllegalLegacyColumnException.java
index 55dc453..b70d248 100644
--- a/src/java/org/apache/cassandra/db/UnknownColumnException.java
+++ b/src/java/org/apache/cassandra/db/IllegalLegacyColumnException.java
@@ -15,37 +15,27 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.cassandra.db;
 
 import java.nio.ByteBuffer;
 
 import org.apache.cassandra.config.CFMetaData;
-import org.apache.cassandra.db.marshal.UTF8Type;
-import org.apache.cassandra.utils.ByteBufferUtil;
+
+import static org.apache.cassandra.db.LegacyLayout.stringify;
 
 /**
- * Exception thrown when we read a column internally that is unknown. Note that
- * this is an internal exception and is not meant to be user facing.
+ * Exception thrown when we attempt to decode a legacy cellname
+ * and the column name component refers to a primary key column.
  */
-public class UnknownColumnException extends Exception
+public class IllegalLegacyColumnException extends Exception
 {
 public final ByteBuffer columnName;
 
-public UnknownColumnException(CFMetaData metadata, ByteBuffer columnName)
+public IllegalLegacyColumnException(CFMetaData metaData, ByteBuffer 
columnName)
 {
-super(String.format("Unknown column %s in table %s.%s", 
stringify(columnName), metadata.ksName, metadata.cfName));
+super(String.format("Illegal cell name for CQL3 table %s.%s. %s is 
defined as a primary key column",
+metaData.ksName, metaData.cfName, 
stringify(columnName)));
 this.columnName = columnName;
 }
-
-private static String stringify(ByteBuffer name)
-{
-try
-{
-return UTF8Type.instance.getString(name);
-}
-catch (Exception e)
-{
-return ByteBufferUtil.bytesToHex(name);
-}
-}
 }
diff --git a/src/java/org/apache/cassandra/db/LegacyLayout.java 
b/src/java/org/apache/cassandra/db/LegacyLayout.java
index 0044959..cfaa71f 100644
--- a/src/java/org/apache/cassandra/db/LegacyLayout.java
+++ b/src/java/org/apache/cassandra/db/LegacyLayout.java
@@ -23,6 +23,7 @@ import java.io.IOError;
 import java.nio.ByteBuffer;
 import java.security.MessageDigest;
 import java.util.*;
+import java.util.concurrent.TimeUnit;
 
 import