cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Yaskevich (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-12378) Creating SASI index on clustering column in presence of static column breaks writes
Date Thu, 04 Aug 2016 08:58:20 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-12378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15407446#comment-15407446
] 

Pavel Yaskevich commented on CASSANDRA-12378:
---------------------------------------------

Sounds great, [~ifesdjeen]!

> Creating SASI index on clustering column in presence of static column breaks writes
> -----------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-12378
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12378
>             Project: Cassandra
>          Issue Type: Bug
>          Components: sasi
>            Reporter: Alex Petrov
>            Priority: Critical
>
> Steps to reproduce:
> {code}
> String simpleTable = "simple_table";
> QueryProcessor.executeOnceInternal(String.format("CREATE TABLE IF NOT EXISTS %s.%s (pk
int, ck1 int, ck2 int, s1 int static, reg1 int, PRIMARY KEY (pk, ck1));", KS_NAME, simpleTable));
> QueryProcessor.executeOnceInternal(String.format("CREATE CUSTOM INDEX ON %s.%s (ck1)
USING 'org.apache.cassandra.index.sasi.SASIIndex';", KS_NAME, simpleTable));
> QueryProcessor.executeOnceInternal(String.format("INSERT INTO %s.%s (pk, ck1, ck2, s1,
reg1) VALUES (1,1,1,1,1);", KS_NAME, simpleTable));
> {code}
> {code}
> ERROR [MutationStage-2] 2016-08-04 09:59:08,054 StorageProxy.java:1351 - Failed to apply
mutation locally : {}
> java.lang.RuntimeException: 0 for ks: test, table: sasi
>         at org.apache.cassandra.db.ColumnFamilyStore.apply(ColumnFamilyStore.java:1371)
~[main/:na]
>         at org.apache.cassandra.db.Keyspace.apply(Keyspace.java:555) ~[main/:na]
>         at org.apache.cassandra.db.Keyspace.apply(Keyspace.java:425) ~[main/:na]
>         at org.apache.cassandra.db.Mutation.applyFuture(Mutation.java:215) ~[main/:na]
>         at org.apache.cassandra.db.Mutation.apply(Mutation.java:227) ~[main/:na]
>         at org.apache.cassandra.db.Mutation.apply(Mutation.java:241) ~[main/:na]
>         at org.apache.cassandra.service.StorageProxy$8.runMayThrow(StorageProxy.java:1345)
~[main/:na]
>         at org.apache.cassandra.service.StorageProxy$LocalMutationRunnable.run(StorageProxy.java:2520)
[main/:na]
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_91]
>         at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:162)
[main/:na]
>         at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$LocalSessionFutureTask.run(AbstractLocalAwareExecutorService.java:134)
[main/:na]
>         at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:109) [main/:na]
>         at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91]
> Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
>         at org.apache.cassandra.db.AbstractBufferClusteringPrefix.get(AbstractBufferClusteringPrefix.java:55)
~[main/:na]
>         at org.apache.cassandra.index.sasi.conf.ColumnIndex.getValueOf(ColumnIndex.java:235)
~[main/:na]
>         at org.apache.cassandra.index.sasi.conf.ColumnIndex.index(ColumnIndex.java:104)
~[main/:na]
>         at org.apache.cassandra.index.sasi.SASIIndex$1.insertRow(SASIIndex.java:254)
~[main/:na]
>         at org.apache.cassandra.index.SecondaryIndexManager$WriteTimeTransaction.onInserted(SecondaryIndexManager.java:808)
~[main/:na]
>         at org.apache.cassandra.db.partitions.AtomicBTreePartition$RowUpdater.apply(AtomicBTreePartition.java:335)
~[main/:na]
>         at org.apache.cassandra.db.partitions.AtomicBTreePartition.addAllWithSizeDelta(AtomicBTreePartition.java:155)
~[main/:na]
>         at org.apache.cassandra.db.Memtable.put(Memtable.java:251) ~[main/:na]
>         at org.apache.cassandra.db.ColumnFamilyStore.apply(ColumnFamilyStore.java:1358)
~[main/:na]
>         ... 12 common frames omitted
> {code}
> I would say this issue is critical, as if it occurs, the node will crash on commitlog
replay, too (if it was restarted for unrelated reason). 
> However, the fix is relatively simple: check for static clustering in {{ColumnIndex}}.

> cc [~xedin]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message