[
https://issues.apache.org/jira/browse/CASSANDRA-2092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12990832#comment-12990832
]
Gary Dusbabek commented on CASSANDRA-2092:
------------------------------------------
* There were a few underscore changes and a single
localEndpoint<->FBUtilities.getLocalAddress() that were missed, probably due to
rebasing.
* after looking at 0004, I think makeGossiper() could be removed. No logic
hinges on the fact that isAGossiper() ever returns false, so I think we're safe
to assume it's always true. At that point, we may be able to get away without
the isAGossiper field entirely.
* 0008 (minor) unused local var in applyApplicationStateLocally(). Would it
make sense to combine applyHeartBeatStateLocally() and
applyApplicationStateLocally(). Based on the codepath that calls
applyApplicationStateLocally(), I think the assert could be tighter (== instead
of >=), unless we need to take into account concurrency (other threads updating
the remote state).
* in 0010 I think the old code checked for epState==null because another thread
could convict the node while the gossip digest was being created.
* 0012 (minor) would the code be simpler to follow if the loop executed in
notifyFailureDetector(Map<InetAddress, EndpointState>) were just included in
the caller?
> Refactor gossiper
> -----------------
>
> Key: CASSANDRA-2092
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2092
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: Brandon Williams
> Assignee: Brandon Williams
> Priority: Minor
> Fix For: 0.8
>
> Attachments: 0001-remove-underscores.txt,
> 0002-group-variable-initialization.txt,
> 0003-only-add-self-to-localendpoint-when-needed.txt,
> 0004-refactor-isAlive-into-markAlive-and-markDead.txt,
> 0005-keep-private-vars-private.txt,
> 0006-optimize-makeRandomGossipDigest-trace-logging.txt,
> 0007-Gossiper-knows-what-address-to-listen-on.txt,
> 0008-Cleanup-generation-version-update-logic.txt,
> 0009-privatize-functions.txt,
> 0010-Remove-useless-makeRandomGossipDigest-logic-also-avo.txt,
> 0011-Don-t-copy-justRemovedEndpoints-on-each-check.txt,
> 0012-Simplify-notifyFailureDetector-logic.txt,
> 0013-Optimize-examineGossiper-logic.txt
>
> Original Estimate: 8h
> Remaining Estimate: 8h
>
> Gossiper.java has accumulated a lot of cruft over time and is generally hard
> to debug because of this. Let's refactor it to make life easier.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira