Ryan McGuire created CASSANDRA-5343:
---------------------------------------
Summary: 1.2 creates LZ4 compressed users table which is
incompatible in mixed 1.2/1.1 cluster
Key: CASSANDRA-5343
URL: https://issues.apache.org/jira/browse/CASSANDRA-5343
Project: Cassandra
Issue Type: Bug
Affects Versions: 1.1.9
Reporter: Ryan McGuire
* Start with a 3 node 1.1.9 cluster.
* Take down node1, replace with 1.2.2.
* Bring node1 back up, the cluster now has mixed versions.
When node1 comes up, it tries to create a new keyspace: system_auth, which
looks like this:
{code}
CREATE KEYSPACE system_auth WITH replication = {
'class': 'SimpleStrategy',
'replication_factor': '1'
};
USE system_auth;
CREATE TABLE users (
name text PRIMARY KEY,
super boolean
) WITH
bloom_filter_fp_chance=0.010000 AND
caching='KEYS_ONLY' AND
comment='' AND
dclocal_read_repair_chance=0.000000 AND
gc_grace_seconds=7776000 AND
read_repair_chance=0.100000 AND
replicate_on_write='true' AND
populate_io_cache_on_flush='false' AND
compaction={'class': 'SizeTieredCompactionStrategy'} AND
compression={'sstable_compression': 'LZ4Compressor'};
{code}
The system_auth.users table is using *LZ4Compressor* which does not work with
the 1.1.9 nodes. The 1.1.9 nodes return this error in the logs:
{code}
ERROR [MigrationStage:1] 2013-03-13 15:24:44,246 AbstractCassandraDaemon.java
(line 135) Exception in thread Thread[MigrationStage:1,5,main]
java.lang.RuntimeException: org.apache.cassandra.config.ConfigurationException:
Could not create Compression for type
org.apache.cassandra.io.compress.LZ4Compressor
at
org.apache.cassandra.config.CFMetaData.fromSchemaNoColumns(CFMetaData.java:1234)
at
org.apache.cassandra.config.CFMetaData.fromSchema(CFMetaData.java:1247)
at
org.apache.cassandra.config.KSMetaData.deserializeColumnFamilies(KSMetaData.java:299)
at
org.apache.cassandra.db.DefsTable.mergeColumnFamilies(DefsTable.java:462)
at org.apache.cassandra.db.DefsTable.mergeSchema(DefsTable.java:374)
at
org.apache.cassandra.db.DefsTable.mergeRemoteSchema(DefsTable.java:352)
at
org.apache.cassandra.db.DefinitionsUpdateVerbHandler$1.runMayThrow(DefinitionsUpdateVerbHandler.java:48)
at
org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.cassandra.config.ConfigurationException: Could not create
Compression for type org.apache.cassandra.io.compress.LZ4Compressor
at
org.apache.cassandra.io.compress.CompressionParameters.parseCompressorClass(CompressionParameters.java:141)
at
org.apache.cassandra.io.compress.CompressionParameters.<init>(CompressionParameters.java:70)
at
org.apache.cassandra.io.compress.CompressionParameters.create(CompressionParameters.java:63)
at
org.apache.cassandra.config.CFMetaData.fromSchemaNoColumns(CFMetaData.java:1224)
... 13 more
Caused by: java.lang.ClassNotFoundException:
org.apache.cassandra.io.compress.LZ4Compressor
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at
org.apache.cassandra.io.compress.CompressionParameters.parseCompressorClass(CompressionParameters.java:137)
... 16 more
ERROR [ReadStage:33] 2013-03-13 15:24:54,319 AbstractCassandraDaemon.java (line
135) Exception in thread Thread[ReadStage:33,5,main]
java.lang.RuntimeException: java.lang.IllegalArgumentException: Unknown
table/cf pair (system_auth.users)
at
org.apache.cassandra.service.RangeSliceVerbHandler.doVerb(RangeSliceVerbHandler.java:71)
at
org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:59)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalArgumentException: Unknown table/cf pair
(system_auth.users)
at org.apache.cassandra.db.Table.getColumnFamilyStore(Table.java:159)
at
org.apache.cassandra.service.RangeSliceVerbHandler.executeLocally(RangeSliceVerbHandler.java:44)
at
org.apache.cassandra.service.RangeSliceVerbHandler.doVerb(RangeSliceVerbHandler.java:63)
... 4 more
{code}
It appears that this means that the table creation failed on the 1.1.9 nodes.
>From the 1.2.2 cluster:
{code}
cqlsh> DESCRIBE KEYSPACE system_auth ;
CREATE KEYSPACE system_auth WITH replication = {
'class': 'SimpleStrategy',
'replication_factor': '1'
};
USE system_auth;
CqlTableDef instance has no attribute 'key_aliases'
{code}
No mention of the users table.
I know that schema changes in mixed version 1.1/1.2 clusters are not supported,
but this table is not one that the user tried to create, it was created
automatically on startup.
h2. Steps to reproduce:
{code}
ccm create -v 1.1.9 1.1.9
ccm populate -n 3
ccm start
ccm node1 stress
ccm node1 stop
{code}
edit ~/.ccm/1.1.9/cluster.conf and configure cassandra_dir to point to 1.2.2.
Edit node1's cassandra.yaml to be 1.2 compliant.
{code}
ccm node1 start
{code}
At this point check node2's log file for the exception.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira