You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Dave Brosius (JIRA)" <ji...@apache.org> on 2012/05/09 06:05:12 UTC

[jira] [Created] (CASSANDRA-4227) StorageProxy throws NPEs for when there's no hostids for a target

Dave Brosius created CASSANDRA-4227:
---------------------------------------

             Summary: 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


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

        

[jira] [Resolved] (CASSANDRA-4227) StorageProxy throws NPEs for when there's no hostids for a target

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Evans resolved CASSANDRA-4227.
-----------------------------------

    Resolution: Fixed
      Assignee: Eric Evans

committed with assertion and additional NEWS.txt recommendation.
                
> 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
>            Assignee: Eric Evans
>            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

        

[jira] [Updated] (CASSANDRA-4227) StorageProxy throws NPEs for when there's no hostids for a target

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Evans updated CASSANDRA-4227:
----------------------------------

    Attachment: 4227_drop_hints.txt
    
> 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

        

[jira] [Commented] (CASSANDRA-4227) StorageProxy throws NPEs for when there's no hostids for a target

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13281249#comment-13281249 ] 

Jonathan Ellis commented on CASSANDRA-4227:
-------------------------------------------

Hints are supposed to be reliable now, which I expect will lead more people to turn off read repair.  Which is a long way of saying I think we should
- log the message at WARN
- add a note to NEWS that you should upgrade when all nodes are up to minimize this

+1 otherwise.
                
> 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

        

[jira] [Updated] (CASSANDRA-4227) StorageProxy throws NPEs for when there's no hostids for a target

Posted by "Dave Brosius (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dave Brosius updated CASSANDRA-4227:
------------------------------------

    Attachment: 4227_guard_against_npes_for_old_gossip_versions.diff

against trunk
                
> 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_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

        

[jira] [Commented] (CASSANDRA-4227) StorageProxy throws NPEs for when there's no hostids for a target

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
    [ 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

        

[jira] [Commented] (CASSANDRA-4227) StorageProxy throws NPEs for when there's no hostids for a target

Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13281049#comment-13281049 ] 

Brandon Williams commented on CASSANDRA-4227:
---------------------------------------------

I believe the more common situation is you're in the process of upgrading to 1.2 and have a mixed cluster, but need to generate a hint for an older version that hasn't generated a nodeid yet.
                
> 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_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

        

[jira] [Updated] (CASSANDRA-4227) StorageProxy throws NPEs for when there's no hostids for a target

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Evans updated CASSANDRA-4227:
----------------------------------

    Reviewer: jbellis
    
> 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
>            Assignee: Eric Evans
>            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

        

[jira] [Commented] (CASSANDRA-4227) StorageProxy throws NPEs for when there's no hostids for a target

Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271448#comment-13271448 ] 

Brandon Williams commented on CASSANDRA-4227:
---------------------------------------------

We should just drop the hint in this case, see CASSANDRA-4120
                
> 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
>
> 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

        

[jira] [Reopened] (CASSANDRA-4227) StorageProxy throws NPEs for when there's no hostids for a target

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Evans reopened CASSANDRA-4227:
-----------------------------------

    
> 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

        

[jira] [Commented] (CASSANDRA-4227) StorageProxy throws NPEs for when there's no hostids for a target

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13281030#comment-13281030 ] 

Jonathan Ellis commented on CASSANDRA-4227:
-------------------------------------------

So the situation is, I've upgraded to 1.2 so I'm supposed to have node IDs, but one of the nodes starts slower than the others (for instance) so it hasn't broadcast its nodeid to the rest of the cluster yet?
                
> 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_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

        

[jira] [Commented] (CASSANDRA-4227) StorageProxy throws NPEs for when there's no hostids for a target

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13281382#comment-13281382 ] 

Jonathan Ellis commented on CASSANDRA-4227:
-------------------------------------------

Sorry for the confusion, I was +1ing the 2nd patch.

I'm okay with NPEing if we have a null host on version 12, since that's Not Supposed To Happen.  (Alternatively, we could add an assert to make that explicit.)
                
> 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

        

[jira] [Commented] (CASSANDRA-4227) StorageProxy throws NPEs for when there's no hostids for a target

Posted by "Dave Brosius (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13281351#comment-13281351 ] 

Dave Brosius commented on CASSANDRA-4227:
-----------------------------------------

ok, but what ever the reason for a null host id, it's going to NPE.
                
> 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

        

[jira] [Commented] (CASSANDRA-4227) StorageProxy throws NPEs for when there's no hostids for a target

Posted by "Dave Brosius (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13281323#comment-13281323 ] 

Dave Brosius commented on CASSANDRA-4227:
-----------------------------------------

committed as bd32d4f0b9f0f88fed97e8ddf2ee41b5b048d31d
                
> 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

        

[jira] [Commented] (CASSANDRA-4227) StorageProxy throws NPEs for when there's no hostids for a target

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13281237#comment-13281237 ] 

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

bq. We should just drop the hint in this case, see CASSANDRA-4120

Yeah, I think this is a straightforward brainfart and that it was supposed to have returned after logging "cannot store hint", instead of you know, trying to store it. :)

See attached.
                
> 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