cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sam Tunnicliffe (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-10966) guard against legacy migration failure due to non-existent index name
Date Tue, 05 Jan 2016 09:18:39 GMT

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

Sam Tunnicliffe commented on CASSANDRA-10966:
---------------------------------------------

I'm pretty sure that it's guaranteed that any legacy column metadata with an index type will
have a name, so the likelihood of hitting the NPE is not high. That said, it doesn't hurt
to add the guard, noting that we don't need similar for the index options as nulls there are
handled when the new metadata is constructed. 

So +1 modulo a few nits that can be fixed on commit:
* The declaration of {{indexName}} can be moved inside the if & combined with assignment
* Incorrect placement of braces
* Whitespace errors (mix of tabs & spaces for indents)

> guard against legacy migration failure due to non-existent index name
> ---------------------------------------------------------------------
>
>                 Key: CASSANDRA-10966
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10966
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Distributed Metadata
>            Reporter: Dave Brosius
>            Assignee: Dave Brosius
>            Priority: Trivial
>             Fix For: 3.x
>
>         Attachments: 10966.txt
>
>
> code checks for whether an index has a name, but then blindly goes ahead and tries creates
the index regardless. That would cause an NPE. 
> Simple guard against that.



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

Mime
View raw message