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

Better handling of missing partition columns in system_schema.columns during startup

    XMLWordPrintableJSON

Details

    Description

      Follow up for CASSANDRA-13180, during table deletion/creation, we saw one table having partially deleted columns (no partition column, only regular column). It's blocking node from startup:

      java.lang.AssertionError: null
              at org.apache.cassandra.db.marshal.CompositeType.getInstance(CompositeType.java:103) ~[apache-cassandra-3.0.14.x.jar:3.0.14.x]
              at org.apache.cassandra.config.CFMetaData.rebuild(CFMetaData.java:308) ~[apache-cassandra-3.0.14.x.jar:3.0.14.x]
              at org.apache.cassandra.config.CFMetaData.<init>(CFMetaData.java:288) ~[apache-cassandra-3.0.14.x.jar:3.0.14.x]
              at org.apache.cassandra.config.CFMetaData.create(CFMetaData.java:363) ~[apache-cassandra-3.0.14.x.jar:3.0.14.x]
              at org.apache.cassandra.schema.SchemaKeyspace.fetchTable(SchemaKeyspace.java:1028) ~[apache-cassandra-3.0.14.x.jar:3.0.14.x]
              at org.apache.cassandra.schema.SchemaKeyspace.fetchTables(SchemaKeyspace.java:987) ~[apache-cassandra-3.0.14.x.jar:3.0.14.x]
              at org.apache.cassandra.schema.SchemaKeyspace.fetchKeyspace(SchemaKeyspace.java:945) ~[apache-cassandra-3.0.14.x.jar:3.0.14.x]
              at org.apache.cassandra.schema.SchemaKeyspace.fetchKeyspacesWithout(SchemaKeyspace.java:922) ~[apache-cassandra-3.0.14.x.jar:3.0.14.x]
              at org.apache.cassandra.schema.SchemaKeyspace.fetchNonSystemKeyspaces(SchemaKeyspace.java:910) ~[apache-cassandra-3.0.14.x.jar:3.0.14.x]
              at org.apache.cassandra.config.Schema.loadFromDisk(Schema.java:138) ~[apache-cassandra-3.0.14.x.jar:3.0.14.x]
              at org.apache.cassandra.config.Schema.loadFromDisk(Schema.java:128) ~[apache-cassandra-3.0.14.x.jar:3.0.14.x]
              at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:241) [apache-cassandra-3.0.14.x.jar:3.0.14.x]
              at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:567) [apache-cassandra-3.0.14.x.jar:3.0.14.x]
              at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:695) [apache-cassandra-3.0.14.x.jar:3.0.14.x]
      

      As partition column is mandatory, it should throw MissingColumns, the same as CASSANDRA-13180, so the user is able to cleanup the schema.

      Attachments

        Activity

          People

            jay.zhuang Jay Zhuang
            jay.zhuang Jay Zhuang
            Jay Zhuang
            Aleksey Yeschenko
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: