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

Russ Hatch updated CASSANDRA-11609:
-----------------------------------
    Description: 
This was found in the upgrades user_types_test.

Can also be repro'd with ccm.

To repro using ccm:

Create a 1 node cluster on 2.2.x

Create this schema:
{noformat}
create keyspace test2 with replication = {'class':'SimpleStrategy', 
'replication_factor':1};
use test2;
CREATE TYPE address (
         street text,
         city text,
         zip_code int,
         phones set<text>
         );
CREATE TYPE fullname (
         irstname text,
         astname text
         );
CREATE TABLE users (
         d uuid PRIMARY KEY,
         ame frozen<fullname>,
         ddresses map<text, frozen<address>>
         );
{noformat}

Upgrade the single node to trunk, attempt to start the node up. Start will fail 
with this exception:
{noformat}
ERROR [main] 2016-04-19 11:33:19,218 CassandraDaemon.java:704 - Exception 
encountered during startup
org.apache.cassandra.exceptions.InvalidRequestException: Non-frozen UDTs are 
not allowed inside collections: map<text, address>
        at 
org.apache.cassandra.cql3.CQL3Type$Raw$RawCollection.throwNestedNonFrozenError(CQL3Type.java:686)
 ~[main/:na]
        at 
org.apache.cassandra.cql3.CQL3Type$Raw$RawCollection.prepare(CQL3Type.java:652) 
~[main/:na]
        at 
org.apache.cassandra.cql3.CQL3Type$Raw$RawCollection.prepareInternal(CQL3Type.java:644)
 ~[main/:na]
        at 
org.apache.cassandra.schema.CQLTypeParser.parse(CQLTypeParser.java:53) 
~[main/:na]
        at 
org.apache.cassandra.schema.SchemaKeyspace.createColumnFromRow(SchemaKeyspace.java:1022)
 ~[main/:na]
        at 
org.apache.cassandra.schema.SchemaKeyspace.lambda$fetchColumns$12(SchemaKeyspace.java:1006)
 ~[main/:na]
        at java.lang.Iterable.forEach(Iterable.java:75) ~[na:1.8.0_77]
        at 
org.apache.cassandra.schema.SchemaKeyspace.fetchColumns(SchemaKeyspace.java:1006)
 ~[main/:na]
        at 
org.apache.cassandra.schema.SchemaKeyspace.fetchTable(SchemaKeyspace.java:960) 
~[main/:na]
        at 
org.apache.cassandra.schema.SchemaKeyspace.fetchTables(SchemaKeyspace.java:939) 
~[main/:na]
        at 
org.apache.cassandra.schema.SchemaKeyspace.fetchKeyspace(SchemaKeyspace.java:902)
 ~[main/:na]
        at 
org.apache.cassandra.schema.SchemaKeyspace.fetchKeyspacesWithout(SchemaKeyspace.java:879)
 ~[main/:na]
        at 
org.apache.cassandra.schema.SchemaKeyspace.fetchNonSystemKeyspaces(SchemaKeyspace.java:867)
 ~[main/:na]
        at org.apache.cassandra.config.Schema.loadFromDisk(Schema.java:134) 
~[main/:na]
        at org.apache.cassandra.config.Schema.loadFromDisk(Schema.java:124) 
~[main/:na]
        at 
org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:229) 
[main/:na]
        at 
org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:558) 
[main/:na]
        at 
org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:687) 
[main/:na]
{noformat}

  was:
This was found in the upgrades user_types_test.

Can also be repro'd with ccm.

Create a 1 node ccm cluster on 2.2.x

Create this schema:
{noformat}
create keyspace test2 with replication = {'class':'SimpleStrategy', 
'replication_factor':1};
use test2;
CREATE TYPE address (
         street text,
         city text,
         zip_code int,
         phones set<text>
         );
CREATE TYPE fullname (
         irstname text,
         astname text
         );
CREATE TABLE users (
         d uuid PRIMARY KEY,
         ame frozen<fullname>,
         ddresses map<text, frozen<address>>
         );
{noformat}

Upgrade the single node to trunk, attempt to start the node up. Start will fail 
with this exception:
{noformat}
ERROR [main] 2016-04-19 11:33:19,218 CassandraDaemon.java:704 - Exception 
encountered during startup
org.apache.cassandra.exceptions.InvalidRequestException: Non-frozen UDTs are 
not allowed inside collections: map<text, address>
        at 
org.apache.cassandra.cql3.CQL3Type$Raw$RawCollection.throwNestedNonFrozenError(CQL3Type.java:686)
 ~[main/:na]
        at 
org.apache.cassandra.cql3.CQL3Type$Raw$RawCollection.prepare(CQL3Type.java:652) 
~[main/:na]
        at 
org.apache.cassandra.cql3.CQL3Type$Raw$RawCollection.prepareInternal(CQL3Type.java:644)
 ~[main/:na]
        at 
org.apache.cassandra.schema.CQLTypeParser.parse(CQLTypeParser.java:53) 
~[main/:na]
        at 
org.apache.cassandra.schema.SchemaKeyspace.createColumnFromRow(SchemaKeyspace.java:1022)
 ~[main/:na]
        at 
