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-17539] Always remember anchor peers in membership (bp #1422) #1815

Merged
merged 1 commit into from
Aug 31, 2020

Conversation

wenjianqiao
Copy link
Contributor

Signed-off-by: Wenjian Qiao wenjianq@gmail.com

This is a backport of pull request #1422 via cherry pick and manual updates due to merge conflicts and code differences between v1.4 and v2.0.

Type of change

  • Bug fix

Description

Gossip service removes a peer from its membership if the peer's alive message is expired.
However, it should not remove the anchor peers or bootstrap peers in order for
the peer to reconnect. Gossip already remembers bootstrap peers. This PR adds code to track
all anchor peers' endpoints and updates the expiration callback function to not delete
anchor peers.

Additional details

Related issues

https://jira.hyperledger.org/browse/FAB-17539

@wenjianqiao wenjianqiao requested a review from a team as a code owner August 26, 2020 21:11
@wenjianqiao wenjianqiao force-pushed the anchorpeer_backport branch 2 times, most recently from d4c450c to 4656da4 Compare August 26, 2020 22:58
@wenjianqiao
Copy link
Contributor Author

/ci-run

@github-actions
Copy link

AZP build triggered!

integration/ports.go Outdated Show resolved Hide resolved
)

Gossip service removes a peer from its membership if the peer's alive message is expired.
However, it should always remember the anchor peers and bootstrap peers in order for
the peer to reconnect. Gossip already remembers bootstrap peers. This PR adds code to track
all anchor peers' endpoints and updates the expiration callback function to not delete
anchor peers.

Signed-off-by: Wenjian Qiao <wenjianq@gmail.com>
@wenjianqiao
Copy link
Contributor Author

/ci-run

@github-actions
Copy link

AZP build triggered!

@yacovm yacovm merged commit 243dc0e into hyperledger:release-1.4 Aug 31, 2020
ConstCh pushed a commit to eldis/fabric that referenced this pull request Sep 3, 2020
) (hyperledger#1815)

Gossip service removes a peer from its membership if the peer's alive message is expired.
However, it should always remember the anchor peers and bootstrap peers in order for
the peer to reconnect. Gossip already remembers bootstrap peers. This PR adds code to track
all anchor peers' endpoints and updates the expiration callback function to not delete
anchor peers.

Signed-off-by: Wenjian Qiao <wenjianq@gmail.com>
# Conflicts:
#	gossip/service/gossip_service_test.go
@wenjianqiao wenjianqiao deleted the anchorpeer_backport branch September 21, 2020 21:24
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.

2 participants