cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Dusbabek (JIRA)" <j...@apache.org>
Subject [jira] Updated: (CASSANDRA-1904) Crash during startup: SSTable doesn't handle corrupt (empty) tmp files
Date Wed, 29 Dec 2010 23:27:46 GMT

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

Gary Dusbabek updated CASSANDRA-1904:
-------------------------------------

    Attachment: v1-0001-CFS.scrubDataDirectories-to-include-index-files.txt

> Crash during startup: SSTable doesn't handle corrupt (empty) tmp files
> ----------------------------------------------------------------------
>
>                 Key: CASSANDRA-1904
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1904
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 0.7.0 rc 2
>            Reporter: Timo Nentwig
>            Assignee: Gary Dusbabek
>             Fix For: 0.7.1
>
>         Attachments: v1-0001-CFS.scrubDataDirectories-to-include-index-files.txt
>
>
> Applies to 0.7rc3 as well, but not yet selectable in Jira.
> cassandra stumbles upons empty Data files and crashes during startup rather than ignoring
these files:
> java.lang.ArithmeticException: / by zero
> 	at org.apache.cassandra.io.sstable.SSTable.estimateRowsFromIndex(SSTable.java:233)
> 	at org.apache.cassandra.io.sstable.SSTableReader.load(SSTableReader.java:284)
> 	at org.apache.cassandra.io.sstable.SSTableReader.open(SSTableReader.java:200)
> 	at org.apache.cassandra.db.ColumnFamilyStore.<init>(ColumnFamilyStore.java:225)
> 	at org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:448)
> 	at org.apache.cassandra.db.ColumnFamilyStore.addIndex(ColumnFamilyStore.java:305)
> 	at org.apache.cassandra.db.ColumnFamilyStore.<init>(ColumnFamilyStore.java:246)
> 	at org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:448)
> 	at org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:436)
> 	at org.apache.cassandra.db.Table.initCf(Table.java:360)
> 	at org.apache.cassandra.db.Table.<init>(Table.java:290)
> 	at org.apache.cassandra.db.Table.open(Table.java:107)
> 	at org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:138)
> 	at org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:55)
> 	at org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraDaemon.java:216)
> 	at org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:134)
> Exception encountered during startup.
> java.lang.ArithmeticException: / by zero
> 	at org.apache.cassandra.io.sstable.SSTable.estimateRowsFromIndex(SSTable.java:233)
> 	at org.apache.cassandra.io.sstable.SSTableReader.load(SSTableReader.java:284)
> 	at org.apache.cassandra.io.sstable.SSTableReader.open(SSTableReader.java:200)
> 	at org.apache.cassandra.db.ColumnFamilyStore.<init>(ColumnFamilyStore.java:225)
> 	at org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:448)
> 	at org.apache.cassandra.db.ColumnFamilyStore.addIndex(ColumnFamilyStore.java:305)
> 	at org.apache.cassandra.db.ColumnFamilyStore.<init>(ColumnFamilyStore.java:246)
> 	at org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:448)
> 	at org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:436)
> 	at org.apache.cassandra.db.Table.initCf(Table.java:360)
> 	at org.apache.cassandra.db.Table.<init>(Table.java:290)
> 	at org.apache.cassandra.db.Table.open(Table.java:107)
> 	at org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:138)
> 	at org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:55)
> 	at org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraDaemon.java:216)
> 	at org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:134)
> The empty Data/Index tmp files were in my case created and left over when I attempted
to create a secondary index at runtime which crashed the JVM due to OOM.
> SSTable handles IOExceptions so it should be an easy fix: in SSTable.estimateRowsFromIndex()
just check for ifile.length() ==ifile.getFilePointer()==keys==0 and throw an IOException.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message