8000 fix gossip test connection peer initialisation and connection deletion mistakes by rade · Pull Request #1796 · weaveworks/weave · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jun 20, 2024. It is now read-only.

fix gossip test connection peer initialisation and connection deletion mistakes #1796

Merged
merged 3 commits into from
Dec 16, 2015

Conversation

rade
Copy link
Member
@rade rade commented Dec 16, 2015

No description provided.

rade added 2 commits December 16, 2015 12:33
We were creating peers with NewPeerFrom, which copies the Version (but
not connections). That's not what happens for a real connection, where
remote peers are always created with an initial version of 0.

The mistake results in brokenness: when we subsequently receive a
topology update for that peer with the same version then we ignore it,
even though the update contains connection information which is new to
us.

Related, it is conceptually wrong to call FetchWithDefault on the
remote router. That is not what happens for a real connection - the
FetchWithDefault occurs in the symmetric counterpart.
Also change Start() order in AddTestGossipConnection to be more
pleasing to the eye; the order isn't actually important.
@rade rade added this to the 1.4.0 milestone Dec 16, 2015
@rade rade self-assigned this Dec 16, 2015
This is a one-sided operation, so we shouldn't be touching the
remote's Peers.

Also fix the associated test... When both 1 and 2 have lost their
connection to 3, they no longer have a route to 3 and hence gc it.

And because they no longer have a route, gossip from them won't get
through to 3.
@rade rade changed the title fix gossip test connection peer initialisation mistake fix gossip test connection peer initialisation and connection deletion mistakes Dec 16, 2015
@rade rade removed their assignment Dec 16, 2015
bboreham added a commit that referenced this pull request Dec 16, 2015
fix gossip test connection peer initialisation and connection deletion mistakes
@bboreham bboreham merged commit f09d87c into master Dec 16, 2015
@rade rade deleted the gossip-test-connection-mistake branch December 31, 2015 15:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3E50
Development

Successfully merging this pull request may close these issues.

2 participants
0