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

Jeremiah Jordan updated CASSANDRA-5185:
---------------------------------------

    Summary: symlinks to data directories are broken in 1.2.0  (was: symlinks 
to data directories is broken in 1.2.0)
    
> symlinks to data directories are broken in 1.2.0
> ------------------------------------------------
>
>                 Key: CASSANDRA-5185
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5185
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2.0
>            Reporter: Jeremiah Jordan
>         Attachments: 5185-errors.log
>
>
> symlinks to data directories is broken in 1.2.0
> {noformat}
> cd ~
> tar xzf apache-cassandra-1.2.0-bin.tar.gz
> cd apache-cassandra-1.2.0/conf
> vim cassandra.yaml
> #set data/commitlog/savecache dirs to
> #~/apache-cassandra-1.2.0/var/...
> cd ../bin
> # start once to make folders
> ./cassandra -f
> #cntrl-c
> cd ..
> mkdir var/lib/cassandra2
> mv var/lib/cassandra/data/system var/lib/cassandra2/system
> cd var/lib/cassandra/data
> ln -s ../../cassandra2/system .
> cd ~/apache-cassandra-1.2.0/bin/
> cassandra -f
> #get lots of assertion errors see attached log file
> {noformat}
> {noformat}
>  INFO 21:59:44,883 Enqueuing flush of Memtable-local@1578022692(52/52 
> serialized/live bytes, 2 ops)
>  INFO 21:59:44,890 Writing Memtable-local@1578022692(52/52 serialized/live 
> bytes, 2 ops)
> ERROR 21:59:44,892 Exception in thread Thread[FlushWriter:1,5,main]
> java.lang.AssertionError
>       at 
> org.apache.cassandra.io.sstable.Descriptor.<init>(Descriptor.java:190)
>       at 
> org.apache.cassandra.db.ColumnFamilyStore.getTempSSTablePath(ColumnFamilyStore.java:593)
>       at 
> org.apache.cassandra.db.ColumnFamilyStore.getTempSSTablePath(ColumnFamilyStore.java:588)
>       at 
> org.apache.cassandra.db.Memtable$FlushRunnable.writeSortedContents(Memtable.java:428)
>       at 
> org.apache.cassandra.db.Memtable$FlushRunnable.runWith(Memtable.java:417)
>       at 
> org.apache.cassandra.io.util.DiskAwareRunnable.runMayThrow(DiskAwareRunnable.java:48)
>       at 
> org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>       at java.lang.Thread.run(Thread.java:662)
> {noformat}
> I traced it back some, I think it is coming from:
> {noformat}
> org.apache.cassandra.db.Memtable$FlushRunnable.writeSortedContents(Memtable.java:428)
> which calls: cfs.directories.getLocationForDisk(dataDirectory)
>     public File getLocationForDisk(File dataDirectory)
>     {
>         for (File dir : sstableDirectories)
>         {
>             if 
> (FileUtils.getCanonicalPath(dir).startsWith(FileUtils.getCanonicalPath(dataDirectory)))
>                 return dir;
>         }
>         return null;
>     }
> {noformat}
> My guess is that the FileUtils.getCanonicalPath calls aren't matching because 
> of the symlinks.  So null is being returned there.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to