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

Eric Evans commented on CASSANDRA-4227:
---------------------------------------

I reverted this.

I'm not sure which patch Jonathan was +1'ing, but the what was committed here 
wasn't from either.

I don't think the test for version < VERSION_12 should be removed.  A null 
hostid is "normal" when the node is pre-1.2 (as would be the case during a 
rolling upgrade).  I can't foresee a reason that it would be null otherwise, it 
would represent a much more serious error and shouldn't be swept away with a 
WARN message.

Also, Jonathan wanted to see something added to NEWS.  The second bullet point 
under "Upgrading" for 1.2 already mentions this, but it would probably be 
better to strengthen that wording with a recommendation to only upgrade when 
all nodes are up.
                
> StorageProxy throws NPEs for when there's no hostids for a target
> -----------------------------------------------------------------
>
>                 Key: CASSANDRA-4227
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4227
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Dave Brosius
>            Priority: Trivial
>             Fix For: 1.2
>
>         Attachments: 4227_drop_hints.txt, 
> 4227_guard_against_npes_for_old_gossip_versions.diff
>
>
> On trunk...
> if there is no host id due to an old node, an info log is generated, but the 
> code continues to use the null host id causing NPEs in decompose... Should 
> this bypass this code, or perhaps can the plain ip address be used in this 
> case? don't know.
> as follows...
>                     UUID hostId = 
> StorageService.instance.getTokenMetadata().getHostId(target);
>                     if ((hostId == null) && 
> (Gossiper.instance.getVersion(target) < MessagingService.VERSION_12))
>                         logger.info("Unable to store hint for host with 
> missing ID, {} (old node?)", target.toString());
>                     RowMutation hintedMutation = 
> RowMutation.hintFor(mutation, ByteBuffer.wrap(UUIDGen.decompose(hostId)));
>                     hintedMutation.apply();

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to