You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Sam Overton (JIRA)" <ji...@apache.org> on 2012/07/11 17:20:35 UTC

[jira] [Commented] (CASSANDRA-4384) HintedHandoff can begin before SS knows the hostID

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

Sam Overton commented on CASSANDRA-4384:
----------------------------------------

I have a branch at https://github.com/acunu/cassandra/tree/CASSANDRA-4384 which
* gossips host ID on startup
* persists host IDs to the peers CF and loads them on startup

I ended up changing the peers schema to be keyed off IP address instead of UUID:
{noformat}
CREATE TABLE peers (
  peer inet PRIMARY KEY,
  token_bytes blob,
  ring_id uuid,
)
{noformat}

I agree with Sylvain that it seems more natural to use UUID as the key rather than by IP, but that didn't seem as straightforward to update when tokens or hostIds change.

There is some overlap with CASSANDRA-4122 so it would be best to wait for that to go in before changing the SystemTable again for this.


                
> HintedHandoff can begin before SS knows the hostID
> --------------------------------------------------
>
>                 Key: CASSANDRA-4384
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4384
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2
>            Reporter: Brandon Williams
>            Assignee: Eric Evans
>             Fix For: 1.2
>
>
> Since HH fires from the FD, SS won't quite have the hostId yet:
> {noformat}
>  INFO 18:58:04,196 Started hinted handoff for host: null with IP: /10.179.65.102
>  INFO 18:58:04,197 Node /10.179.65.102 state jump to normal
> ERROR 18:58:04,197 Exception in thread Thread[HintedHandoff:1,1,main]
> java.lang.NullPointerException
>         at org.apache.cassandra.utils.UUIDGen.decompose(UUIDGen.java:120)
>         at org.apache.cassandra.db.HintedHandOffManager.deliverHintsToEndpointInternal(HintedHandOffManager.java:304)
>         at org.apache.cassandra.db.HintedHandOffManager.deliverHintsToEndpoint(HintedHandOffManager.java:250)
>         at org.apache.cassandra.db.HintedHandOffManager.access$400(HintedHandOffManager.java:87)
>         at org.apache.cassandra.db.HintedHandOffManager$4.runMayThrow(HintedHandOffManager.java:433)
>         at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:26)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:662)
> {noformat}
> Simple solution seems to be getting the hostId from gossip instead.

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