Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Invalid
-
None
-
None
-
None
-
Normal
Description
We just migrated one of our dev cluster to 1.2.6 and got this Exception for an SSTable after restarting nodes :
2013-06-26 11:18:46,316 [SSTableBatchOpen:1] ERROR CassandraDaemon - Exception in thread Thread[SSTableBatchOpen:1,5,main]
java.lang.AssertionError
at org.apache.cassandra.utils.ByteBufferUtil.readBytes(ByteBufferUtil.java:401)
at org.apache.cassandra.io.sstable.IndexSummary$IndexSummarySerializer.deserialize(IndexSummary.java:124)
The assertion :
https://github.com/apache/cassandra/blob/9851b73fc3bbaf61ec80b54c64483bcf56aaa396/src/java/org/apache/cassandra/utils/ByteBufferUtil.java#L401
should probably be "assert length >= 0;"
In a broader context, ByteBufferUtil.readBytes(...) could still be used to read 0 bytes without throwing an assertion
Note : This happens because the SSTable contains an empty rowkey. We're using StorageProxy directly, thus skipping validation, but it appears that other people hit this problem too : http://www.mail-archive.com/user@cassandra.apache.org/msg30123.html
Also note that data contained in this SSTable is not available because the assertion error is not catched.