You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Cathy Daw (JIRA)" <ji...@apache.org> on 2011/06/01 20:31:47 UTC

[jira] [Issue Comment Edited] (CASSANDRA-2730) exception generate when using same index names

    [ https://issues.apache.org/jira/browse/CASSANDRA-2730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042349#comment-13042349 ] 

Cathy Daw edited comment on CASSANDRA-2730 at 6/1/11 6:30 PM:
--------------------------------------------------------------

*For clarity, this occurs only when you create the same named index referencing different columns*
_The following prevents future start-up of the cluster_
{code}
cqlsh> CREATE INDEX birth_year_key ON users (session_token);
Bad Request: javax.management.InstanceAlreadyExistsException: org.apache.cassandra.db:type=IndexColumnFamilies,keyspace=cqldb,columnfamily=users.birth_year_key
{code}

*PASS: CQLSH allows multiple indexes without an issue*
{code}
cqlsh> CREATE INDEX gender_key ON users (gender);
cqlsh> CREATE INDEX state_key ON users (state);
cqlsh> CREATE INDEX birth_year_key ON users (birth_year);
{code}

*PASS: CQLSH correctly errors out creating the same index twice*
{code}
cqlsh> CREATE INDEX birth_year_key ON users (birth_year);
Bad Request: Index exists
{code}




      was (Author: cdaw):
    *For clarity, this occurs only when you create the same named index referencing different columns*
_The following prevents future start-up of the cluster*
{code}
cqlsh> CREATE INDEX birth_year_key ON users (session_token);
Bad Request: javax.management.InstanceAlreadyExistsException: org.apache.cassandra.db:type=IndexColumnFamilies,keyspace=cqldb,columnfamily=users.birth_year_key
{code}

*PASS: CQLSH allows multiple indexes without an issue*
{code}
cqlsh> CREATE INDEX gender_key ON users (gender);
cqlsh> CREATE INDEX state_key ON users (state);
cqlsh> CREATE INDEX birth_year_key ON users (birth_year);
{code}

*PASS: CQLSH correctly errors out creating the same index twice*
{code}
cqlsh> CREATE INDEX birth_year_key ON users (birth_year);
Bad Request: Index exists
{code}



  
> exception generate when using same index names
> ----------------------------------------------
>
>                 Key: CASSANDRA-2730
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2730
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.8 beta 1
>            Reporter: BAONING WU
>              Labels: cql
>
> when using cqlsh tool to generate indexes, for example, suppose we have a column family Tuser, which has two columns: name and state.
> cqlsh> create index name_key on Tuser(name);
> cqlsh> create index name_key on Tuser(state);
> note that name_key is used twice by mistake, then a javax.management.InstanceAlreadyExistsException will be thrown and this exception will prevent cassandra service from starting any more.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira