Zhuqi Jin created CASSANDRA-15794:
-------------------------------------

             Summary: Upgraded C* (4.x) fail to start because of Compact Tables 
& downgraded C* (3.11.4) fail to start because of commit log
                 Key: CASSANDRA-15794
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15794
             Project: Cassandra
          Issue Type: Bug
            Reporter: Zhuqi Jin


We tried to test upgrading a 3.11.4 C* cluster to 4.x and run into the 
following problems. 
 * We started a single 3.11.4 C* node. 
 * We ran cassandra-stress like this

{code:java}
./cassandra-stress write n = 30 -rate threads = 10 -node  172.17.0.2 {code}
 * We stopped this node, and started a C* node running C* compiled from trunk 
(git commit: e394dc0bb32f612a476269010930c617dd1ed3cb)
 * New C* failed to start with the following error message

{code:java}
ERROR [main] 2020-05-07 00:58:18,503 CassandraDaemon.java:245 - Error while 
loading schema: ERROR [main] 2020-05-07 00:58:18,503 CassandraDaemon.java:245 - 
Error while loading schema: 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:965) 
at 
org.apache.cassandra.schema.SchemaKeyspace.fetchTables(SchemaKeyspace.java:924) 
at 
org.apache.cassandra.schema.SchemaKeyspace.fetchKeyspace(SchemaKeyspace.java:883)
 at 
org.apache.cassandra.schema.SchemaKeyspace.fetchKeyspacesWithout(SchemaKeyspace.java:874)
 at 
org.apache.cassandra.schema.SchemaKeyspace.fetchNonSystemKeyspaces(SchemaKeyspace.java:862)
 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:653) 
at 
org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:770)Exception
 (java.lang.IllegalArgumentException) encountered during startup: 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.ERROR [main] 2020-05-07 00:58:18,520 
CassandraDaemon.java:792 - Exception encountered during 
startupjava.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:965) 
at 
org.apache.cassandra.schema.SchemaKeyspace.fetchTables(SchemaKeyspace.java:924) 
at 
org.apache.cassandra.schema.SchemaKeyspace.fetchKeyspace(SchemaKeyspace.java:883)
 at 
org.apache.cassandra.schema.SchemaKeyspace.fetchKeyspacesWithout(SchemaKeyspace.java:874)
 at 
org.apache.cassandra.schema.SchemaKeyspace.fetchNonSystemKeyspaces(SchemaKeyspace.java:862)
 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:653) 
at 
org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:770){code}
 * We stopped the trunk version C* and started the 3.11.4 version C*. 
 * 3.11.4 C* failed to start with the following error messages: 

{code:java}
Exception (java.lang.IllegalStateException) encountered during startup: Unknown 
commitlog version 7Exception (java.lang.IllegalStateException) encountered 
during startup: Unknown commitlog version 7ERROR [main] 2020-05-07 01:13:26,798 
CassandraDaemon.java:749 - Exception encountered during 
startupjava.lang.IllegalStateException: Unknown commitlog version 7 at 
org.apache.cassandra.db.commitlog.CommitLogDescriptor.getMessagingVersion(CommitLogDescriptor.java:227)
 ~[main/:na] at 
org.apache.cassandra.db.commitlog.CommitLogReader.shouldSkipSegmentId(CommitLogReader.java:276)
 ~[main/:na] at 
org.apache.cassandra.db.commitlog.CommitLogReader.readCommitLogSegment(CommitLogReader.java:220)
 ~[main/:na] at 
org.apache.cassandra.db.commitlog.CommitLogReader.readAllFiles(CommitLogReader.java:132)
 ~[main/:na] at 
org.apache.cassandra.db.commitlog.CommitLogReplayer.replayFiles(CommitLogReplayer.java:137)
 ~[main/:na] at 
org.apache.cassandra.db.commitlog.CommitLog.recoverFiles(CommitLog.java:167) 
~[main/:na] at 
org.apache.cassandra.db.commitlog.CommitLog.recoverSegmentsOnDisk(CommitLog.java:148)
 ~[main/:na] at 
org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:324) 
[main/:na] at 
org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:620) 
[main/:na] at 
org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:732) 
[main/:na]
{code}
We manually deleted all new version commit logs and it worked. However, it's 
not obvious whether manually deleting these commit logs are safe. 

 

 

 

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to