cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-10339) Prevent ALTER TYPE from creating circular references
Date Fri, 18 Sep 2015 07:34:04 GMT

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

Sylvain Lebresne updated CASSANDRA-10339:
-----------------------------------------
    Reproduced In: 3.0 beta 2, 2.2.1, 2.1.9  (was: 2.1.9, 2.2.1, 3.0 beta 2)
         Reviewer: Sylvain Lebresne

> Prevent ALTER TYPE from creating circular references
> ----------------------------------------------------
>
>                 Key: CASSANDRA-10339
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10339
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Olivier Michallat
>            Assignee: Robert Stupp
>            Priority: Minor
>             Fix For: 2.1.x, 2.2.x, 3.0.x
>
>
> It's possible to define circular/recursive types using {{ALTER TYPE}}. They won't work
in practice when you try to insert data, but we should detect this earlier and prevent the
type modification.
> Recursive type example (from [JAVA-908|https://datastax-oss.atlassian.net/browse/JAVA-908]):
> {code}
> CREATE TYPE node (name text,);
> ALTER TYPE node ADD children frozen<list<node>>;
> {code}
> Circular example (from [Stack overflow|http://stackoverflow.com/questions/29037733/cassandra-2-1-recursion-by-nesting-udts]):
> {code}
> create type ping(pingid int);
> create type pong(pongid int, ping frozen<ping>);
> alter type ping ADD pong frozen<pong>;
> {code}
> Note that, in the circular example, references are properly checked when dropping the
types, so neither type can be dropped.



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

Mime
View raw message