cassandra-commits mailing list archives

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

    [ https://issues.apache.org/jira/browse/CASSANDRA-9411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14554382#comment-14554382
] 

Jorge Bay edited comment on CASSANDRA-9411 at 5/21/15 3:06 PM:
---------------------------------------------------------------

Server Stack trace, C* 2.0.11: 
{code}
ERROR [Native-Transport-Requests:53] 2015-05-21 16:49:24,657 ErrorMessage.java (line 230)
Unexpected exception during request
java.lang.ArrayIndexOutOfBoundsException: 2
	at org.apache.cassandra.cql3.statements.ColumnGroupMap.add(ColumnGroupMap.java:48)
	at org.apache.cassandra.cql3.statements.ColumnGroupMap.access$200(ColumnGroupMap.java:32)
	at org.apache.cassandra.cql3.statements.ColumnGroupMap$Builder.add(ColumnGroupMap.java:140)
	at org.apache.cassandra.cql3.statements.SelectStatement.processColumnFamily(SelectStatement.java:1176)
	at org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:1079)
	at org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:285)
	at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:241)
	at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:65)
	at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:158)
	at org.apache.cassandra.cql3.QueryProcessor.processPrepared(QueryProcessor.java:309)
	at org.apache.cassandra.transport.messages.ExecuteMessage.execute(ExecuteMessage.java:132)
	at org.apache.cassandra.transport.Message$Dispatcher.messageReceived(Message.java:321)
	at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
	at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
	at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
	at org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.doRun(ChannelUpstreamEventRunnable.java:43)
	at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:67)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
{code}


was (Author: jorgebg):
Server Stack trace: 
{code}
ERROR [Native-Transport-Requests:53] 2015-05-21 16:49:24,657 ErrorMessage.java (line 230)
Unexpected exception during request
java.lang.ArrayIndexOutOfBoundsException: 2
	at org.apache.cassandra.cql3.statements.ColumnGroupMap.add(ColumnGroupMap.java:48)
	at org.apache.cassandra.cql3.statements.ColumnGroupMap.access$200(ColumnGroupMap.java:32)
	at org.apache.cassandra.cql3.statements.ColumnGroupMap$Builder.add(ColumnGroupMap.java:140)
	at org.apache.cassandra.cql3.statements.SelectStatement.processColumnFamily(SelectStatement.java:1176)
	at org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:1079)
	at org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:285)
	at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:241)
	at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:65)
	at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:158)
	at org.apache.cassandra.cql3.QueryProcessor.processPrepared(QueryProcessor.java:309)
	at org.apache.cassandra.transport.messages.ExecuteMessage.execute(ExecuteMessage.java:132)
	at org.apache.cassandra.transport.Message$Dispatcher.messageReceived(Message.java:321)
	at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
	at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
	at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
	at org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.doRun(ChannelUpstreamEventRunnable.java:43)
	at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:67)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
{code}

> Bound statement executions fail after adding a collection-type column
> ---------------------------------------------------------------------
>
>                 Key: CASSANDRA-9411
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9411
>             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
prepared.
> 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
(v6.3.4#6332)

Mime
View raw message