cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kishan Karunaratne (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-13174) Indexing is allowed on Duration type when it should not be
Date Wed, 01 Feb 2017 01:28:51 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-13174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Kishan Karunaratne updated CASSANDRA-13174:
-------------------------------------------
    Description: 
Looks like secondary indexing is allowed on duration type columns. Since comparisons are not
possible for the duration type, indexing on it also should be invalid.

1) 
{noformat}
CREATE TABLE duration_table (k int PRIMARY KEY, d duration);
INSERT INTO duration_table (k, d) VALUES (0, 1s);
SELECT * from duration_table WHERE d=1s ALLOW FILTERING;
{noformat}

The above throws an error: 
{noformat}
WARN  [ReadStage-2] 2017-01-31 17:09:57,821 AbstractLocalAwareExecutorService.java:167 - Uncaught
exception on thread Thread[ReadStage-2,10,main]: {}
java.lang.RuntimeException: java.lang.UnsupportedOperationException
	at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2591)
~[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.UnsupportedOperationException: null
	at org.apache.cassandra.db.marshal.AbstractType.compareCustom(AbstractType.java:174) ~[main/:na]
	at org.apache.cassandra.db.marshal.AbstractType.compare(AbstractType.java:160) ~[main/:na]
	at org.apache.cassandra.db.marshal.AbstractType.compareForCQL(AbstractType.java:204) ~[main/:na]
	at org.apache.cassandra.cql3.Operator.isSatisfiedBy(Operator.java:201) ~[main/:na]
	at org.apache.cassandra.db.filter.RowFilter$SimpleExpression.isSatisfiedBy(RowFilter.java:719)
~[main/:na]
	at org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToRow(RowFilter.java:324)
~[main/:na]
	at org.apache.cassandra.db.transform.BaseRows.applyOne(BaseRows.java:120) ~[main/:na]
	at org.apache.cassandra.db.transform.BaseRows.add(BaseRows.java:110) ~[main/:na]
	at org.apache.cassandra.db.transform.UnfilteredRows.add(UnfilteredRows.java:44) ~[main/:na]
	at org.apache.cassandra.db.transform.Transformation.add(Transformation.java:174) ~[main/:na]
	at org.apache.cassandra.db.transform.Transformation.apply(Transformation.java:140) ~[main/:na]
	at org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:307)
~[main/:na]
	at org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:292)
~[main/:na]
	at org.apache.cassandra.db.transform.BasePartitions.hasNext(BasePartitions.java:96) ~[main/:na]
	at org.apache.cassandra.db.partitions.UnfilteredPartitionIterators$Serializer.serialize(UnfilteredPartitionIterators.java:310)
~[main/:na]
	at org.apache.cassandra.db.ReadResponse$LocalDataResponse.build(ReadResponse.java:145) ~[main/:na]
	at org.apache.cassandra.db.ReadResponse$LocalDataResponse.<init>(ReadResponse.java:138)
~[main/:na]
	at org.apache.cassandra.db.ReadResponse$LocalDataResponse.<init>(ReadResponse.java:134)
~[main/:na]
	at org.apache.cassandra.db.ReadResponse.createDataResponse(ReadResponse.java:76) ~[main/:na]
	at org.apache.cassandra.db.ReadCommand.createResponse(ReadCommand.java:333) ~[main/:na]
	at org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:1884)
~[main/:na]
	at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2587)
~[main/:na]
	... 5 common frames omitted
{noformat}

2)
Similarly, if an index is created on the duration column:
{noformat}
CREATE INDEX d_index ON simplex.duration_table (d);
SELECT * from duration_table WHERE d=1s;
{noformat}

results in:
{noformat}
WARN  [ReadStage-2] 2017-01-31 17:12:00,623 AbstractLocalAwareExecutorService.java:167 - Uncaught
exception on thread Thread[ReadStage-2,10,main]: {}
java.lang.RuntimeException: org.apache.cassandra.index.IndexNotAvailableException: The secondary
index 'd_index' is not yet available
	at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2591)
~[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: org.apache.cassandra.index.IndexNotAvailableException: The secondary index 'd_index'
is not yet available
	at org.apache.cassandra.db.ReadCommand.executeLocally(ReadCommand.java:400) ~[main/:na]
	at org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:1882)
~[main/:na]
	at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2587)
~[main/:na]
	... 5 common frames omitted
{noformat}

