[ https://issues.apache.org/jira/browse/CASSANDRA-4326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13600105#comment-13600105 ]
Kristoffer Carlson edited comment on CASSANDRA-4326 at 3/12/13 3:54 PM: ------------------------------------------------------------------------ I added some debug output and it seems the problem is with the limit of the byte buffers: {code} INFO [CompactionExecutor:2] 2013-03-12 15:36:47,507 TimeUUIDType.java (line 75) o1 limit: 4 INFO [CompactionExecutor:2] 2013-03-12 15:36:47,507 TimeUUIDType.java (line 76) o2 limit: 16 {code} Hence out of bounds. So how is the limit of first byte buffer only 4 bytes? was (Author: kcarlson): I added some debug output and it seems the problem is with the limit of the byte buffers: {code} INFO [CompactionExecutor:2] 2013-03-12 15:36:47,507 TimeUUIDType.java (line 75) o1 limit: 4 INFO [CompactionExecutor:2] 2013-03-12 15:36:47,507 TimeUUIDType.java (line 76) o2 limit: 16 {code} Hence out of bounds > IndexOutOfBoundsException on TimeUUIDType.compareTimestampBytes > --------------------------------------------------------------- > > Key: CASSANDRA-4326 > URL: https://issues.apache.org/jira/browse/CASSANDRA-4326 > Project: Cassandra > Issue Type: Bug > Components: Core > Affects Versions: 1.1.1 > Environment: Cassandra 1.1.1 running on CentOS 6.0 64bit. 5 nodes, > mixed hardware. > Reporter: Kristoffer Carlson > > I get the following exception when performing a query on two indexed columns > (both UTF8Type) with TimeUUIDType as the column families key validation class: > {noformat} > java.lang.RuntimeException: java.lang.IndexOutOfBoundsException > at > org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1254) > at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) > at java.lang.Thread.run(Unknown Source) > Caused by: java.lang.IndexOutOfBoundsException > at java.nio.Buffer.checkIndex(Unknown Source) > at java.nio.HeapByteBuffer.get(Unknown Source) > at > org.apache.cassandra.db.marshal.TimeUUIDType.compareTimestampBytes(TimeUUIDType.java:76) > at > org.apache.cassandra.db.marshal.TimeUUIDType.compare(TimeUUIDType.java:65) > at > org.apache.cassandra.db.marshal.TimeUUIDType.compare(TimeUUIDType.java:37) > at org.apache.cassandra.dht.LocalToken.compareTo(LocalToken.java:45) > at > org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:89) > at > org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:38) > at java.util.concurrent.ConcurrentSkipListMap.findPredecessor(Unknown > Source) > at java.util.concurrent.ConcurrentSkipListMap.findNode(Unknown Source) > at java.util.concurrent.ConcurrentSkipListMap.doGet(Unknown Source) > at java.util.concurrent.ConcurrentSkipListMap.get(Unknown Source) > at org.apache.cassandra.db.Memtable.resolve(Memtable.java:235) > at org.apache.cassandra.db.Memtable.put(Memtable.java:156) > at > org.apache.cassandra.db.ColumnFamilyStore.apply(ColumnFamilyStore.java:742) > at > org.apache.cassandra.db.index.keys.KeysIndex.deleteColumn(KeysIndex.java:82) > at > org.apache.cassandra.db.index.SecondaryIndexManager.applyIndexUpdates(SecondaryIndexManager.java:460) > at org.apache.cassandra.db.Table.apply(Table.java:441) > at org.apache.cassandra.db.Table.apply(Table.java:366) > at org.apache.cassandra.db.RowMutation.apply(RowMutation.java:294) > at > org.apache.cassandra.service.StorageProxy$6.runMayThrow(StorageProxy.java:453) > at > org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1250) > ... 3 more > ERROR [Selector-Thread-0] 2012-06-09 13:43:21,878 TNonblockingServer.java > (line 468) Read an invalid frame size of 0. Are you using TFramedTransport on > the client side? > {noformat} > Also, the keys were generated with the following function (which had worked > previously): > {code:borderStyle=solid} > public static UUID convertLegacyIdToUuid(long millis, long userId) > { > long time = millis * 10000 + 0x01b21dd213814000L; > long timeLow = time & 0xffffffffL; > long timeMid = time & 0xffff00000000L; > long timeHi = time & 0xfff000000000000L; > long upperLong = ( timeLow << 32 ) | ( timeMid >> 16 ) | ( 1 << 12 ) | ( > timeHi >> 48 ); > return new UUID(upperLong, userId); > } > {code} -- 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