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

Ryan McGuire commented on CASSANDRA-10350:
------------------------------------------

I agree this is minor, but one use case for the order to be predictable is 
verifying that the schema is consistent. Of course, that's what describecluster 
is for, but this is a check on the veracity of that.

> cqlsh describe keyspace output no longers keeps indexes in sorted order
> -----------------------------------------------------------------------
>
>                 Key: CASSANDRA-10350
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10350
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Andrew Hust
>            Priority: Minor
>             Fix For: 3.0.x
>
>
> cqlsh command {{describe keyspace <name>}} no longer keeps indexes in alpha 
> sorted order.  This was caught with a dtest on 
> [cassci|http://cassci.datastax.com/view/cassandra-3.0/job/cassandra-3.0_dtest/lastCompletedBuild/testReport/cqlsh_tests.cqlsh_tests/TestCqlsh/test_describe/].
> Tested on: C* {{b4544846def2bdd00ff841c7e3d9f2559620827b}}
> Can be reproduced with the following:
> {code}
> ccm stop
> ccm remove describe_order
> ccm create -n 1 -v git:cassandra-2.2 describe_order
> ccm start
> cat << EOF | ccm node1 cqlsh
> CREATE KEYSPACE ks1 WITH replication = {'class': 'SimpleStrategy', 
> 'replication_factor': 1};
> USE ks1;
> CREATE TABLE ks1.test (id int, col int, val text, val2 text, val3 text, 
> PRIMARY KEY(id, col));
> CREATE INDEX ix0 ON ks1.test (col);
> CREATE INDEX ix3 ON ks1.test (val3);
> CREATE INDEX ix2 ON ks1.test (val2);
> CREATE INDEX ix1 ON ks1.test (val);
> DESCRIBE KEYSPACE ks1;
> EOF
> ccm stop
> ccm setdir -v git:cassandra-3.0
> ccm start
> sleep 15
> cat << EOF | ccm node1 cqlsh
> DESCRIBE KEYSPACE ks1;
> EOF
> ccm stop
> {code}
> Ouput on <= cassandra-2.2:
> {code}
> CREATE INDEX ix0 ON ks1.test (col);
> CREATE INDEX ix1 ON ks1.test (val);
> CREATE INDEX ix2 ON ks1.test (val2);
> CREATE INDEX ix3 ON ks1.test (val3);
> {code}
> Output on cassandra-3.0:
> {code}
> CREATE INDEX ix2 ON ks1.test (val2);
> CREATE INDEX ix3 ON ks1.test (val3);
> CREATE INDEX ix0 ON ks1.test (col);
> CREATE INDEX ix1 ON ks1.test (val);
> {code}
> //CC [~enigmacurry]



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

Reply via email to