Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FAB-18401] Remove unreachable and unnecessary code in gossip membership (bp #2293) #2295

Merged
merged 1 commit into from
Jan 18, 2021

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Jan 18, 2021

This is an automatic backport of pull request #2293 done by Mergify.


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.io/

In gossip, alive messages are stored in membership stores, and they also have logical timestamps.

When a peer learns of an alive message with a higher logical timestamp of its latest alive message (for a specific peer),
it enters learnExistingMembers() and tentatively updates the latest envelope and gossip message of what is store in the membership store.

However, for completeness, the code checks if the membership store already contains an earlier instance, and if not, populates the membership store
with a new instance. This population is not needed, because the code only enters the function if it already knows the peer, hence the membership
store contains an earlier instance.

This commit simply removes the unneeded code path where the instance is unknown despite the fact that we know about the peer already.

Change-Id: Ia91cb35eabe18a8771ad12a30b06489892a2b49f
Signed-off-by: Yacov Manevich <yacovm@il.ibm.com>
(cherry picked from commit a4a8520)
@yacovm yacovm merged commit 10c7839 into release-2.2 Jan 18, 2021
@mergify mergify bot deleted the mergify/bp/release-2.2/pr-2293 branch January 18, 2021 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant