Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
None
-
None
-
Normal
Description
My test code:
int max = 5000;
for (int a = 0; a < max; a++) {
System.out.println(a);
client.insert("Table1", "k1:" + a, "Super1:x:x", new byte[]
, 0, false);
}
client.get_key_range("Table1", "k1:0", "k1:1000", 1000);
Produces in the logs:
ERROR [ROW-READ-STAGE:9] 2009-05-07 23:04:56,609 CassandraDaemon.java (line 61) Fatal exception in thread Thread[ROW-READ-STAGE:9,5,main]
java.lang.RuntimeException: corrupt sstable
at org.apache.cassandra.db.FileStruct.seekTo(FileStruct.java:107)
at org.apache.cassandra.db.Table.getKeyRange(Table.java:905)
at org.apache.cassandra.service.RangeVerbHandler.doVerb(RangeVerbHandler.java:23)
at org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:46)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.EOFException
at java.io.RandomAccessFile.readUnsignedShort(Unknown Source)
at java.io.DataInputStream.readUTF(Unknown Source)
at java.io.RandomAccessFile.readUTF(Unknown Source)
at org.apache.cassandra.io.SequenceFile$AbstractReader.getPositionFromBlockIndex(SequenceFile.java:562)
at org.apache.cassandra.db.FileStruct.seekTo(FileStruct.java:86)
... 6 more
ERROR [pool-1-thread-2] 2009-05-07 23:05:01,593 Cassandra.java (line 1187) Internal error processing get_key_range
java.lang.RuntimeException: error reading keyrange RangeCommand(table='Table1', startWith='k1:0', stopAt='k1:1000', maxResults=1000)
at org.apache.cassandra.service.StorageProxy.getKeyRange(StorageProxy.java:682)
at org.apache.cassandra.service.CassandraServer.get_key_range(CassandraServer.java:511)
at org.apache.cassandra.service.Cassandra$Processor$get_key_range.process(Cassandra.java:1183)
at org.apache.cassandra.service.Cassandra$Processor.process(Cassandra.java:805)
at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:252)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.util.concurrent.TimeoutException: Operation timed out.
at org.apache.cassandra.net.AsyncResult.get(AsyncResult.java:95)
at org.apache.cassandra.service.StorageProxy.getKeyRange(StorageProxy.java:677)
... 7 more