3) 
Finally, no further updates can be made to the table once the index has been created. Attempting
to modify or insert a new row with a non-null value for "d" results in an error:
{noformat}
ERROR [MutationStage-2] 2017-01-31 17:13:33,106 StorageProxy.java:1422 - Failed to apply mutation
locally : {}
java.lang.RuntimeException: null for ks: simplex, table: duration_table.d_index for ks: simplex,
table: duration_table
	at org.apache.cassandra.db.ColumnFamilyStore.apply(ColumnFamilyStore.java:1334) ~[main/:na]
	at org.apache.cassandra.db.Keyspace.applyInternal(Keyspace.java:618) ~[main/:na]
	at org.apache.cassandra.db.Keyspace.apply(Keyspace.java:462) ~[main/:na]
	at org.apache.cassandra.db.Mutation.apply(Mutation.java:227) ~[main/:na]
	at org.apache.cassandra.db.Mutation.apply(Mutation.java:232) ~[main/:na]
	at org.apache.cassandra.db.Mutation.apply(Mutation.java:241) ~[main/:na]
	at org.apache.cassandra.service.StorageProxy$8.runMayThrow(StorageProxy.java:1416) ~[main/:na]
	at org.apache.cassandra.service.StorageProxy$LocalMutationRunnable.run(StorageProxy.java:2640)
[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.RuntimeException: null for ks: simplex, table: duration_table.d_index
	at org.apache.cassandra.db.ColumnFamilyStore.apply(ColumnFamilyStore.java:1334) ~[main/:na]
	at org.apache.cassandra.index.internal.CassandraIndex.insert(CassandraIndex.java:531) ~[main/:na]
	at org.apache.cassandra.index.internal.CassandraIndex.access$100(CassandraIndex.java:72)
~[main/:na]
	at org.apache.cassandra.index.internal.CassandraIndex$1.indexCell(CassandraIndex.java:444)
~[main/:na]
	at org.apache.cassandra.index.internal.CassandraIndex$1.insertRow(CassandraIndex.java:388)
~[main/:na]
	at org.apache.cassandra.index.SecondaryIndexManager$WriteTimeTransaction.onInserted(SecondaryIndexManager.java:914)
~[main/:na]
	at org.apache.cassandra.db.partitions.AtomicBTreePartition$RowUpdater.apply(AtomicBTreePartition.java:333)
~[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:139) ~[main/:na]
	at org.apache.cassandra.utils.btree.BTree.build(BTree.java:121) ~[main/:na]
	at org.apache.cassandra.utils.btree.BTree.update(BTree.java:178) ~[main/:na]
	at org.apache.cassandra.db.partitions.AtomicBTreePartition.addAllWithSizeDelta(AtomicBTreePartition.java:156)
~[main/:na]
	at org.apache.cassandra.db.Memtable.put(Memtable.java:284) ~[main/:na]
	at org.apache.cassandra.db.ColumnFamilyStore.apply(ColumnFamilyStore.java:1316) ~[main/:na]
	... 12 common frames omitted
Caused by: java.lang.UnsupportedOperationException: null
	at org.apache.cassandra.db.marshal.AbstractType.compareCustom(AbstractType.java:174) ~[main/:na]
	at org.apache.cassandra.db.marshal.AbstractType.compare(AbstractType.java:160) ~[main/:na]
	at org.apache.cassandra.dht.LocalPartitioner$LocalToken.compareTo(LocalPartitioner.java:156)
~[main/:na]
	at org.apache.cassandra.dht.LocalPartitioner$LocalToken.compareTo(LocalPartitioner.java:132)
~[main/:na]
	at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:85) ~[main/:na]
	at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:39) ~[main/:na]
	at java.util.concurrent.ConcurrentSkipListMap.cpr(ConcurrentSkipListMap.java:655) ~[na:1.8.0_91]
	at java.util.concurrent.ConcurrentSkipListMap.findPredecessor(ConcurrentSkipListMap.java:682)
~[na:1.8.0_91]
	at java.util.concurrent.ConcurrentSkipListMap.doGet(ConcurrentSkipListMap.java:781) ~[na:1.8.0_91]
	at java.util.concurrent.ConcurrentSkipListMap.get(ConcurrentSkipListMap.java:1546) ~[na:1.8.0_91]
	at org.apache.cassandra.db.Memtable.put(Memtable.java:264) ~[main/:na]
	at org.apache.cassandra.db.ColumnFamilyStore.apply(ColumnFamilyStore.java:1316) ~[main/:na]
	... 25 common frames omitted
{noformat}

  was:
Looks like secondary indexing is allowed on duration type columns. Since comparisons are not
possible for the duration type, indexing on it also should be invalid.

1) 
{noformat}
CREATE TABLE simplex.duration_table (k int PRIMARY KEY, d duration);
INSERT INTO duration_table (k, d) VALUES (0, 1s);
SELECT * from duration_table WHERE d=1s ALLOW FILTERING;
{noformat}

The above throws an error: 
{noformat}
WARN  [ReadStage-2] 2017-01-31 17:09:57,821 AbstractLocalAwareExecutorService.java:167 - Uncaught
exception on thread Thread[ReadStage-2,10,main]: {}
java.lang.RuntimeException: java.lang.UnsupportedOperationException
	at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2591)
~[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.UnsupportedOperationException: null
	at org.apache.cassandra.db.marshal.AbstractType.compareCustom(AbstractType.java:174) ~[main/:na]
	at org.apache.cassandra.db.marshal.AbstractType.compare(AbstractType.java:160) ~[main/:na]
	at org.apache.cassandra.db.marshal.AbstractType.compareForCQL(AbstractType.java:204) ~[main/:na]
	at org.apache.cassandra.cql3.Operator.isSatisfiedBy(Operator.java:201) ~[main/:na]
	at org.apache.cassandra.db.filter.RowFilter$SimpleExpression.isSatisfiedBy(RowFilter.java:719)
~[main/:na]
	at org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToRow(RowFilter.java:324)
~[main/:na]
	at org.apache.cassandra.db.transform.BaseRows.applyOne(BaseRows.java:120) ~[main/:na]
	at org.apache.cassandra.db.transform.BaseRows.add(BaseRows.java:110) ~[main/:na]
	at org.apache.cassandra.db.transform.UnfilteredRows.add(UnfilteredRows.java:44) ~[main/:na]
	at org.apache.cassandra.db.transform.Transformation.add(Transformation.java:174) ~[main/:na]
	at org.apache.cassandra.db.transform.Transformation.apply(Transformation.java:140) ~[main/:na]
	at org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:307)
~[main/:na]
	at org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:292)
~[main/:na]
	at org.apache.cassandra.db.transform.BasePartitions.hasNext(BasePartitions.java:96) ~[main/:na]
	at org.apache.cassandra.db.partitions.UnfilteredPartitionIterators$Serializer.serialize(UnfilteredPartitionIterators.java:310)
~[main/:na]
	at org.apache.cassandra.db.ReadResponse$LocalDataResponse.build(ReadResponse.java:145) ~[main/:na]
	at org.apache.cassandra.db.ReadResponse$LocalDataResponse.<init>(ReadResponse.java:138)
~[main/:na]
	at org.apache.cassandra.db.ReadResponse$LocalDataResponse.<init>(ReadResponse.java:134)
~[main/:na]
	at org.apache.cassandra.db.ReadResponse.createDataResponse(ReadResponse.java:76) ~[main/:na]
	at org.apache.cassandra.db.ReadCommand.createResponse(ReadCommand.java:333) ~[main/:na]
	at org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:1884)
~[main/:na]
	at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2587)
~[main/:na]
	... 5 common frames omitted
{noformat}

2)
Similarly, if an index is created on the duration column:
{noformat}
CREATE INDEX d_index ON simplex.duration_table (d);
SELECT * from duration_table WHERE d=1s;
{noformat}

results in:
{noformat}
WARN  [ReadStage-2] 2017-01-31 17:12:00,623 AbstractLocalAwareExecutorService.java:167 - Uncaught
exception on thread Thread[ReadStage-2,10,main]: {}
java.lang.RuntimeException: org.apache.cassandra.index.IndexNotAvailableException: The secondary
index 'd_index' is not yet available
	at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2591)
~[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: org.apache.cassandra.index.IndexNotAvailableException: The secondary index 'd_index'
is not yet available
	at org.apache.cassandra.db.ReadCommand.executeLocally(ReadCommand.java:400) ~[main/:na]
	at org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:1882)
~[main/:na]
	at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2587)
~[main/:na]
	... 5 common frames omitted
{noformat}

