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

Upgrade to 4.0 fails with NullPointerException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 4.0-alpha1, 4.0
    • None
    • None
    • Normal

    Description

      I tested to upgrade an existing cluster to latest 4.0 but it fails with a NullPointerException, I upgraded from 3.0.15 but upgrading from any 3.0.x or 3.11.x to 4.0 will give the same fault.

       
      2018-10-12T11:27:02.261+0200 ERROR [main] CassandraDaemon.java:251 Error while loading schema: 
      java.lang.NullPointerException: null
       at org.apache.cassandra.utils.ByteBufferUtil.string(ByteBufferUtil.java:156)
       at org.apache.cassandra.serializers.AbstractTextSerializer.deserialize(AbstractTextSerializer.java:41)
       at org.apache.cassandra.serializers.AbstractTextSerializer.deserialize(AbstractTextSerializer.java:28)
       at org.apache.cassandra.db.marshal.AbstractType.compose(AbstractType.java:116)
       at org.apache.cassandra.cql3.UntypedResultSet$Row.getString(UntypedResultSet.java:267)
       at org.apache.cassandra.schema.SchemaKeyspace.createTableParamsFromRow(SchemaKeyspace.java:997)
       at org.apache.cassandra.schema.SchemaKeyspace.fetchTable(SchemaKeyspace.java:973)
       at org.apache.cassandra.schema.SchemaKeyspace.fetchTables(SchemaKeyspace.java:927)
       at org.apache.cassandra.schema.SchemaKeyspace.fetchKeyspace(SchemaKeyspace.java:886)
       at org.apache.cassandra.schema.SchemaKeyspace.fetchKeyspacesWithout(SchemaKeyspace.java:877)
       at org.apache.cassandra.schema.SchemaKeyspace.fetchNonSystemKeyspaces(SchemaKeyspace.java:865)
       at org.apache.cassandra.schema.Schema.loadFromDisk(Schema.java:102)
       at org.apache.cassandra.schema.Schema.loadFromDisk(Schema.java:91)
       at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:247)
       at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:590)
       at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:679)
      

       The problem seams to be line 997 in SchemaKeyspace.java

       

      .speculativeWriteThreshold(SpeculativeRetryPolicy.fromString(row.getString("speculative_write_threshold"

      speculative_write_threshold is a new table option introduced in CASSANDRA-14404, when upgrading the table option is missing and we get a NullPointerException on this line.

       

      Attachments

        Issue Links

          Activity

            People

              aweisberg Ariel Weisberg
              tommy_s Tommy Stendahl
              Ariel Weisberg
              Dinesh Joshi
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: