cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Petrov (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-11604) select on table fails after changing user defined type in map
Date Mon, 09 May 2016 11:51:12 GMT

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

Alex Petrov updated CASSANDRA-11604:
------------------------------------
    Status: Patch Available  (was: Open)

This assertion was removed in [trunk|https://github.com/apache/cassandra/commit/677230df694752c7ecf6d5459eee60ad7cf45ecf#diff-bc19f192ef82fbca9abd27526054bb0fL254]
(appl in 3.5 has similar effect).

>From what I can say, scrub doesn't fix that issue. Node restart alone has the same effect,
or the flush:
During the node restart, commit log will replay mutation with the same schema as the table
itself. During the flush and consequent reads, all Cells will get the correct Column Definition.
Although this assert doesn't change the behaviour, since ALTER statements only allow "backward-compatible"
changes (after the schema change, it'll be possible to work with the old version, too).

I've added the test for this particular edge case (updating UDT within inserted non-frozen
map) for {{trunk}} and removed assert in {{3.0.x}} (along with adding the test):

||[3.0|https://github.com/ifesdjeen/cassandra/tree/11604-3.0]|[utest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-11604-3.0-testall/]|[dtest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-11604-3.0-dtest/]|
||[trunk|https://github.com/ifesdjeen/cassandra/tree/11604-trunk]|[utest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-11604-trunk-testall/]|[dtest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-11604-trunk-dtest/]|

{{LegacySSTableTest}} is failing locally on trunk, too, although it happened before this commit
(also, there were no code changes for trunk). The rest of tests are passing locally, too.

> select on table fails after changing user defined type in map
> -------------------------------------------------------------
>
>                 Key: CASSANDRA-11604
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11604
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Andreas Jaekle
>            Assignee: Alex Petrov
>             Fix For: 3.x
>
>
> in cassandra 3.5 i get the following exception when i run this cqls:
> {code}
> --DROP KEYSPACE bugtest ;
> CREATE KEYSPACE bugtest
>  WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };
> use bugtest;
> CREATE TYPE tt (
> 	a boolean
> );
> create table t1 (
> 	k text,
> 	v map<text,frozen<tt>>,
> 	PRIMARY KEY(k)
> );
> insert into t1 (k,v) values ('k2',{'mk':{a:false}});
> ALTER TYPE tt ADD b boolean;
> UPDATE t1 SET v['mk'] = { b:true } WHERE k = 'k2';
> select * from t1;  
> {code}
> the last select fails.
> {code}
> WARN  [SharedPool-Worker-5] 2016-04-19 14:18:49,885 AbstractLocalAwareExecutorService.java:169
- Uncaught exception on thread Thread[SharedPool-Worker-5,5,main]: {}
> java.lang.AssertionError: null
>         at org.apache.cassandra.db.rows.ComplexColumnData$Builder.addCell(ComplexColumnData.java:254)
~[apache-cassandra-3.5.jar:3.5]
>         at org.apache.cassandra.db.rows.Row$Merger$ColumnDataReducer.getReduced(Row.java:623)
~[apache-cassandra-3.5.jar:3.5]
>         at org.apache.cassandra.db.rows.Row$Merger$ColumnDataReducer.getReduced(Row.java:549)
~[apache-cassandra-3.5.jar:3.5]
>         at org.apache.cassandra.utils.MergeIterator$ManyToOne.consume(MergeIterator.java:217)
~[apache-cassandra-3.5.jar:3.5]
>         at org.apache.cassandra.utils.MergeIterator$ManyToOne.computeNext(MergeIterator.java:156)
~[apache-cassandra-3.5.jar:3.5]
>         at org.apache.cassandra.utils.AbstractIterator.hasNext(AbstractIterator.java:47)
~[apache-cassandra-3.5.jar:3.5]
>         at org.apache.cassandra.db.rows.Row$Merger.merge(Row.java:526) ~[apache-cassandra-3.5.jar:3.5]
>         at org.apache.cassandra.db.rows.UnfilteredRowIterators$UnfilteredRowMergeIterator$MergeReducer.getReduced(UnfilteredRowIterators.java:473)
~[apache-cassandra-3.5.jar:3.5]
>         at org.apache.cassandra.db.rows.UnfilteredRowIterators$UnfilteredRowMergeIterator$MergeReducer.getReduced(UnfilteredRowIterators.java:437)
~[apache-cassandra-3.5.jar:3.5]
>         at org.apache.cassandra.utils.MergeIterator$ManyToOne.consume(MergeIterator.java:217)
~[apache-cassandra-3.5.jar:3.5]
>         at org.apache.cassandra.utils.MergeIterator$ManyToOne.computeNext(MergeIterator.java:156)
~[apache-cassandra-3.5.jar:3.5]
>         at org.apache.cassandra.utils.AbstractIterator.hasNext(AbstractIterator.java:47)
~[apache-cassandra-3.5.jar:3.5]
>         at org.apache.cassandra.db.rows.UnfilteredRowIterators$UnfilteredRowMergeIterator.computeNext(UnfilteredRowIterators.java:419)
~[apache-cassandra-3.5.jar:3.5]
>         at org.apache.cassandra.db.rows.UnfilteredRowIterators$UnfilteredRowMergeIterator.computeNext(UnfilteredRowIterators.java:279)
~[apache-cassandra-3.5.jar:3.5]
>         at org.apache.cassandra.utils.AbstractIterator.hasNext(AbstractIterator.java:47)
~[apache-cassandra-3.5.jar:3.5]
>         at org.apache.cassandra.db.rows.LazilyInitializedUnfilteredRowIterator.computeNext(LazilyInitializedUnfilteredRowIterator.java:100)
~[apache-cassandra-3.5.jar:3.5]
>         at org.apache.cassandra.db.rows.LazilyInitializedUnfilteredRowIterator.computeNext(LazilyInitializedUnfilteredRowIterator.java:32)
~[apache-cassandra-3.5.jar:3.5]
>         at org.apache.cassandra.utils.AbstractIterator.hasNext(AbstractIterator.java:47)
~[apache-cassandra-3.5.jar:3.5]
>         at org.apache.cassandra.db.transform.BaseRows.hasNext(BaseRows.java:112) ~[apache-cassandra-3.5.jar:3.5]
>         at org.apache.cassandra.db.transform.UnfilteredRows.isEmpty(UnfilteredRows.java:38)
~[apache-cassandra-3.5.jar:3.5]
>         at org.apache.cassandra.db.partitions.PurgeFunction.applyToPartition(PurgeFunction.java:64)
~[apache-cassandra-3.5.jar:3.5]
>         at org.apache.cassandra.db.partitions.PurgeFunction.applyToPartition(PurgeFunction.java:24)
~[apache-cassandra-3.5.jar:3.5]
>         at org.apache.cassandra.db.transform.BasePartitions.hasNext(BasePartitions.java:76)
~[apache-cassandra-3.5.jar:3.5]
>         at org.apache.cassandra.db.partitions.UnfilteredPartitionIterators$Serializer.serialize(UnfilteredPartitionIterators.java:289)
~[apache-cassandra-3.5.jar:3.5]
>         at org.apache.cassandra.db.ReadResponse$LocalDataResponse.build(ReadResponse.java:134)
~[apache-cassandra-3.5.jar:3.5]
>         at org.apache.cassandra.db.ReadResponse$LocalDataResponse.<init>(ReadResponse.java:127)
~[apache-cassandra-3.5.jar:3.5]
>         at org.apache.cassandra.db.ReadResponse$LocalDataResponse.<init>(ReadResponse.java:123)
~[apache-cassandra-3.5.jar:3.5]
>         at org.apache.cassandra.db.ReadResponse.createDataResponse(ReadResponse.java:65)
~[apache-cassandra-3.5.jar:3.5]
>         at org.apache.cassandra.db.ReadCommand.createResponse(ReadCommand.java:292) ~[apache-cassandra-3.5.jar:3.5]
>         at org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:1799)
~[apache-cassandra-3.5.jar:3.5]
>         at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2466)
~[apache-cassandra-3.5.jar:3.5]
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_72-internal]
>         at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:164)
~[apache-cassandra-3.5.jar:3.5]
>         at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$LocalSessionFutureTask.run(AbstractLocalAwareExecutorService.java:136)
[apache-cassandra-3.5.jar:3.5]
>         at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:105) [apache-cassandra-3.5.jar:3.5]
>         at java.lang.Thread.run(Thread.java:745) [na:1.8.0_72-internal]
> {code}



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

Mime
View raw message