Issue while migrating from Apache cassandra 3.11.4 to 4.0 beta version

891 Views Asked by At

I am facing an issue while cassandra migration from 3.11.4 to 4.0 beta version in my development system.

ERROR [main] 2020-07-31 15:34:36,099 CassandraDaemon.java:800 - Exception encountered during startup
java.lang.IllegalArgumentException: Compact Tables are not allowed in Cassandra starting with 4.0 version. Use `ALTER ... DROP COMPACT STORAGE` command supplied in 3.x/3.11 Cassandra in order to migrate off Compact Storage.
        at org.apache.cassandra.schema.SchemaKeyspace.fetchTable(SchemaKeyspace.java:960)
        at org.apache.cassandra.schema.SchemaKeyspace.fetchTables(SchemaKeyspace.java:919)
        at org.apache.cassandra.schema.SchemaKeyspace.fetchKeyspace(SchemaKeyspace.java:878)
        at org.apache.cassandra.schema.SchemaKeyspace.fetchKeyspacesWithout(SchemaKeyspace.java:869)
        at org.apache.cassandra.schema.SchemaKeyspace.fetchNonSystemKeyspaces(SchemaKeyspace.java:857)
        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:241)
        at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:661)
        at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:778)

Error says to remove COMPACT STORAGE , but in my database there are no table with COMPACT STORAGE enabled. Please suggest any solution!!

1

There are 1 best solutions below

1
On

As the exception suggests, you have one or more tables that is still using the deprecated Thrift storage format even if you don't know about it.

Try this (rough-and-simple) command:

$ cqlsh <node_ip> -e "DESCRIBE FULL SCHEMA" | egrep "CREATE TABLE|COMPACT STORAGE"

This will list all the tables in your cluster and will indicate if any of them still have compact storage support. You will need to modify it accordingly to include DB credentials if you have authentication enabled. Cheers!