cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tyler Hobbs (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-8786) NullPointerException in ColumnDefinition.hasIndexOption
Date Fri, 20 Feb 2015 17:21:12 GMT


Tyler Hobbs commented on CASSANDRA-8786:

How difficult would it be to write a dtest or unit test for this?

> NullPointerException in ColumnDefinition.hasIndexOption
> -------------------------------------------------------
>                 Key: CASSANDRA-8786
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>         Environment: Cassandra 2.1.2
>            Reporter: Mathijs Vogelzang
>            Assignee: Aleksey Yeschenko
>             Fix For: 2.1.4
>         Attachments: 8786.txt
> We have a Cassandra cluster that we've been using through many upgrades, and thus most
of our column families have originally been created by Thrift. We are on Cassandra 2.1.2 now.
> We've now ported most of our code to use CQL, and our code occasionally tries to recreate
tables with "IF NOT EXISTS" to work properly on development / testing environments.
> When we issue the CQL statement "CREATE INDEX IF NOT EXISTS index ON "tableName" (accountId)"
(this index does exist on that table already), we get a {{DriverInternalError: An unexpected
error occurred server side on cass_host/ java.lang.NullPointerException}}
> The error on the server is:
> {noformat}
>  java.lang.NullPointerException: null
>         at org.apache.cassandra.config.ColumnDefinition.hasIndexOption(
>         at org.apache.cassandra.cql3.statements.CreateIndexStatement.validate(
>         at org.apache.cassandra.cql3.QueryProcessor.processStatement(
>         at org.apache.cassandra.cql3.QueryProcessor.process(
>         at org.apache.cassandra.transport.messages.QueryMessage.execute(
> {noformat}
> This happens every time we run this CQL statement. We've tried to reproduce it in a test
cassandra cluster by creating the table according to the exact "DESCRIBE TABLE" specification,
but then this NullPointerException doesn't happon upon the CREATE INDEX one. So it seems that
the tables on our production cluster (that were originally created through thrift) are still
subtly different schema-wise then a freshly created table according to the same creation statement.

This message was sent by Atlassian JIRA

View raw message