cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Petrov (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CASSANDRA-13920) Altering COMPACT STORAGE w/o clustering keys table causes an exception
Date Fri, 29 Sep 2017 16:24:00 GMT
Alex Petrov created CASSANDRA-13920:
---------------------------------------

             Summary: Altering COMPACT STORAGE w/o clustering keys table causes an exception
                 Key: CASSANDRA-13920
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-13920
             Project: Cassandra
          Issue Type: Bug
            Reporter: Alex Petrov
            Priority: Minor


When trying to {{ALTER}} a {{COMPACT TABLE}} without clustering keys (i.e. non-dense one),
you'll get an exception.

Alter'ing non-dense compact tables should be forbidden, just as altering dense columns which
throws {{Cannot add new column to a COMPACT STORAGE table}} (or the error message should be
adjusted).

dtest to reproduce:
{code}
from cql_tests import CQLTester

class StorageProxyCQLTester(CQLTester):
    def test_sparse_compact(self):
        session = self.prepare(nodes=2, rf=2)
        session.execute("CREATE TABLE sparse_compact_table (k int PRIMARY KEY, v1 int, v2
int) WITH COMPACT STORAGE;")
        session.execute("ALTER TABLE sparse_compact_table ADD wat int",)
{code}

Exception:
{code}
java.lang.AssertionError: null
        at org.apache.cassandra.db.CompactTables.getCompactValueColumn(CompactTables.java:67)
~[main/:na]
        at org.apache.cassandra.config.CFMetaData.rebuild(CFMetaData.java:337) ~[main/:na]
        at org.apache.cassandra.config.CFMetaData.validate(CFMetaData.java:935) ~[main/:na]
        at org.apache.cassandra.service.MigrationManager.announceColumnFamilyUpdate(MigrationManager.java:421)
~[main/:na]
        at org.apache.cassandra.cql3.statements.AlterTableStatement.announceMigration(AlterTableStatement.java:288)
~[main/:na]
        at org.apache.cassandra.cql3.statements.SchemaAlteringStatement.execute(SchemaAlteringStatement.java:93)
~[main/:na]
        at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:206)
~[main/:na]
        at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:237) ~[main/:na]
        at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:222) ~[main/:na]
        at org.apache.cassandra.transport.messages.QueryMessage.execute(QueryMessage.java:115)
~[main/:na]
        at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:513)
[main/:na]
        at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:407)
[main/:na]
        at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
[netty-all-4.0.44.Final.jar:4.0.44.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:357)
[netty-all-4.0.44.Final.jar:4.0.44.Final]
        at io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:35)
[netty-all-4.0.44.Final.jar:4.0.44.Final]
        at io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:348)
[netty-all-4.0.44.Final.jar:4.0.44.Final]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_121]
        at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:164)
[main/:na]
        at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:105) [main/:na]
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121]
{code}




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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


Mime
View raw message