[
https://issues.apache.org/jira/browse/CASSANDRA-13389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15946441#comment-15946441
]
Stefania commented on CASSANDRA-13389:
--------------------------------------
The patch replaces {{File.listFiles()}} with directory streams. The 3.0 patch
applies cleanly to 3.11. We don't require any patch for trunk since the upgrade
code is no longer applicable for 4.0. CI pending.
||3.0||3.11||
|[patch|https://github.com/stef1927/cassandra/tree/13389-3.0]|[patch|https://github.com/stef1927/cassandra/tree/13389-3.11]|
|[testall|http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-13389-3.0-testall/]|[testall|http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-13389-3.11-testall/]|
|[dtest|http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-13389-3.0-dtest/]|[dtest|http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-13389-3.11-dtest/]|
> Possible NPE on upgrade to 3.0/3.X in case of IO errors
> --------------------------------------------------------
>
> Key: CASSANDRA-13389
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13389
> Project: Cassandra
> Issue Type: Bug
> Components: Lifecycle
> Reporter: Stefania
> Assignee: Stefania
> Fix For: 3.0.x, 3.11.x
>
>
> There is a NPE on upgrade to 3.0/3.X if a data directory contains directories
> that generate IO errors, for example if the cassandra process does not have
> permission to read them.
> Here is the exception:
> {code}
> ERROR [main] 2017-03-06 16:41:30,678 CassandraDaemon.java:710 - Exception
> encountered during startup
> java.lang.NullPointerException: null
> at org.apache.cassandra.io.util.FileUtils.delete(FileUtils.java:372)
> ~[cassandra-all-3.0.11.1564.jar:3.0.11.1564]
> at
> org.apache.cassandra.db.SystemKeyspace.migrateDataDirs(SystemKeyspace.java:1359)
> ~[cassandra-all-3.0.11.1564.jar:3.0.11.1564]
> at
> org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:190)
> ~[cassandra-all-3.0.11.1564.jar:3.0.11.1564]
> {code}
> This is caused by {{File.listFiles()}}, which returns null in case of an IO
> error.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)