org.apache.cassandra.schema.SchemaKeyspace.lambda$fetchColumns$12(SchemaKeyspace.java:1006)
 ~[main/:na]
        at java.lang.Iterable.forEach(Iterable.java:75) ~[na:1.8.0_77]
        at 
org.apache.cassandra.schema.SchemaKeyspace.fetchColumns(SchemaKeyspace.java:1006)
 ~[main/:na]
        at 
org.apache.cassandra.schema.SchemaKeyspace.fetchTable(SchemaKeyspace.java:960) 
~[main/:na]
        at 
org.apache.cassandra.schema.SchemaKeyspace.fetchTables(SchemaKeyspace.java:939) 
~[main/:na]
        at 
org.apache.cassandra.schema.SchemaKeyspace.fetchKeyspace(SchemaKeyspace.java:902)
 ~[main/:na]
        at 
org.apache.cassandra.schema.SchemaKeyspace.fetchKeyspacesWithout(SchemaKeyspace.java:879)
 ~[main/:na]
        at 
org.apache.cassandra.schema.SchemaKeyspace.fetchNonSystemKeyspaces(SchemaKeyspace.java:867)
 ~[main/:na]
        at org.apache.cassandra.config.Schema.loadFromDisk(Schema.java:134) 
~[main/:na]
        at org.apache.cassandra.config.Schema.loadFromDisk(Schema.java:124) 
~[main/:na]
        at 
org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:229) 
[main/:na]
        at 
org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:558) 
[main/:na]
        at 
org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:687) 
[main/:na]
{noformat}


> cassandra won't start with schema complaint that does not appear to be valid
> ----------------------------------------------------------------------------
>
>                 Key: CASSANDRA-11609
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11609
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Russ Hatch
>
> This was found in the upgrades user_types_test.
> Can also be repro'd with ccm.
> To repro using ccm:
> Create a 1 node cluster on 2.2.x
> Create this schema:
> {noformat}
> create keyspace test2 with replication = {'class':'SimpleStrategy', 
> 'replication_factor':1};
> use test2;
> CREATE TYPE address (
>          street text,
>          city text,
>          zip_code int,
>          phones set<text>
>          );
> CREATE TYPE fullname (
>          irstname text,
>          astname text
>          );
> CREATE TABLE users (
>          d uuid PRIMARY KEY,
>          ame frozen<fullname>,
>          ddresses map<text, frozen<address>>
>          );
> {noformat}
> Upgrade the single node to trunk, attempt to start the node up. Start will 
> fail with this exception:
> {noformat}
> ERROR [main] 2016-04-19 11:33:19,218 CassandraDaemon.java:704 - Exception 
> encountered during startup
> org.apache.cassandra.exceptions.InvalidRequestException: Non-frozen UDTs are 
> not allowed inside collections: map<text, address>
>         at 
> org.apache.cassandra.cql3.CQL3Type$Raw$RawCollection.throwNestedNonFrozenError(CQL3Type.java:686)
>  ~[main/:na]
>         at 
> org.apache.cassandra.cql3.CQL3Type$Raw$RawCollection.prepare(CQL3Type.java:652)
>  ~[main/:na]
>         at 
> org.apache.cassandra.cql3.CQL3Type$Raw$RawCollection.prepareInternal(CQL3Type.java:644)
>  ~[main/:na]
>         at 
> org.apache.cassandra.schema.CQLTypeParser.parse(CQLTypeParser.java:53) 
> ~[main/:na]
>         at 
> org.apache.cassandra.schema.SchemaKeyspace.createColumnFromRow(SchemaKeyspace.java:1022)
>  ~[main/:na]
>         at 
> org.apache.cassandra.schema.SchemaKeyspace.lambda$fetchColumns$12(SchemaKeyspace.java:1006)
>  ~[main/:na]
>         at java.lang.Iterable.forEach(Iterable.java:75) ~[na:1.8.0_77]
>         at 
> org.apache.cassandra.schema.SchemaKeyspace.fetchColumns(SchemaKeyspace.java:1006)
>  ~[main/:na]
>         at 
> org.apache.cassandra.schema.SchemaKeyspace.fetchTable(SchemaKeyspace.java:960)
>  ~[main/:na]
>         at 
> org.apache.cassandra.schema.SchemaKeyspace.fetchTables(SchemaKeyspace.java:939)
>  ~[main/:na]
>         at 
> org.apache.cassandra.schema.SchemaKeyspace.fetchKeyspace(SchemaKeyspace.java:902)
>  ~[main/:na]
>         at 
> org.apache.cassandra.schema.SchemaKeyspace.fetchKeyspacesWithout(SchemaKeyspace.java:879)
>  ~[main/:na]
>         at 
> org.apache.cassandra.schema.SchemaKeyspace.fetchNonSystemKeyspaces(SchemaKeyspace.java:867)
>  ~[main/:na]
>         at org.apache.cassandra.config.Schema.loadFromDisk(Schema.java:134) 
> ~[main/:na]
>         at org.apache.cassandra.config.Schema.loadFromDisk(Schema.java:124) 
> ~[main/:na]
>         at 
> org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:229) 
> [main/:na]
>         at 
> org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:558)
>  [main/:na]
>         at 
> org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:687) 
> [main/:na]
> {noformat}



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

Reply via email to