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

Jonathan Ellis edited comment on CASSANDRA-597 at 12/3/09 2:11 PM:
-------------------------------------------------------------------

The goal of HeartBeatState is to provide a strictly-increasing counter so that 
other nodes can reject obsolete state in favor of new stuff (especially on node 
restart).

Currently this is implemented as a (generation, counter) tuple where generation 
is the seconds-since-epoch that the current node was started at, with some 
special casing to make sure that we bump it even if it restarts multiple times 
w/in a second. (see systemtable.initmetadata). and where counter is 
heartbeats-during-current-process-uptime.

So IMO the right fix here is to (1) make HBS implement comparable and use that 
instead of operating directly on the version_ [generation] int and (2) make 
updateHB only increment the counter.

      was (Author: jbellis):
    The goal of HeartBeatState is to provide a strictly-increasing counter so 
that other nodes can reject obsolete state in favor of new stuff (especially on 
node restart).

Currently this is implemented as a (generation, counter) tuple where generation 
is the seconds-since-epoch that the current node was started at, with some 
special casing to make sure that we bump it even if it restarts multiple times 
w/in a second. (see systemtable.initmetadata).

So IMO the right fix here is to (1) make HBS implement comparable and use that 
instead of operating directly on the version_ [generation] int and (2) make 
updateHB only increment the counter.
  
> remove "heartbeat" from HeartBeatState
> --------------------------------------
>
>                 Key: CASSANDRA-597
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-597
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.5
>            Reporter: Jaakko Laine
>            Priority: Minor
>             Fix For: 0.5
>
>         Attachments: 597.patch
>
>
> "heartbeat" in HeartBeatState does not seem to be used for anything, perhaps 
> an old relic => remove.

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

Reply via email to