[ https://issues.apache.org/jira/browse/CASSANDRA-11169?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jon Haddad updated CASSANDRA-11169: ----------------------------------- Description: I have a brand new cluster, built off 1944bf507d66b5c103c136319caeb4a9e3767a69 I created a new table with a set<text>, then a SASI index on the set. I tried to insert a row with a set, Cassandra throws an exception and becomes unavailable. {code} cqlsh> create KEYSPACE test WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}; cqlsh> use test; cqlsh:test> create table a (id int PRIMARY KEY , s set<text> ); cqlsh:test> create CUSTOM INDEX on a(s) USING 'org.apache.cassandra.index.sasi.SASIIndex'; cqlsh:test> insert into a (id, s) values (1, {"jon", "haddad"}); SyntaxException: <ErrorMessage code=2000 [Syntax error in CQL query] message="line 1:39 no viable alternative at input ',' (... s) values (1, [{]"jon",...)"> cqlsh:test> insert into a (id, s) values (1, {'jon', 'haddad'}); WriteTimeout: code=1100 [Coordinator node timed out waiting for replica nodes' responses] message="Operation timed out - received only 0 responses." info={'received_responses': 0, 'required_responses': 1, 'consistency': 'ONE'} {code} Cassandra stacktrace: {code} java.lang.AssertionError: null at org.apache.cassandra.db.rows.BTreeRow.getCell(BTreeRow.java:212) ~[main/:na] at org.apache.cassandra.index.sasi.conf.ColumnIndex.getValueOf(ColumnIndex.java:194) ~[main/:na] at org.apache.cassandra.index.sasi.conf.ColumnIndex.index(ColumnIndex.java:95) ~[main/:na] at org.apache.cassandra.index.sasi.SASIIndex$1.insertRow(SASIIndex.java:247) ~[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$RowUpdater.apply(AtomicBTreePartition.java:295) ~[main/:na] at org.apache.cassandra.utils.btree.BTree.buildInternal(BTree.java:136) ~[main/:na] at org.apache.cassandra.utils.btree.BTree.build(BTree.java:118) ~[main/:na] at org.apache.cassandra.utils.btree.BTree.update(BTree.java:177) ~[main/:na] at org.apache.cassandra.db.partitions.AtomicBTreePartition.addAllWithSizeDelta(AtomicBTreePartition.java:156) ~[main/:na] at org.apache.cassandra.db.Memtable.put(Memtable.java:244) ~[main/:na] at org.apache.cassandra.db.ColumnFamilyStore.apply(ColumnFamilyStore.java:1216) ~[main/:na] at org.apache.cassandra.db.Keyspace.apply(Keyspace.java:531) ~[main/:na] at org.apache.cassandra.db.Keyspace.apply(Keyspace.java:399) ~[main/:na] at org.apache.cassandra.db.Mutation.applyFuture(Mutation.java:202) ~[main/:na] at org.apache.cassandra.db.Mutation.apply(Mutation.java:214) ~[main/:na] at org.apache.cassandra.db.Mutation.apply(Mutation.java:228) ~[main/:na] at org.apache.cassandra.service.StorageProxy$$Lambda$201/413275033.run(Unknown Source) ~[na:na] at org.apache.cassandra.service.StorageProxy$8.runMayThrow(StorageProxy.java:1343) ~[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_45] at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:164) ~[main/:na] at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$LocalSessionFutureTask.run(AbstractLocalAwareExecutorService.java:136) [main/:na] at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:105) [main/:na] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45] {code} was: I have a brand new cluster, built off 1944bf507d66b5c103c136319caeb4a9e3767a69 I created a new table with a set<text>, then a SASI index on the set. I tried to insert a row with a set, Cassandra throws an exception and becomes unavailable. {code} cqlsh> create KEYSPACE test WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}; cqlsh> use test; cqlsh:test> create table a (id int PRIMARY KEY , s set<text> ); cqlsh:test> cqlsh:test> create CUSTOM INDEX on a(s) USING ' <pgStringLiteral> <quotedStringLiteral> cqlsh:test> create CUSTOM INDEX on a(s) USING ' <pgStringLiteral> <quotedStringLiteral> cqlsh:test> create CUSTOM INDEX on a(s) USING 'org.apache.cassandra.index.sasi.SASIIndex'; cqlsh:test> insert into a (id, s) values (1, {"jon", "haddad"}); SyntaxException: <ErrorMessage code=2000 [Syntax error in CQL query] message="line 1:39 no viable alternative at input ',' (... s) values (1, [{]"jon",...)"> cqlsh:test> insert into a (id, s) values (1, {'jon', 'haddad'}); WriteTimeout: code=1100 [Coordinator node timed out waiting for replica nodes' responses] message="Operation timed out - received only 0 responses." info={'received_responses': 0, 'required_responses': 1, 'consistency': 'ONE'} {code} Cassandra stacktrace: {code} java.lang.AssertionError: null at org.apache.cassandra.db.rows.BTreeRow.getCell(BTreeRow.java:212) ~[main/:na] at org.apache.cassandra.index.sasi.conf.ColumnIndex.getValueOf(ColumnIndex.java:194) ~[main/:na] at org.apache.cassandra.index.sasi.conf.ColumnIndex.index(ColumnIndex.java:95) ~[main/:na] at org.apache.cassandra.index.sasi.SASIIndex$1.insertRow(SASIIndex.java:247) ~[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$RowUpdater.apply(AtomicBTreePartition.java:295) ~[main/:na] at org.apache.cassandra.utils.btree.BTree.buildInternal(BTree.java:136) ~[main/:na] at org.apache.cassandra.utils.btree.BTree.build(BTree.java:118) ~[main/:na] at org.apache.cassandra.utils.btree.BTree.update(BTree.java:177) ~[main/:na] at org.apache.cassandra.db.partitions.AtomicBTreePartition.addAllWithSizeDelta(AtomicBTreePartition.java:156) ~[main/:na] at org.apache.cassandra.db.Memtable.put(Memtable.java:244) ~[main/:na] at org.apache.cassandra.db.ColumnFamilyStore.apply(ColumnFamilyStore.java:1216) ~[main/:na] at org.apache.cassandra.db.Keyspace.apply(Keyspace.java:531) ~[main/:na] at org.apache.cassandra.db.Keyspace.apply(Keyspace.java:399) ~[main/:na] at org.apache.cassandra.db.Mutation.applyFuture(Mutation.java:202) ~[main/:na] at org.apache.cassandra.db.Mutation.apply(Mutation.java:214) ~[main/:na] at org.apache.cassandra.db.Mutation.apply(Mutation.java:228) ~[main/:na] at org.apache.cassandra.service.StorageProxy$$Lambda$201/413275033.run(Unknown Source) ~[na:na] at org.apache.cassandra.service.StorageProxy$8.runMayThrow(StorageProxy.java:1343) ~[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_45] at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:164) ~[main/:na] at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$LocalSessionFutureTask.run(AbstractLocalAwareExecutorService.java:136) [main/:na] at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:105) [main/:na] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45] {code} > [sasi] exception thrown when trying to index row with index on set<text> > ------------------------------------------------------------------------ > > Key: CASSANDRA-11169 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11169 > Project: Cassandra > Issue Type: Bug > Reporter: Jon Haddad > > I have a brand new cluster, built off 1944bf507d66b5c103c136319caeb4a9e3767a69 > I created a new table with a set<text>, then a SASI index on the set. I > tried to insert a row with a set, Cassandra throws an exception and becomes > unavailable. > {code} > cqlsh> create KEYSPACE test WITH replication = {'class': 'SimpleStrategy', > 'replication_factor': 1}; > cqlsh> use test; > cqlsh:test> create table a (id int PRIMARY KEY , s set<text> ); > cqlsh:test> create CUSTOM INDEX on a(s) USING > 'org.apache.cassandra.index.sasi.SASIIndex'; > cqlsh:test> insert into a (id, s) values (1, {"jon", "haddad"}); > SyntaxException: <ErrorMessage code=2000 [Syntax error in CQL query] > message="line 1:39 no viable alternative at input ',' (... s) values (1, > [{]"jon",...)"> > cqlsh:test> insert into a (id, s) values (1, {'jon', 'haddad'}); > WriteTimeout: code=1100 [Coordinator node timed out waiting for replica > nodes' responses] message="Operation timed out - received only 0 responses." > info={'received_responses': 0, 'required_responses': 1, 'consistency': 'ONE'} > {code} > Cassandra stacktrace: > {code} > java.lang.AssertionError: null > at org.apache.cassandra.db.rows.BTreeRow.getCell(BTreeRow.java:212) > ~[main/:na] > at > org.apache.cassandra.index.sasi.conf.ColumnIndex.getValueOf(ColumnIndex.java:194) > ~[main/:na] > at > org.apache.cassandra.index.sasi.conf.ColumnIndex.index(ColumnIndex.java:95) > ~[main/:na] > at > org.apache.cassandra.index.sasi.SASIIndex$1.insertRow(SASIIndex.java:247) > ~[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$RowUpdater.apply(AtomicBTreePartition.java:295) > ~[main/:na] > at org.apache.cassandra.utils.btree.BTree.buildInternal(BTree.java:136) > ~[main/:na] > at org.apache.cassandra.utils.btree.BTree.build(BTree.java:118) > ~[main/:na] > at org.apache.cassandra.utils.btree.BTree.update(BTree.java:177) > ~[main/:na] > at > org.apache.cassandra.db.partitions.AtomicBTreePartition.addAllWithSizeDelta(AtomicBTreePartition.java:156) > ~[main/:na] > at org.apache.cassandra.db.Memtable.put(Memtable.java:244) ~[main/:na] > at > org.apache.cassandra.db.ColumnFamilyStore.apply(ColumnFamilyStore.java:1216) > ~[main/:na] > at org.apache.cassandra.db.Keyspace.apply(Keyspace.java:531) ~[main/:na] > at org.apache.cassandra.db.Keyspace.apply(Keyspace.java:399) ~[main/:na] > at org.apache.cassandra.db.Mutation.applyFuture(Mutation.java:202) > ~[main/:na] > at org.apache.cassandra.db.Mutation.apply(Mutation.java:214) ~[main/:na] > at org.apache.cassandra.db.Mutation.apply(Mutation.java:228) ~[main/:na] > at > org.apache.cassandra.service.StorageProxy$$Lambda$201/413275033.run(Unknown > Source) ~[na:na] > at > org.apache.cassandra.service.StorageProxy$8.runMayThrow(StorageProxy.java:1343) > ~[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_45] > at > org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:164) > ~[main/:na] > at > org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$LocalSessionFutureTask.run(AbstractLocalAwareExecutorService.java:136) > [main/:na] > at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:105) > [main/:na] > at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45] > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)