You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Bill de hOra (JIRA)" <ji...@apache.org> on 2009/08/11 13:01:14 UTC

[jira] Issue Comment Edited: (CASSANDRA-358) SystemTable.initMetadata throws an NPE when called twice

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

Bill de hOra edited comment on CASSANDRA-358 at 8/11/09 4:00 AM:
-----------------------------------------------------------------

This thing really didn't want to be called twice in a running jvm. 

Changed to add 3 states

 * called and no LocationInfo CF - create it (as per current code)
 * called and LocationInfo CF found but no - bump generation it (as per current code)
 * called and LocationInfo CF found but we know it was just created - return the available LocationInfo CF  data as is

The NPE happens I think because the query filter doesn't include the token in its columns (generation included and found but not token). Even then you still need to know whether it's a restart or a new create so the first minted token is stashed in a static, which is how it knows LocationInfo CF has been created in this jvm runtime.

      was (Author: dehora):
    This thing really didn't want to be called twice in a running jvm. 

Changed to add 3 states

 * called and no LocationInfo CF - create it (as per current code)
 * called and LocationInfo CF found but no - bump generation it (as per current code)
 * called and LocationInfo CF found but we know it was just created - return the available LocationInfo CF  data as is

The NPE happens I think because the query filter doesn't include the token in its columns (generation included and found but not token). Even then you still need to know whether it's a restart or a new create so the first minted token is stashed in a static, which is how know it's just been created in this jvm runtime.
  
> SystemTable.initMetadata throws an NPE when called twice
> --------------------------------------------------------
>
>                 Key: CASSANDRA-358
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-358
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Jeff Hodges
>         Attachments: 358-3.patch
>
>
> While this is not the expected use case of it, SystemTable.initMetadata throws an NPE when called twice in the same process.  The error points to tokenColumn being null even through cf is not at line 111.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.