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 #1422

Merged
merged 1 commit into from
Jun 24, 2020

Conversation

wenjianqiao
Copy link
Contributor

@wenjianqiao wenjianqiao commented Jun 19, 2020

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

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

Copy link
Contributor

@yacovm yacovm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Wenjian.

I did only a quick overview and I see that:

  1. Lock is missing, see comment
  2. No integration test yet, I guess this is a WIP so let's wait for that
  3. You didn't add this to core.yaml yet, so let's do that too.

@wenjianqiao wenjianqiao force-pushed the fab17539 branch 2 times, most recently from 0aa08fd to fabbac9 Compare June 21, 2020 03:21
@wenjianqiao
Copy link
Contributor Author

@yacovm I have addressed your comments. However, there were UT/IT failures (may be flakes).

@wenjianqiao wenjianqiao marked this pull request as ready for review June 22, 2020 01:55
@wenjianqiao wenjianqiao requested a review from a team as a code owner June 22, 2020 01:55
@lindluni
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@wenjianqiao wenjianqiao force-pushed the fab17539 branch 2 times, most recently from f2e7af3 to 3671d42 Compare June 24, 2020 18:55
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

Hit gossip CI flake https://jira.hyperledger.org/browse/FAB-17451, problem 1)

2020-06-24T20:09:21.7843111Z --- FAIL: TestWithStaticDeliverClientLeader (46.00s)
2020-06-24T20:09:21.7843489Z gossip_service_test.go:627: Failed to establish full channel membership. Only 0 out of 2 peers have full membership

@wenjianqiao
Copy link
Contributor Author

/ci-run

@yacovm yacovm merged commit 193a7de into hyperledger:master Jun 24, 2020
sijocherian pushed a commit to sijocherian/fabric that referenced this pull request Jun 28, 2020
)

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 wenjianqiao deleted the fab17539 branch July 15, 2020 21:14
@wenjianqiao wenjianqiao restored the fab17539 branch August 25, 2020 18:18
@wenjianqiao
Copy link
Contributor Author

Backport to release-1.4 via PR #1815

wenjianqiao added a commit to wenjianqiao/fabric that referenced this pull request Aug 27, 2020
)

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>
yacovm pushed a commit that referenced this pull request Aug 31, 2020
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>
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 fab17539 branch October 9, 2020 19:45
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