cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-4439) Updating column family using cassandra-cli results in "Cannot modify index name"
Date Tue, 17 Jul 2012 15:03:34 GMT

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

Jonathan Ellis commented on CASSANDRA-4439:
-------------------------------------------

Isn't existingIndexNames supposed to take care of this case?
                
> Updating column family using cassandra-cli results in "Cannot modify index name"
> --------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-4439
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4439
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core, Tools
>    Affects Versions: 1.1.2
>         Environment: cassandra 1.1.2, RHEL6.3, running under java-1.6.0-sun
>            Reporter: Alex Schultz
>            Assignee: Pavel Yaskevich
>            Priority: Minor
>              Labels: cli, schema
>             Fix For: 1.1.3
>
>         Attachments: CASSANDRA-4439.patch
>
>
> Using cassandra-cli the following update to a column family worked in 1.1.0:
> {code}
> create keyspace testing;
> use testing;
> create column family Album
> with comparator = UTF8Type
> and default_validation_class = UTF8Type
> and column_metadata =
> [
>     {column_name: profileId, validation_class: UTF8Type, index_type: KEYS}
> ];
> update column family Album
> and column_metadata =
> [
>     {column_name: profileId, validation_class: UTF8Type, index_type: KEYS},
>     {column_name: postedDate, validation_class: LongType}
> ];
> {code}
> After upgrading to 1.1.2, the update statement fails with the following exception in
system.log:
> {quote}
> ERROR [Thrift:16] 2012-07-13 14:51:54,558 CustomTThreadPoolServer.java (line 204) Error
occurred during processing of message.
> java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.io.IOException:
org.apache.cassandra.config.ConfigurationException: Cannot modify index name
>         at org.apache.cassandra.utils.FBUtilities.waitOnFuture(FBUtilities.java:373)
>         at org.apache.cassandra.service.MigrationManager.announce(MigrationManager.java:188)
>         at org.apache.cassandra.service.MigrationManager.announceColumnFamilyUpdate(MigrationManager.java:161)
>         at org.apache.cassandra.thrift.CassandraServer.system_update_column_family(CassandraServer.java:1063)
>         at org.apache.cassandra.thrift.Cassandra$Processor$system_update_column_family.getResult(Cassandra.java:3520)
>         at org.apache.cassandra.thrift.Cassandra$Processor$system_update_column_family.getResult(Cassandra.java:3508)
>         at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32)
>         at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34)
>         at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:186)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:662)
> Caused by: java.util.concurrent.ExecutionException: java.io.IOException: org.apache.cassandra.config.ConfigurationException:
Cannot modify index name
>         at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
>         at java.util.concurrent.FutureTask.get(FutureTask.java:83)
>         at org.apache.cassandra.utils.FBUtilities.waitOnFuture(FBUtilities.java:369)
>         ... 11 more
> Caused by: java.io.IOException: org.apache.cassandra.config.ConfigurationException: Cannot
modify index name
>         at org.apache.cassandra.config.CFMetaData.reload(CFMetaData.java:676)
>         at org.apache.cassandra.db.DefsTable.updateColumnFamily(DefsTable.java:463)
>         at org.apache.cassandra.db.DefsTable.mergeColumnFamilies(DefsTable.java:407)
>         at org.apache.cassandra.db.DefsTable.mergeSchema(DefsTable.java:271)
>         at org.apache.cassandra.service.MigrationManager$1.call(MigrationManager.java:211)
>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>         ... 3 more
> Caused by: org.apache.cassandra.config.ConfigurationException: Cannot modify index name
>         at org.apache.cassandra.config.ColumnDefinition.apply(ColumnDefinition.java:214)
>         at org.apache.cassandra.config.CFMetaData.apply(CFMetaData.java:758)
>         at org.apache.cassandra.config.CFMetaData.reload(CFMetaData.java:672)
>         ... 9 more
> ERROR [MigrationStage:1] 2012-07-13 14:51:54,561 AbstractCassandraDaemon.java (line 134)
Exception in thread Thread[MigrationStage:1,5,main]
> java.io.IOException: org.apache.cassandra.config.ConfigurationException: Cannot modify
index name
>         at org.apache.cassandra.config.CFMetaData.reload(CFMetaData.java:676)
>         at org.apache.cassandra.db.DefsTable.updateColumnFamily(DefsTable.java:463)
>         at org.apache.cassandra.db.DefsTable.mergeColumnFamilies(DefsTable.java:407)
>         at org.apache.cassandra.db.DefsTable.mergeSchema(DefsTable.java:271)
>         at org.apache.cassandra.service.MigrationManager$1.call(MigrationManager.java:211)
>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:662)
> Caused by: org.apache.cassandra.config.ConfigurationException: Cannot modify index name
>         at org.apache.cassandra.config.ColumnDefinition.apply(ColumnDefinition.java:214)
>         at org.apache.cassandra.config.CFMetaData.apply(CFMetaData.java:758)
>         at org.apache.cassandra.config.CFMetaData.reload(CFMetaData.java:672)
>         ... 9 more
> {quote}
> After further testing the following works in 1.1.2:
> {code}
> create keyspace testing;
> use testing;
> create column family Album
> with comparator = UTF8Type
> and default_validation_class = UTF8Type
> and column_metadata =
> [
>     {column_name: profileId, validation_class: UTF8Type, index_name: 'Album_profileId_idx',
index_type: KEYS}
> ];
> update column family Album
> and column_metadata =
> [
>     {column_name: profileId, validation_class: UTF8Type, index_name: 'Album_profileId_idx',
index_type: KEYS},
>     {column_name: postedDate, validation_class: LongType}
> ];
> {code}
> So it appears that if you did not specify an index_name when creating the column originally,
you cannot update the column family anymore.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message