cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jorge Bay (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-9411) Bound statement executions fail after adding a collection-type column
Date Thu, 21 May 2015 15:08:17 GMT


Jorge Bay commented on CASSANDRA-9411:

Server stack trace using C* 2.0.13:
ERROR [Native-Transport-Requests:53] 2015-05-21 17:04:10,840 (line 231)
Unexpected exception during request
java.lang.ArrayIndexOutOfBoundsException: 2
	at org.apache.cassandra.cql3.statements.ColumnGroupMap.add(
	at org.apache.cassandra.cql3.statements.ColumnGroupMap.access$200(
	at org.apache.cassandra.cql3.statements.ColumnGroupMap$Builder.add(
	at org.apache.cassandra.cql3.statements.SelectStatement.processColumnFamily(
	at org.apache.cassandra.cql3.statements.SelectStatement.process(
	at org.apache.cassandra.cql3.statements.SelectStatement.processResults(
	at org.apache.cassandra.cql3.statements.SelectStatement.execute(
	at org.apache.cassandra.cql3.statements.SelectStatement.execute(
	at org.apache.cassandra.cql3.QueryProcessor.processStatement(
	at org.apache.cassandra.cql3.QueryProcessor.processPrepared(
	at org.apache.cassandra.transport.messages.ExecuteMessage.execute(
	at org.apache.cassandra.transport.Message$Dispatcher.messageReceived(
	at org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.doRun(
	at java.util.concurrent.ThreadPoolExecutor.runWorker(
	at java.util.concurrent.ThreadPoolExecutor$

> Bound statement executions fail after adding a collection-type column
> ---------------------------------------------------------------------
>                 Key: CASSANDRA-9411
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>         Environment: Cassandra 2.0.13.
> OS X 10.9
>            Reporter: Jorge Bay
>            Assignee: Benjamin Lerer
>             Fix For: 2.0.x
> After adding a collection-type column to an existing table, executions of statements
that are already prepared result in server error (error code 0), with the error message {{java.lang.ArrayIndexOutOfBoundsException}}.
> To reproduce it.
> {code:java}
> session.execute("CREATE TABLE tbl1 (a text, b text, c text, PRIMARY KEY (a, b))");
> //prepare initially
> PreparedStatement ps = session.prepare("SELECT a, b, c FROM tbl1");
> //insert some data
> session.execute("INSERT INTO tbl1 (a, b, c) VALUES ('a1', 'b1', 'c1')");
> //Executes successfully as expected
> session.execute(ps.bind());
> //Add a column of a collection type
> session.execute("ALTER TABLE tbl1 ADD d set<text>");
> //All following executions fail
> session.execute(ps.bind());
> {code}
> Some notes:
> - This only occurs for SELECT with fields (not with SELECT *)
> - This only occurs with C* 2.0. Probably because CASSANDRA-7910 was applied for 2.1+
> - This only occurs if the column added is a collection type (list / set / map)
> - This occurs with all SELECT statements using that column family, that were already
> Repreparing it on all hosts fixes the issue, but for that, the user should normally restart
existing application (even if the existing apps/apps versions don't handle this new field).

This message was sent by Atlassian JIRA

View raw message