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

Backport FAB-15461: Fix election adapter to return correct peers #1054

Merged
merged 1 commit into from
Apr 10, 2020

Conversation

yacovm
Copy link
Contributor

@yacovm yacovm commented Apr 10, 2020

  1. Make the adapter between the gossip layer to the leader election layer
    return peers that have channel membership instead of basic membership
  2. Export IsInMyOrg() in gossipServiceImpl so it could be used in the
    election adapter
  3. Update Gossip counterfeiter mocks in discovery/support/mocks
  4. Release RLock in peerMockGossip when g.cluster is nil

Yacov: Without this commit, peers that join a channel they were not part of at genesis and other peers of their org are already in this channel, are stuck at genesis because they never elect themselves as leader (because they receive leadership declarations from existing peers in their org) but also don't sync from other peers due to rejecting all state info messages.
This change set fixes this by making these peers filter the leadership declarations and thus making them thing they are alone in the channel and elect themselves as leaders.

Change-Id: Ic3dc422e527a0778844851414387e480d23aee65
Signed-off-by: ronenschafferibm [email protected]
Signed-off-by: yacovm [email protected]

@yacovm yacovm requested a review from a team as a code owner April 10, 2020 08:08
1. Make the adapter between the gossip layer to the leader election layer
   return peers that have channel membership instead of basic membership
2. Export IsInMyOrg() in gossipServiceImpl so it could be used in the
   election adapter
3. Update Gossip counterfeiter mocks in discovery/support/mocks
4. Release RLock in peerMockGossip when g.cluster is nil

Change-Id: Ic3dc422e527a0778844851414387e480d23aee65
Signed-off-by: ronenschafferibm <[email protected]>
Signed-off-by: yacovm <[email protected]>
@yacovm yacovm force-pushed the FAB-15461-release-1.4 branch from 5e831cf to 084ee9c Compare April 10, 2020 08:15
@mastersingh24 mastersingh24 merged commit 856f215 into hyperledger:release-1.4 Apr 10, 2020
@yacovm yacovm deleted the FAB-15461-release-1.4 branch April 23, 2020 21:36
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.

3 participants