cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick McFadin (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CASSANDRA-11145) Materialized View throws error if Map type is in base table
Date Wed, 10 Feb 2016 05:33:18 GMT

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

Patrick McFadin resolved CASSANDRA-11145.
-----------------------------------------
       Resolution: Duplicate
    Reproduced In: 3.3, 3.2  (was: 3.2, 3.3)

> Materialized View throws error if Map type is in base table
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-11145
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11145
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Patrick McFadin
>            Priority: Critical
>
> Using the following test setup:
> {code}CREATE TABLE test (
>   a int PRIMARY KEY,
>   b text,
>   c map<text,text>
> );
> CREATE MATERIALIZED VIEW test_mv AS
> SELECT a, b
> FROM test
> WHERE a IS NOT NULL AND b IS NOT NULL
> PRIMARY KEY(b, a);
> {code}
> When inserting data to the base table:
> {code}
> INSERT INTO test (a,b,c)
> VALUES(1, 'b', {'c':'c'});
> {code}
> The insert will fail and a stack trace is generated in the logs:
> {code}
> ERROR [SharedPool-Worker-2] 2016-02-10 05:25:05,957 StorageProxy.java:1339 - Failed to
apply mutation locally : {}
> java.lang.IllegalStateException: [ColumnDefinition{name=c, type=org.apache.cassandra.db.marshal.MapType(org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.UTF8Type),
kind=REGULAR, position=-1}] is not a subset of []
> 	at org.apache.cassandra.db.Columns$Serializer.encodeBitmap(Columns.java:532) ~[main/:na]
> 	at org.apache.cassandra.db.Columns$Serializer.serializedSubsetSize(Columns.java:484)
~[main/:na]
> 	at org.apache.cassandra.db.rows.UnfilteredSerializer.serializedRowBodySize(UnfilteredSerializer.java:277)
~[main/:na]
> 	at org.apache.cassandra.db.rows.UnfilteredSerializer.serializedSize(UnfilteredSerializer.java:249)
~[main/:na]
> 	at org.apache.cassandra.db.rows.UnfilteredSerializer.serializedSize(UnfilteredSerializer.java:236)
~[main/:na]
> 	at org.apache.cassandra.db.rows.UnfilteredSerializer.serializedSize(UnfilteredSerializer.java:229)
~[main/:na]
> 	at org.apache.cassandra.db.rows.UnfilteredRowIteratorSerializer.serializedSize(UnfilteredRowIteratorSerializer.java:171)
~[main/:na]
> 	at org.apache.cassandra.db.partitions.PartitionUpdate$PartitionUpdateSerializer.serializedSize(PartitionUpdate.java:716)
~[main/:na]
> 	at org.apache.cassandra.db.Mutation$MutationSerializer.serializedSize(Mutation.java:372)
~[main/:na]
> 	at org.apache.cassandra.db.commitlog.CommitLog.add(CommitLog.java:262) ~[main/:na]
> 	at org.apache.cassandra.db.Keyspace.apply(Keyspace.java:498) ~[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.service.StorageProxy.mutateMV(StorageProxy.java:748) ~[main/:na]
> 	at org.apache.cassandra.db.view.ViewManager.pushViewReplicaUpdates(ViewManager.java:149)
~[main/:na]
> 	at org.apache.cassandra.db.Keyspace.apply(Keyspace.java:516) ~[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$197/1675816556.run(Unknown Source)
~[na:na]
> 	at org.apache.cassandra.service.StorageProxy$8.runMayThrow(StorageProxy.java:1333) ~[main/:na]
> 	at org.apache.cassandra.service.StorageProxy$LocalMutationRunnable.run(StorageProxy.java:2510)
[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]
> ERROR [SharedPool-Worker-2] 2016-02-10 05:26:08,687 StorageProxy.java:752 - Error applying
local view update to keyspace killrvideo: Mutation(keyspace='killrvideo', key='62', modifications=[
>   [killrvideo.test_mv] key=b columns=[[] | [c]]
>     Row: a=1 | c={}
> ])
> ERROR [SharedPool-Worker-2] 2016-02-10 05:26:08,688 Keyspace.java:521 - Unknown exception
caught while attempting to update MaterializedView! killrvideo.test
> java.lang.IllegalStateException: [ColumnDefinition{name=c, type=org.apache.cassandra.db.marshal.MapType(org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.UTF8Type),
kind=REGULAR, position=-1}] is not a subset of []
> 	at org.apache.cassandra.db.Columns$Serializer.encodeBitmap(Columns.java:532) ~[main/:na]
> 	at org.apache.cassandra.db.Columns$Serializer.serializedSubsetSize(Columns.java:484)
~[main/:na]
> 	at org.apache.cassandra.db.rows.UnfilteredSerializer.serializedRowBodySize(UnfilteredSerializer.java:277)
~[main/:na]
> 	at org.apache.cassandra.db.rows.UnfilteredSerializer.serializedSize(UnfilteredSerializer.java:249)
~[main/:na]
> 	at org.apache.cassandra.db.rows.UnfilteredSerializer.serializedSize(UnfilteredSerializer.java:236)
~[main/:na]
> 	at org.apache.cassandra.db.rows.UnfilteredSerializer.serializedSize(UnfilteredSerializer.java:229)
~[main/:na]
> 	at org.apache.cassandra.db.rows.UnfilteredRowIteratorSerializer.serializedSize(UnfilteredRowIteratorSerializer.java:171)
~[main/:na]
> 	at org.apache.cassandra.db.partitions.PartitionUpdate$PartitionUpdateSerializer.serializedSize(PartitionUpdate.java:716)
~[main/:na]
> 	at org.apache.cassandra.db.Mutation$MutationSerializer.serializedSize(Mutation.java:372)
~[main/:na]
> 	at org.apache.cassandra.db.commitlog.CommitLog.add(CommitLog.java:262) ~[main/:na]
> 	at org.apache.cassandra.db.Keyspace.apply(Keyspace.java:498) [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.service.StorageProxy.mutateMV(StorageProxy.java:748) ~[main/:na]
> 	at org.apache.cassandra.db.view.ViewManager.pushViewReplicaUpdates(ViewManager.java:149)
~[main/:na]
> 	at org.apache.cassandra.db.Keyspace.apply(Keyspace.java:516) [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$197/1675816556.run(Unknown Source)
[main/:na]
> 	at org.apache.cassandra.service.StorageProxy$8.runMayThrow(StorageProxy.java:1333) [main/:na]
> 	at org.apache.cassandra.service.StorageProxy$LocalMutationRunnable.run(StorageProxy.java:2510)
[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)

Mime
View raw message