Closed mennopruijssers closed 8 years ago
LGTM
Besides the incarnation number change (non-blocking, just let me know what you think), LGTM.
As discussed offline with @thanodnl I renamed shouldProcessChange
to shouldProcessGossip
. He's doing the same in ringpop-go so we have them in sync.
(Because I already merged in the other PR's it's easier to just check: https://github.com/uber/ringpop-node/pull/291/commits/17ae4060b67d124812ac98e7aae9b281a88b86c6)
Use a in-memory object to represent once local state. This makes the code path that updates the local state more robust. Instead of changing the state of the current node by updating it using updates, we just change the
localMember
. Whenever a gossip comes in changing the current state, we can always "counter-gossip" with the current state.Note: this is the first PR of a serie of refactors:
LeaveUpdate
-object: #293populate{Subject,Source}
to the Change Object: #296_reincarnate
-method to centralize reincarnation logic: #291 (this PR)