cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Yeschenko (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CASSANDRA-10943) NullPointer during LegacySchemaMigrator
Date Wed, 23 Mar 2016 23:27:25 GMT

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

Aleksey Yeschenko edited comment on CASSANDRA-10943 at 3/23/16 11:27 PM:
-------------------------------------------------------------------------

Pushed a patch that simply future-ports {{calculateIsDense}} logic verbatim to 3.0 from 2.1/2.2
and calls the method if {{is_dense}} field is missing from the migrating tables for any reason.
This fixes the potential NPE issue, though there is at least one more related problem with
{{is_dense}}, for Thrift tables that start as dense and get columns added later. I will address
that - with extra tests - in CASSANDRA-11315.


was (Author: iamaleksey):
Pushed a patch that simply backports {{calculateIsDense}} logic verbatim to 3.0 and calls
the method if {{is_dense}} field is missing from the migrating tables for any reason. This
fixes the potential NPE issue, though there is at least one more related problem with {{is_dense}},
for Thrift tables that start as dense and get columns added later. I will address that - with
extra tests - in CASSANDRA-11315.

> NullPointer during LegacySchemaMigrator
> ---------------------------------------
>
>                 Key: CASSANDRA-10943
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10943
>             Project: Cassandra
>          Issue Type: Bug
>         Environment: Debian Jessie
> java version "1.8.0_66"
> Cassandra 2.2.4 -> 3.1.1 migration
>            Reporter: Stephan Wienczny
>            Assignee: Aleksey Yeschenko
>            Priority: Minor
>             Fix For: 3.0.x, 3.x
>
>         Attachments: 10943.txt
>
>
> I'm trying to upgrade my Cassandra cluster  from 2.2.4 to 3.1.1.
> I used
> {quote}
> nodetool upgradesstables
> nodetool drain
> {quote}
> before upgrading.  
> The result is this:
> {quote}
> INFO  [main] 2015-12-26 22:41:44,114 SystemKeyspace.java:1284 - Detected version upgrade
from 2.2.4 to 3.1.1, snapshotting system keyspace
> WARN  [main] 2015-12-26 22:41:44,318 CompressionParams.java:382 - The sstable_compression
option has been deprecated. You should use class instead
> ERROR [main] 2015-12-26 22:41:44,427 CassandraDaemon.java:690 - Exception encountered
during startup
> java.lang.NullPointerException: null
> 	at org.apache.cassandra.serializers.BooleanSerializer.deserialize(BooleanSerializer.java:33)
~[apache-cassandra-3.1.1.jar:3.1.1]
> 	at org.apache.cassandra.serializers.BooleanSerializer.deserialize(BooleanSerializer.java:24)
~[apache-cassandra-3.1.1.jar:3.1.1]
> 	at org.apache.cassandra.db.marshal.AbstractType.compose(AbstractType.java:114) ~[apache-cassandra-3.1.1.jar:3.1.1]
> 	at org.apache.cassandra.cql3.UntypedResultSet$Row.getBoolean(UntypedResultSet.java:272)
~[apache-cassandra-3.1.1.jar:3.1.1]
> 	at org.apache.cassandra.schema.LegacySchemaMigrator.decodeTableMetadata(LegacySchemaMigrator.java:264)
~[apache-cassandra-3.1.1.jar:3.1.1]
> 	at org.apache.cassandra.schema.LegacySchemaMigrator.readTableMetadata(LegacySchemaMigrator.java:250)
~[apache-cassandra-3.1.1.jar:3.1.1]
> 	at org.apache.cassandra.schema.LegacySchemaMigrator.readTable(LegacySchemaMigrator.java:221)
~[apache-cassandra-3.1.1.jar:3.1.1]
> 	at org.apache.cassandra.schema.LegacySchemaMigrator.lambda$readTables$218(LegacySchemaMigrator.java:214)
~[apache-cassandra-3.1.1.jar:3.1.1]
> 	at java.util.ArrayList.forEach(ArrayList.java:1249) ~[na:1.8.0_66]
> 	at org.apache.cassandra.schema.LegacySchemaMigrator.readTables(LegacySchemaMigrator.java:214)
~[apache-cassandra-3.1.1.jar:3.1.1]
> 	at org.apache.cassandra.schema.LegacySchemaMigrator.readKeyspace(LegacySchemaMigrator.java:163)
~[apache-cassandra-3.1.1.jar:3.1.1]
> 	at org.apache.cassandra.schema.LegacySchemaMigrator.lambda$readSchema$215(LegacySchemaMigrator.java:154)
~[apache-cassandra-3.1.1.jar:3.1.1]
> 	at java.util.ArrayList.forEach(ArrayList.java:1249) ~[na:1.8.0_66]
> 	at org.apache.cassandra.schema.LegacySchemaMigrator.readSchema(LegacySchemaMigrator.java:154)
~[apache-cassandra-3.1.1.jar:3.1.1]
> 	at org.apache.cassandra.schema.LegacySchemaMigrator.migrate(LegacySchemaMigrator.java:77)
~[apache-cassandra-3.1.1.jar:3.1.1]
> 	at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:223) [apache-cassandra-3.1.1.jar:3.1.1]
> 	at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:549) [apache-cassandra-3.1.1.jar:3.1.1]
> 	at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:677) [apache-cassandra-3.1.1.jar:3.1.1]
> {quote}



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

Mime
View raw message