3) 
Finally, no further updates can be made to the table once the index has been created. Attempting
to modify or insert a new row results in an error:
{noformat}
ERROR [MutationStage-2] 2017-01-31 17:13:33,106 StorageProxy.java:1422 - Failed to apply mutation
locally : {}
java.lang.RuntimeException: null for ks: simplex, table: duration_table.d_index for ks: simplex,
table: duration_table
	at org.apache.cassandra.db.ColumnFamilyStore.apply(ColumnFamilyStore.java:1334) ~[main/:na]
	at org.apache.cassandra.db.Keyspace.applyInternal(Keyspace.java:618) ~[main/:na]
	at org.apache.cassandra.db.Keyspace.apply(Keyspace.java:462) ~[main/:na]
	at org.apache.cassandra.db.Mutation.apply(Mutation.java:227) ~[main/:na]
	at org.apache.cassandra.db.Mutation.apply(Mutation.java:232) ~[main/:na]
	at org.apache.cassandra.db.Mutation.apply(Mutation.java:241) ~[main/:na]
	at org.apache.cassandra.service.StorageProxy$8.runMayThrow(StorageProxy.java:1416) ~[main/:na]
	at org.apache.cassandra.service.StorageProxy$LocalMutationRunnable.run(StorageProxy.java:2640)
[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.RuntimeException: null for ks: simplex, table: duration_table.d_index
	at org.apache.cassandra.db.ColumnFamilyStore.apply(ColumnFamilyStore.java:1334) ~[main/:na]
	at org.apache.cassandra.index.internal.CassandraIndex.insert(CassandraIndex.java:531) ~[main/:na]
	at org.apache.cassandra.index.internal.CassandraIndex.access$100(CassandraIndex.java:72)
~[main/:na]
	at org.apache.cassandra.index.internal.CassandraIndex$1.indexCell(CassandraIndex.java:444)
~[main/:na]
	at org.apache.cassandra.index.internal.CassandraIndex$1.insertRow(CassandraIndex.java:388)
~[main/:na]
	at org.apache.cassandra.index.SecondaryIndexManager$WriteTimeTransaction.onInserted(SecondaryIndexManager.java:914)
~[main/:na]
	at org.apache.cassandra.db.partitions.AtomicBTreePartition$RowUpdater.apply(AtomicBTreePartition.java:333)
~[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:139) ~[main/:na]
	at org.apache.cassandra.utils.btree.BTree.build(BTree.java:121) ~[main/:na]
	at org.apache.cassandra.utils.btree.BTree.update(BTree.java:178) ~[main/:na]
	at org.apache.cassandra.db.partitions.AtomicBTreePartition.addAllWithSizeDelta(AtomicBTreePartition.java:156)
~[main/:na]
	at org.apache.cassandra.db.Memtable.put(Memtable.java:284) ~[main/:na]
	at org.apache.cassandra.db.ColumnFamilyStore.apply(ColumnFamilyStore.java:1316) ~[main/:na]
	... 12 common frames omitted
Caused by: java.lang.UnsupportedOperationException: null
	at org.apache.cassandra.db.marshal.AbstractType.compareCustom(AbstractType.java:174) ~[main/:na]
	at org.apache.cassandra.db.marshal.AbstractType.compare(AbstractType.java:160) ~[main/:na]
	at org.apache.cassandra.dht.LocalPartitioner$LocalToken.compareTo(LocalPartitioner.java:156)
~[main/:na]
	at org.apache.cassandra.dht.LocalPartitioner$LocalToken.compareTo(LocalPartitioner.java:132)
~[main/:na]
	at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:85) ~[main/:na]
	at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:39) ~[main/:na]
	at java.util.concurrent.ConcurrentSkipListMap.cpr(ConcurrentSkipListMap.java:655) ~[na:1.8.0_91]
	at java.util.concurrent.ConcurrentSkipListMap.findPredecessor(ConcurrentSkipListMap.java:682)
~[na:1.8.0_91]
	at java.util.concurrent.ConcurrentSkipListMap.doGet(ConcurrentSkipListMap.java:781) ~[na:1.8.0_91]
	at java.util.concurrent.ConcurrentSkipListMap.get(ConcurrentSkipListMap.java:1546) ~[na:1.8.0_91]
	at org.apache.cassandra.db.Memtable.put(Memtable.java:264) ~[main/:na]
	at org.apache.cassandra.db.ColumnFamilyStore.apply(ColumnFamilyStore.java:1316) ~[main/:na]
	... 25 common frames omitted
{noformat}


