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

gossip: replace scalar hops count with a slice of node IDs tracing path to origin #15538

Closed
spencerkimball opened this issue May 1, 2017 · 0 comments
Labels
Milestone

Comments

@spencerkimball
Copy link
Member

Currently, gossip keeps track of the distance from a node to the origin of a piece of gossiped info via a scalar info.Hops int count which is incremented upon receipt. Various pathological restart cases result in this value being incremented arbitrarily high, giving an incorrect distant from destination node to info origin node and causing gossip connection thrashing (see #9819).

We should replace info.Hops int with info.Nodes []roachpb.NodeID and on receipt, appropriately collapse the supplied slice of node IDs to the shortest sub-slice which contains an immediate peer node ID.

For example:

Node(1..N) = N1, N2, N3, ...
Node(origin) = N1
Node(dest) = N4

If No receives info.Nodes = []roachpb.NodeID{N1, N2, N3, N5, N6}, and No has peers []roachpb.NodeID{N2, N7, N9}, it will set info.Nodes = []roachpb.NodeID{N1, N2}.

@spencerkimball spencerkimball added this to the 1.1 milestone May 1, 2017
@spencerkimball spencerkimball self-assigned this May 1, 2017
@petermattis petermattis changed the title Replace scalar hops count in gossip with a slice of node IDs tracing path to origin gossip: replace scalar hops count with a slice of node IDs tracing path to origin May 1, 2017
@petermattis petermattis modified the milestones: 1.2, 1.1 Aug 17, 2017
@cuongdo cuongdo modified the milestones: Later, 1.2 Sep 7, 2017
@tbg tbg added the C-wishlist A wishlist feature. label Jul 22, 2018
@a-robinson a-robinson removed their assignment Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants