cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Hust (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-10434) Problem upgrading to 3.0 with UDA
Date Wed, 07 Oct 2015 21:28:27 GMT

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

Andrew Hust commented on CASSANDRA-10434:
-----------------------------------------

Confirmed patch fixes issue with exception post upgrade and UDA performs as expected post
upgrade.  Once this has been merged I'll update the upgrading dtest to include UDA's in setup
and verification.

Ran with:
apache/cassandra-2.2 {{be89dae3ecfd98b2170732c45d7f95807d5c19af}}
snazy/10434-uda-migration-3.0 {{b83a088f252e906faa9924def8e24997e072c109}}

> Problem upgrading to 3.0 with UDA
> ---------------------------------
>
>                 Key: CASSANDRA-10434
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10434
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Sylvain Lebresne
>            Assignee: Robert Stupp
>             Fix For: 3.0.0 rc2
>
>
> Copy-pasting from [~nutbunnies] comment on CASSANDRA-9756:
> {quote}
> upgrading from 2.2 to 3.0 with a UDA defined will throw the exception below and fail
to start when upgraded to 3.0.
> Used:
> 2.2: {{ae9b7e05222b2a25eda5618cf9eb17103e4d6d8b}}
> 3.0: {{5c2912d1ce95aacdacb59ccc840b12cd9aa0c8f8}}
> {noformat}
> org.apache.cassandra.exceptions.UnrecognizedEntityException: Undefined name function_name
in where clause ('function_name = ?')
>         at org.apache.cassandra.cql3.Relation.toColumnDefinition(Relation.java:259) ~[main/:na]
>         at org.apache.cassandra.cql3.SingleColumnRelation.newEQRestriction(SingleColumnRelation.java:160)
~[main/:na]
>         at org.apache.cassandra.cql3.Relation.toRestriction(Relation.java:137) ~[main/:na]
>         at org.apache.cassandra.cql3.restrictions.StatementRestrictions.<init>(StatementRestrictions.java:151)
~[main/:na]
>         at org.apache.cassandra.cql3.statements.SelectStatement$RawStatement.prepareRestrictions(SelectStatement.java:817)
~[main/:na]
>         at org.apache.cassandra.cql3.statements.SelectStatement$RawStatement.prepare(SelectStatement.java:764)
~[main/:na]
>         at org.apache.cassandra.cql3.statements.SelectStatement$RawStatement.prepare(SelectStatement.java:752)
~[main/:na]
>         at org.apache.cassandra.cql3.QueryProcessor.getStatement(QueryProcessor.java:504)
~[main/:na]
>         at org.apache.cassandra.cql3.QueryProcessor.parseStatement(QueryProcessor.java:241)
~[main/:na]
>         at org.apache.cassandra.cql3.QueryProcessor.executeOnceInternal(QueryProcessor.java:336)
~[main/:na]
>         at org.apache.cassandra.schema.LegacySchemaMigrator.query(LegacySchemaMigrator.java:882)
~[main/:na]
>         at org.apache.cassandra.schema.LegacySchemaMigrator.readAggregateMetadata(LegacySchemaMigrator.java:849)
~[main/:na]
>         at org.apache.cassandra.schema.LegacySchemaMigrator.readAggregate(LegacySchemaMigrator.java:830)
~[main/:na]
>         at org.apache.cassandra.schema.LegacySchemaMigrator.lambda$readAggregates$216(LegacySchemaMigrator.java:823)
~[main/:na]
>         at java.lang.Iterable.forEach(Iterable.java:75) ~[na:1.8.0_60]
>         at org.apache.cassandra.schema.LegacySchemaMigrator.readAggregates(LegacySchemaMigrator.java:823)
~[main/:na]
>         at org.apache.cassandra.schema.LegacySchemaMigrator.readKeyspace(LegacySchemaMigrator.java:166)
~[main/:na]
>         at org.apache.cassandra.schema.LegacySchemaMigrator.lambda$readSchema$207(LegacySchemaMigrator.java:154)
~[main/:na]
>         at java.util.ArrayList.forEach(ArrayList.java:1249) ~[na:1.8.0_60]
>         at org.apache.cassandra.schema.LegacySchemaMigrator.readSchema(LegacySchemaMigrator.java:154)
~[main/:na]
>         at org.apache.cassandra.schema.LegacySchemaMigrator.migrate(LegacySchemaMigrator.java:77)
~[main/:na]
>         at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:223)
[main/:na]
>         at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:542)
[main/:na]
>         at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:668)
[main/:na]
> {noformat}
> Can be reproduced with:
> {noformat}
> ccm stop
> ccm remove uda_upgrade
> ccm create -n 1 -v git:cassandra-2.2 uda_upgrade
> ccm updateconf 'enable_user_defined_functions: true'
> ccm start
> cat << EOF | ccm node1 cqlsh
> create keyspace ks WITH replication = {'class': 'SimpleStrategy', 'replication_factor':
1};
> USE ks;
> CREATE FUNCTION func_1(current int, candidate int)
>             CALLED ON NULL INPUT
>             RETURNS int LANGUAGE java AS
>             'if (current == null) return candidate; else return Math.max(current, candidate);';
> CREATE AGGREGATE agg_1(int)
>             SFUNC func_1
>             STYPE int
>             INITCOND null;
> EOF
> sleep 10
> echo "Draining all nodes"
> ccm node1 nodetool drain
> ccm stop
> echo "Upgrading to git:cassandra-3.0"
> ccm setdir -v git:cassandra-3.0
> ccm start
> echo "Sleeping for version migrations"
> sleep 15
> ccm checklogerror
> ccm stop
> {noformat}
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message