Return-Path: Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: (qmail 81962 invoked from network); 16 Aug 2010 22:18:41 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 16 Aug 2010 22:18:41 -0000 Received: (qmail 71528 invoked by uid 500); 16 Aug 2010 22:18:41 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 71513 invoked by uid 500); 16 Aug 2010 22:18:41 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 71505 invoked by uid 99); 16 Aug 2010 22:18:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Aug 2010 22:18:41 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Aug 2010 22:18:39 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o7GMIHcB022296 for ; Mon, 16 Aug 2010 22:18:17 GMT Message-ID: <18755262.379041281997097235.JavaMail.jira@thor> Date: Mon, 16 Aug 2010 18:18:17 -0400 (EDT) From: "Jonathan Ellis (JIRA)" To: commits@cassandra.apache.org Subject: [jira] Updated: (CASSANDRA-1373) OrderPreservingPartitioner with type validated indexed columns causes ClassCastException In-Reply-To: <14531358.247611281403756318.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CASSANDRA-1373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jonathan Ellis updated CASSANDRA-1373: -------------------------------------- Assignee: Jonathan Ellis Affects Version/s: 0.7 beta 1 (was: 0.7.0) Priority: Major (was: Minor) > 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.