[ https://issues.apache.org/jira/browse/CASSANDRA-1373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12899470#action_12899470 ]
Tyler L. Hobbs commented on CASSANDRA-1373: ------------------------------------------- Patch was not exercised correctly last time. The patch does fix the issue, now. > OrderPreservingPartitioner with type validated indexed columns causes > ClassCastException > ---------------------------------------------------------------------------------------- > > Key: CASSANDRA-1373 > URL: https://issues.apache.org/jira/browse/CASSANDRA-1373 > Project: Cassandra > Issue Type: Bug > Components: Core > Affects Versions: 0.7 beta 1 > Environment: Cassandra Trunk > Reporter: Tyler L. Hobbs > Assignee: Jonathan Ellis > Fix For: 0.7 beta 2 > > Attachments: 1373.txt > > > If OrderPreservingPartitioner is used and you have an indexed column with a > type validator, using batch_mutate to insert column values (like pycassa > does) on the same key and indexed column causes a ClassCastException to be > thrown the *second* time you execute it. That is, the first batch_mutate > succeeds, but the following ones fail. CollatedOrderPreservingPartitioner > seems to avoid this problem. Also, it appears that the row key is being > compared to the column value at some point using the validator's Comparator > class (such as LongType) which is where the actual exception is thrown. > Stack trace below: > {noformat} > java.lang.RuntimeException: java.lang.ClassCastException: java.lang.String > cannot be cast to [B > at > org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:34) > 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:619) > Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to [B > at org.apache.cassandra.db.marshal.LongType.compare(LongType.java:27) > at org.apache.cassandra.dht.LocalToken.compareTo(LocalToken.java:45) > at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:82) > at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:37) > at > java.util.concurrent.ConcurrentSkipListMap.doPut(ConcurrentSkipListMap.java:878) > at > java.util.concurrent.ConcurrentSkipListMap.putIfAbsent(ConcurrentSkipListMap.java:1893) > at org.apache.cassandra.db.Memtable.resolve(Memtable.java:127) > at org.apache.cassandra.db.Memtable.put(Memtable.java:119) > at > org.apache.cassandra.db.ColumnFamilyStore.apply(ColumnFamilyStore.java:508) > at org.apache.cassandra.db.Table.applyCF(Table.java:452) > at org.apache.cassandra.db.Table.apply(Table.java:409) > at org.apache.cassandra.db.RowMutation.apply(RowMutation.java:196) > at > org.apache.cassandra.service.StorageProxy$2.runMayThrow(StorageProxy.java:276) > at > org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30) > ... 3 more > {noformat} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.