You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jaakko Laine (JIRA)" <ji...@apache.org> on 2009/12/03 09:52:21 UTC
[jira] Created: (CASSANDRA-597) remove "heartbeat" from
HeartBeatState
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
"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.
[jira] Commented: (CASSANDRA-597) remove "heartbeat" from
HeartBeatState
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12786162#action_12786162 ]
Jonathan Ellis commented on CASSANDRA-597:
------------------------------------------
Oops, I thought "heartbeat" and "generation" were the same thing. They're not, hence my confusion. :)
Applied original patch.
I still note that although notifyFailureDetector and applyHeartBeatStateLocally treat the generation/version tuple correctly, switching to a compareTo would be clearer.
Perhaps it would be clearest of all to have a single long version instead of 2 ints, where the high order bits are current generation?
> 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.
[jira] Issue Comment Edited: (CASSANDRA-597) remove "heartbeat"
from HeartBeatState
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Resolved: (CASSANDRA-597) remove "heartbeat" from
HeartBeatState
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis resolved CASSANDRA-597.
--------------------------------------
Resolution: Fixed
Assignee: Jaakko Laine
> 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
> Assignee: 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.
[jira] Commented: (CASSANDRA-597) remove "heartbeat" from
HeartBeatState
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12785332#action_12785332 ]
Jonathan Ellis commented on CASSANDRA-597:
------------------------------------------
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.
[jira] Commented: (CASSANDRA-597) remove "heartbeat" from
HeartBeatState
Posted by "Jaakko Laine (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12785339#action_12785339 ]
Jaakko Laine commented on CASSANDRA-597:
----------------------------------------
Yes, but the problem is HBS is compared with AP states also. Generation & version must provide consistent ordering not only with other HBS, but also with AP states. That is why it has to use VersionGenerator (which is also used by AP states) to guarantee ordering.
> 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.
[jira] Commented: (CASSANDRA-597) remove "heartbeat" from
HeartBeatState
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12786151#action_12786151 ]
Jonathan Ellis commented on CASSANDRA-597:
------------------------------------------
That's ok, because you're comparing states from the same endpoing (hence generation is guaranteed to be the same), although it's kind of ugly breaking encapsulation like that.
> 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.
[jira] Updated: (CASSANDRA-597) remove "heartbeat" from
HeartBeatState
Posted by "Jaakko Laine (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jaakko Laine updated CASSANDRA-597:
-----------------------------------
Attachment: 597.patch
patch attached
> 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.
[jira] Commented: (CASSANDRA-597) remove "heartbeat" from
HeartBeatState
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12786397#action_12786397 ]
Hudson commented on CASSANDRA-597:
----------------------------------
Integrated in Cassandra #278 (See [http://hudson.zones.apache.org/hudson/job/Cassandra/278/])
r/m unused HeartBeatState.heartbeat field. patch by Jaakko Laine; reviewed by jbellis for
> 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
> Assignee: 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.