You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Sylvain Lebresne (Updated) (JIRA)" <ji...@apache.org> on 2012/01/03 19:48:39 UTC

[jira] [Updated] (CASSANDRA-3691) LeveledCompactionStrategy is broken because of generation pre-allocation in LeveledManifest.

     [ https://issues.apache.org/jira/browse/CASSANDRA-3691?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sylvain Lebresne updated CASSANDRA-3691:
----------------------------------------

    Attachment: 3691.patch

Oops, missed this one. Patch attached to fix.
                
> LeveledCompactionStrategy is broken because of generation pre-allocation in LeveledManifest.
> --------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-3691
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3691
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1
>            Reporter: Pavel Yaskevich
>         Attachments: 3691.patch
>
>
> LeveledManifest constructor has the following code:
> {code}
> for (int i = 0; i < generations.length; i++)
> {
>     generations[i] = new ArrayList<SSTableReader>();
>     lastCompactedKeys[i] = new DecoratedKey(cfs.partitioner.getMinimumToken(), null);
> }
> {code}
> But in the DecoratedKey constructor we have:
> {code}
> assert token != null && key != null && key.remaining() > 0;
> {code}
> so when you tried to create a CF with LeveledCompressionStrategy that will result in 
> {noformat}
> java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
> 	at org.apache.cassandra.thrift.CassandraServer.applyMigrationOnStage(CassandraServer.java:865)
> 	at org.apache.cassandra.thrift.CassandraServer.system_add_keyspace(CassandraServer.java:953)
> 	at org.apache.cassandra.thrift.Cassandra$Processor$system_add_keyspace.process(Cassandra.java:4103)
> 	at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:3078)
> 	at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:188)
> 	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:680)
> Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
> 	at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
> 	at java.util.concurrent.FutureTask.get(FutureTask.java:83)
> 	at org.apache.cassandra.thrift.CassandraServer.applyMigrationOnStage(CassandraServer.java:857)
> 	... 7 more
> Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
> 	at org.apache.cassandra.config.CFMetaData.createCompactionStrategyInstance(CFMetaData.java:770)
> 	at org.apache.cassandra.db.ColumnFamilyStore.<init>(ColumnFamilyStore.java:209)
> 	at org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:300)
> 	at org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:281)
> 	at org.apache.cassandra.db.Table.initCf(Table.java:339)
> 	at org.apache.cassandra.db.Table.<init>(Table.java:288)
> 	at org.apache.cassandra.db.Table.open(Table.java:117)
> 	at org.apache.cassandra.db.migration.AddKeyspace.applyModels(AddKeyspace.java:72)
> 	at org.apache.cassandra.db.migration.Migration.apply(Migration.java:156)
> 	at org.apache.cassandra.thrift.CassandraServer$2.call(CassandraServer.java:850)
> 	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> 	... 3 more
> Caused by: java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> 	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> 	at org.apache.cassandra.config.CFMetaData.createCompactionStrategyInstance(CFMetaData.java:752)
> 	... 14 more
> Caused by: java.lang.AssertionError
> 	at org.apache.cassandra.db.DecoratedKey.<init>(DecoratedKey.java:55)
> 	at org.apache.cassandra.db.compaction.LeveledManifest.<init>(LeveledManifest.java:79)
> 	at org.apache.cassandra.db.compaction.LeveledManifest.create(LeveledManifest.java:85)
> 	at org.apache.cassandra.db.compaction.LeveledCompactionStrategy.<init>(LeveledCompactionStrategy.java:74)
> 	... 19 more
> ERROR 19:52:44,029 Fatal exception in thread Thread[MigrationStage:1,5,main]
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira