Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-6705

ALTER TYPE <type> RENAME <field> fails sometime with java.lang.AssertionError: null

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Low
    • Resolution: Fixed
    • Fix Version/s: 2.1 beta2
    • Component/s: Legacy/CQL
    • Labels:
      None
    • Environment:

      trunk

    • Severity:
      Low

      Description

      Here are the steps w

      cqlsh> create KEYSPACE bug WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};
      cqlsh>
      cqlsh>
      cqlsh> use bug;
      cqlsh:bug> create type first_type (first_field int);
      cqlsh:bug> create type second_type (second_field list<first_type >);
      cqlsh:bug> alter type first_type RENAME first_field TO first_fieldd;
      TSocket read 0 bytes
      

      And here is from the C* side:

      NFO  05:11:54 Loading org.apache.cassandra.db.marshal.UserType(bug,7365636f6e645f74797065,7365636f6e645f6669656c64:org.apache.cassandra.db.marshal.ListType(org.apache.cassandra.db.marshal.UserType(bug,66697273745f74797065,66697273745f6669656c6464:org.apache.cassandra.db.marshal.Int32Type)))
      INFO  05:11:54 Compacted 4 sstables to [/var/lib/cassandra/data/system/schema_usertypes-3aa752254f82350b8d5c430fa221fa0a/system-schema_usertypes-ka-5,].  908 bytes to 425 (~46% of original) in 12ms = 0.033776MB/s.  4 total partitions merged to 1.  Partition merge counts were {4:1, }
      ERROR 05:11:54 Exception in thread Thread[MigrationStage:1,5,main]
      java.lang.AssertionError: null
      	at org.apache.cassandra.config.UTMetaData.addType(UTMetaData.java:145) ~[main/:na]
      	at org.apache.cassandra.db.DefsTables.addType(DefsTables.java:412) ~[main/:na]
      	at org.apache.cassandra.db.DefsTables.mergeTypes(DefsTables.java:365) ~[main/:na]
      	at org.apache.cassandra.db.DefsTables.mergeSchema(DefsTables.java:182) ~[main/:na]
      	at org.apache.cassandra.service.MigrationManager$2.runMayThrow(MigrationManager.java:299) ~[main/:na]
      	at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) ~[main/:na]
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ~[na:1.7.0_51]
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262) ~[na:1.7.0_51]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_51]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_51]
      	at java.lang.Thread.run(Thread.java:744) [na:1.7.0_51]
      ERROR 05:11:54 Error occurred during processing of message.
      java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.AssertionError
      	at org.apache.cassandra.utils.FBUtilities.waitOnFuture(FBUtilities.java:411) ~[main/:na]
      	at org.apache.cassandra.service.MigrationManager.announce(MigrationManager.java:281) ~[main/:na]
      	at org.apache.cassandra.service.MigrationManager.announceNewType(MigrationManager.java:216) ~[main/:na]
      	at org.apache.cassandra.service.MigrationManager.announceTypeUpdate(MigrationManager.java:247) ~[main/:na]
      	at org.apache.cassandra.cql3.statements.AlterTypeStatement.announceMigration(AlterTypeStatement.java:139) ~[main/:na]
      	at org.apache.cassandra.cql3.statements.SchemaAlteringStatement.execute(SchemaAlteringStatement.java:71) ~[main/:na]
      	at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:180) ~[main/:na]
      	at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:214) ~[main/:na]
      	at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:204) ~[main/:na]
      	at org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1973) ~[main/:na]
      	at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4486) ~[thrift/:na]
      	at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4470) ~[thrift/:na]
      	at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) ~[libthrift-0.9.1.jar:0.9.1]
      	at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39) ~[libthrift-0.9.1.jar:0.9.1]
      	at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:194) ~[main/:na]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_51]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_51]
      	at java.lang.Thread.run(Thread.java:744) [na:1.7.0_51]
      Caused by: java.util.concurrent.ExecutionException: java.lang.AssertionError
      	at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[na:1.7.0_51]
      	at java.util.concurrent.FutureTask.get(FutureTask.java:188) ~[na:1.7.0_51]
      	at org.apache.cassandra.utils.FBUtilities.waitOnFuture(FBUtilities.java:407) ~[main/:na]
      	... 17 common frames omitted
      Caused by: java.lang.AssertionError: null
      	at org.apache.cassandra.config.UTMetaData.addType(UTMetaData.java:145) ~[main/:na]
      	at org.apache.cassandra.db.DefsTables.addType(DefsTables.java:412) ~[main/:na]
      	at org.apache.cassandra.db.DefsTables.mergeTypes(DefsTables.java:365) ~[main/:na]
      	at org.apache.cassandra.db.DefsTables.mergeSchema(DefsTables.java:182) ~[main/:na]
      	at org.apache.cassandra.service.MigrationManager$2.runMayThrow(MigrationManager.java:299) ~[main/:na]
      	at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) ~[main/:na]
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ~[na:1.7.0_51]
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262) ~[na:1.7.0_51]
      	... 3 common frames omitted
      

        Attachments

        1. 6705-2.txt
          9 kB
          Sylvain Lebresne
        2. trunk-6705.patch
          1 kB
          Mikhail Stepura

          Issue Links

            Activity

              People

              • Assignee:
                slebresne Sylvain Lebresne
                Reporter:
                mishail Mikhail Stepura
                Authors:
                Sylvain Lebresne
                Reviewers:
                Mikhail Stepura
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: