{"action":"created","issue":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/31042","repository_url":"https://api.github.com/repos/cockroachdb/cockroach","labels_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/31042/labels{/name}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/31042/comments","events_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/31042/events","html_url":"https://github.com/cockroachdb/cockroach/pull/31042","id":367486560,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIwOTA1Mzk2","number":31042,"title":"gossip: propagate most-distant sentinels on every connection","user":{"login":"petermattis","id":6201335,"node_id":"MDQ6VXNlcjYyMDEzMzU=","avatar_url":"https://avatars0.githubusercontent.com/u/6201335?v=4","gravatar_id":"","url":"https://api.github.com/users/petermattis","html_url":"https://github.com/petermattis","followers_url":"https://api.github.com/users/petermattis/followers","following_url":"https://api.github.com/users/petermattis/following{/other_user}","gists_url":"https://api.github.com/users/petermattis/gists{/gist_id}","starred_url":"https://api.github.com/users/petermattis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petermattis/subscriptions","organizations_url":"https://api.github.com/users/petermattis/orgs","repos_url":"https://api.github.com/users/petermattis/repos","events_url":"https://api.github.com/users/petermattis/events{/privacy}","received_events_url":"https://api.github.com/users/petermattis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-06T19:10:27Z","updated_at":"2018-10-06T19:11:49Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/31042","html_url":"https://github.com/cockroachdb/cockroach/pull/31042","diff_url":"https://github.com/cockroachdb/cockroach/pull/31042.diff","patch_url":"https://github.com/cockroachdb/cockroach/pull/31042.patch"},"body":"Whenever a gossip connection is created, propagate the most-distant\nsentinel infos (i.e. `node:<id>` infos) to the remote node. These infos\nare used for the `mostDistant` calculation and need to accurately\nreflect the number of hops to a node.\n\nNote that this is a bandaid. Using the info hops value to calculate the\ndistance to a node does not work correctly unless infos are always\npropagated. The high water stamps mechanism that avoids sending an info\nthat the remote already has can allow the info hops value to remain\nhigher or lower than the actual value. Consider the following gossip\nnetwork:\n\n```\n  1 -> 2\n  1 -> 3\n  2 -> 3\n  3 -> 4\n```\n\nWhen n1 gossips its `node:1` info it has multiple paths to get to n4. We\ncan either see `1 -> 2 -> 3 -> 4` or `1 -> 3 -> 4`. Depending on the\npath the hops value will differ and the path is timing dependent. Even\nworse, consider what happens when the network changes. For example,\nstart with the network `1 -> 2 -> 3 -> 4`. The network then changes to:\n\n```\n  1 -> 3\n  2 -> 3\n  3 -> 4\n```\n\nThe `node:<id>` keys have a TTL of 2h. In the initial configuration, n2\nis considered to be 1 hop distant from n1. But after the\nreconfiguration, n2 is in reality 2 hops distant from n1, yet the\n`node:2` key living on n1 will not have been updated because it hasn't\nchanged and the new hops value is higher. The new `gossip-clients:*`\nkeys give us a way out of this complexity as each node can compute the\nshortest path to every other node, but those keys are not generated by\nv2.0.x of CockroachDB so we'll have to wait to use them for that\npurpose.\n\nFixes #30895\n\nRelease note: None"},"comment":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/comments/427599053","html_url":"https://github.com/cockroachdb/cockroach/pull/31042#issuecomment-427599053","issue_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/31042","id":427599053,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzU5OTA1Mw==","user":{"login":"petermattis","id":6201335,"node_id":"MDQ6VXNlcjYyMDEzMzU=","avatar_url":"https://avatars0.githubusercontent.com/u/6201335?v=4","gravatar_id":"","url":"https://api.github.com/users/petermattis","html_url":"https://github.com/petermattis","followers_url":"https://api.github.com/users/petermattis/followers","following_url":"https://api.github.com/users/petermattis/following{/other_user}","gists_url":"https://api.github.com/users/petermattis/gists{/gist_id}","starred_url":"https://api.github.com/users/petermattis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petermattis/subscriptions","organizations_url":"https://api.github.com/users/petermattis/orgs","repos_url":"https://api.github.com/users/petermattis/repos","events_url":"https://api.github.com/users/petermattis/events{/privacy}","received_events_url":"https://api.github.com/users/petermattis/received_events","type":"User","site_admin":false},"created_at":"2018-10-06T19:11:49Z","updated_at":"2018-10-06T19:11:49Z","author_association":"CONTRIBUTOR","body":"@spencerkimball PTAL at my description of the problem with using the hops value for distance calculation. Perhaps I'm misunderstanding something about the way the `mostDistant` calculation is supposed to work and how infos are intended to propagate in the cluster. "}}
{"actor":{"display_login":"petermattis"}}