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

Stefan Miklosovic edited comment on CASSANDRA-18359 at 3/24/23 10:40 AM:
-------------------------------------------------------------------------

PR is here [https://github.com/apache/cassandra/pull/2243]

It also throws NPE if dir is e.g "/data" which makes this more serious. The 
workaround is to set data_file_directories like
{code:java}
data_file_directories:
    - /data/data
{code}
and move all tables data from /data to /data/data.

[~paulo] I think that we should make setting one of dirs to "/" illegal. It 
does not make sense. If we were to scan all dirs in / for snapshots, we would 
basically have to traverse whole filesystem. That is dangerous, time consuming, 
error prone on ownership etc etc.


was (Author: smiklosovic):
PR is here https://github.com/apache/cassandra/pull/2243

It also throws NPE if dir is e.g "/data" which makes this more serious. The 
workaround is to set data_file_directories like

{code}
data_file_directories:
    - /data/data
{code}

and move all tables data from /data to /data/data.



> NullPointerException on SnapshotLoader.loadSnapshots
> ----------------------------------------------------
>
>                 Key: CASSANDRA-18359
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-18359
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Local/Snapshots
>            Reporter: Paulo Motta
>            Assignee: Stefan Miklosovic
>            Priority: Normal
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Node startup fail with on 4.1.1:
> {noformat}
> INFO [main] 2023-03-23 18:13:13,585 MigrationCoordinator.java:257 - Starting 
> migration coordinator and scheduling pulling schema versions every PT1M
> ERROR [main] 2023-03-23 18:13:13,592 CassandraDaemon.java:898 - Exception 
> encountered during startup
> java.lang.NullPointerException: null
>       at 
> org.apache.cassandra.service.snapshot.SnapshotLoader$Visitor.preVisitDirectory(SnapshotLoader.java:106)
>       at 
> org.apache.cassandra.service.snapshot.SnapshotLoader$Visitor.preVisitDirectory(SnapshotLoader.java:77)
>       at java.base/java.nio.file.Files.walkFileTree(Files.java:2732)
>       at 
> org.apache.cassandra.service.snapshot.SnapshotLoader.loadSnapshots(SnapshotLoader.java:162)
>       at 
> org.apache.cassandra.service.snapshot.SnapshotManager.loadSnapshots(SnapshotManager.java:114)
>       at 
> org.apache.cassandra.service.snapshot.SnapshotManager.start(SnapshotManager.java:88)
>       at 
> org.apache.cassandra.service.StorageService.startSnapshotManager(StorageService.java:1050)
>       at 
> org.apache.cassandra.service.StorageService.prepareToJoin(StorageService.java:1043)
>       at 
> org.apache.cassandra.service.StorageService.initServer(StorageService.java:842)
>       at 
> org.apache.cassandra.service.StorageService.initServer(StorageService.java:775)
>       at 
> org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:425)
>       at 
> org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:752)
>       at 
> org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:876)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to