> Indexing is allowed on Duration type when it should not be
> ----------------------------------------------------------
>
>                 Key: CASSANDRA-13174
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-13174
>             Project: Cassandra
>          Issue Type: Bug
>         Environment: C* 3.10
>            Reporter: Kishan Karunaratne
>
> Looks like secondary indexing is allowed on duration type columns. Since comparisons
are not possible for the duration type, indexing on it also should be invalid.
> 1) 
> {noformat}
> CREATE TABLE duration_table (k int PRIMARY KEY, d duration);
> INSERT INTO duration_table (k, d) VALUES (0, 1s);
> SELECT * from duration_table WHERE d=1s ALLOW FILTERING;
> {noformat}
> The above throws an error: 
> {noformat}
> WARN  [ReadStage-2] 2017-01-31 17:09:57,821 AbstractLocalAwareExecutorService.java:167
- Uncaught exception on thread Thread[ReadStage-2,10,main]: {}
> java.lang.RuntimeException: java.lang.UnsupportedOperationException
> 	at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2591)
~[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.UnsupportedOperationException: null
> 	at org.apache.cassandra.db.marshal.AbstractType.compareCustom(AbstractType.java:174)
~[main/:na]
> 	at org.apache.cassandra.db.marshal.AbstractType.compare(AbstractType.java:160) ~[main/:na]
> 	at org.apache.cassandra.db.marshal.AbstractType.compareForCQL(AbstractType.java:204)
~[main/:na]
> 	at org.apache.cassandra.cql3.Operator.isSatisfiedBy(Operator.java:201) ~[main/:na]
> 	at org.apache.cassandra.db.filter.RowFilter$SimpleExpression.isSatisfiedBy(RowFilter.java:719)
~[main/:na]
> 	at org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToRow(RowFilter.java:324)
~[main/:na]
> 	at org.apache.cassandra.db.transform.BaseRows.applyOne(BaseRows.java:120) ~[main/:na]
> 	at org.apache.cassandra.db.transform.BaseRows.add(BaseRows.java:110) ~[main/:na]
> 	at org.apache.cassandra.db.transform.UnfilteredRows.add(UnfilteredRows.java:44) ~[main/:na]
> 	at org.apache.cassandra.db.transform.Transformation.add(Transformation.java:174) ~[main/:na]
> 	at org.apache.cassandra.db.transform.Transformation.apply(Transformation.java:140) ~[main/:na]
> 	at org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:307)
~[main/:na]
> 	at org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:292)
~[main/:na]
> 	at org.apache.cassandra.db.transform.BasePartitions.hasNext(BasePartitions.java:96)
~[main/:na]
> 	at org.apache.cassandra.db.partitions.UnfilteredPartitionIterators$Serializer.serialize(UnfilteredPartitionIterators.java:310)
~[main/:na]
> 	at org.apache.cassandra.db.ReadResponse$LocalDataResponse.build(ReadResponse.java:145)
~[main/:na]
> 	at org.apache.cassandra.db.ReadResponse$LocalDataResponse.<init>(ReadResponse.java:138)
~[main/:na]
> 	at org.apache.cassandra.db.ReadResponse$LocalDataResponse.<init>(ReadResponse.java:134)
~[main/:na]
> 	at org.apache.cassandra.db.ReadResponse.createDataResponse(ReadResponse.java:76) ~[main/:na]
> 	at org.apache.cassandra.db.ReadCommand.createResponse(ReadCommand.java:333) ~[main/:na]
> 	at org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:1884)
~[main/:na]
> 	at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2587)
~[main/:na]
> 	... 5 common frames omitted
> {noformat}
> 2)
> Similarly, if an index is created on the duration column:
> {noformat}
> CREATE INDEX d_index ON simplex.duration_table (d);
> SELECT * from duration_table WHERE d=1s;
> {noformat}
> results in:
> {noformat}
> WARN  [ReadStage-2] 2017-01-31 17:12:00,623 AbstractLocalAwareExecutorService.java:167
- Uncaught exception on thread Thread[ReadStage-2,10,main]: {}
> java.lang.RuntimeException: org.apache.cassandra.index.IndexNotAvailableException: The
secondary index 'd_index' is not yet available
> 	at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2591)
~[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: org.apache.cassandra.index.IndexNotAvailableException: The secondary index
'd_index' is not yet available
> 	at org.apache.cassandra.db.ReadCommand.executeLocally(ReadCommand.java:400) ~[main/:na]
> 	at org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:1882)
~[main/:na]
> 	at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2587)
~[main/:na]
> 	... 5 common frames omitted
> {noformat}
> 3) 
> Finally, no further updates can be made to the table once the index has been created.
Attempting to modify or insert a new row with a non-null value for "d" results in an error:
> {noformat}
> ERROR [MutationStage-2] 2017-01-31 17:13:33,106 StorageProxy.java:1422 - Failed to apply
mutation locally : {}
> java.lang.RuntimeException: null for ks: simplex, table: duration_table.d_index for ks:
simplex, table: duration_table
> 	at org.apache.cassandra.db.ColumnFamilyStore.apply(ColumnFamilyStore.java:1334) ~[main/:na]
> 	at org.apache.cassandra.db.Keyspace.applyInternal(Keyspace.java:618) ~[main/:na]
> 	at org.apache.cassandra.db.Keyspace.apply(Keyspace.java:462) ~[main/:na]
> 	at org.apache.cassandra.db.Mutation.apply(Mutation.java:227) ~[main/:na]
> 	at org.apache.cassandra.db.Mutation.apply(Mutation.java:232) ~[main/:na]
> 	at org.apache.cassandra.db.Mutation.apply(Mutation.java:241) ~[main/:na]
> 	at org.apache.cassandra.service.StorageProxy$8.runMayThrow(StorageProxy.java:1416) ~[main/:na]
> 	at org.apache.cassandra.service.StorageProxy$LocalMutationRunnable.run(StorageProxy.java:2640)
[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.RuntimeException: null for ks: simplex, table: duration_table.d_index
> 	at org.apache.cassandra.db.ColumnFamilyStore.apply(ColumnFamilyStore.java:1334) ~[main/:na]
> 	at org.apache.cassandra.index.internal.CassandraIndex.insert(CassandraIndex.java:531)
~[main/:na]
> 	at org.apache.cassandra.index.internal.CassandraIndex.access$100(CassandraIndex.java:72)
~[main/:na]
> 	at org.apache.cassandra.index.internal.CassandraIndex$1.indexCell(CassandraIndex.java:444)
~[main/:na]
> 	at org.apache.cassandra.index.internal.CassandraIndex$1.insertRow(CassandraIndex.java:388)
~[main/:na]
> 	at org.apache.cassandra.index.SecondaryIndexManager$WriteTimeTransaction.onInserted(SecondaryIndexManager.java:914)
~[main/:na]
> 	at org.apache.cassandra.db.partitions.AtomicBTreePartition$RowUpdater.apply(AtomicBTreePartition.java:333)
~[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:139) ~[main/:na]
> 	at org.apache.cassandra.utils.btree.BTree.build(BTree.java:121) ~[main/:na]
> 	at org.apache.cassandra.utils.btree.BTree.update(BTree.java:178) ~[main/:na]
> 	at org.apache.cassandra.db.partitions.AtomicBTreePartition.addAllWithSizeDelta(AtomicBTreePartition.java:156)
~[main/:na]
> 	at org.apache.cassandra.db.Memtable.put(Memtable.java:284) ~[main/:na]
> 	at org.apache.cassandra.db.ColumnFamilyStore.apply(ColumnFamilyStore.java:1316) ~[main/:na]
> 	... 12 common frames omitted
> Caused by: java.lang.UnsupportedOperationException: null
> 	at org.apache.cassandra.db.marshal.AbstractType.compareCustom(AbstractType.java:174)
~[main/:na]
> 	at org.apache.cassandra.db.marshal.AbstractType.compare(AbstractType.java:160) ~[main/:na]
> 	at org.apache.cassandra.dht.LocalPartitioner$LocalToken.compareTo(LocalPartitioner.java:156)
~[main/:na]
> 	at org.apache.cassandra.dht.LocalPartitioner$LocalToken.compareTo(LocalPartitioner.java:132)
~[main/:na]
> 	at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:85) ~[main/:na]
> 	at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:39) ~[main/:na]
> 	at java.util.concurrent.ConcurrentSkipListMap.cpr(ConcurrentSkipListMap.java:655) ~[na:1.8.0_91]
> 	at java.util.concurrent.ConcurrentSkipListMap.findPredecessor(ConcurrentSkipListMap.java:682)
~[na:1.8.0_91]
> 	at java.util.concurrent.ConcurrentSkipListMap.doGet(ConcurrentSkipListMap.java:781)
~[na:1.8.0_91]
> 	at java.util.concurrent.ConcurrentSkipListMap.get(ConcurrentSkipListMap.java:1546) ~[na:1.8.0_91]
> 	at org.apache.cassandra.db.Memtable.put(Memtable.java:264) ~[main/:na]
> 	at org.apache.cassandra.db.ColumnFamilyStore.apply(ColumnFamilyStore.java:1316) ~[main/:na]
> 	... 25 common frames omitted
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message