{"action":"created","issue":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/26821","repository_url":"https://api.github.com/repos/cockroachdb/cockroach","labels_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/26821/labels{/name}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/26821/comments","events_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/26821/events","html_url":"https://github.com/cockroachdb/cockroach/pull/26821","id":333661426,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1ODE5NjEx","number":26821,"title":"server: general correctness fixes for ListSessions / Ranges / upgradeStatus","user":{"login":"knz","id":642886,"node_id":"MDQ6VXNlcjY0Mjg4Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/642886?v=4","gravatar_id":"","url":"https://api.github.com/users/knz","html_url":"https://github.com/knz","followers_url":"https://api.github.com/users/knz/followers","following_url":"https://api.github.com/users/knz/following{/other_user}","gists_url":"https://api.github.com/users/knz/gists{/gist_id}","starred_url":"https://api.github.com/users/knz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knz/subscriptions","organizations_url":"https://api.github.com/users/knz/orgs","repos_url":"https://api.github.com/users/knz/repos","events_url":"https://api.github.com/users/knz/events{/privacy}","received_events_url":"https://api.github.com/users/knz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":17,"created_at":"2018-06-19T13:02:16Z","updated_at":"2018-06-22T02:40:27Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/26821","html_url":"https://github.com/cockroachdb/cockroach/pull/26821","diff_url":"https://github.com/cockroachdb/cockroach/pull/26821.diff","patch_url":"https://github.com/cockroachdb/cockroach/pull/26821.patch"},"body":"Prior to this patch, various parts of the code what were attempting to\r\n\"iterate over all nodes in the cluster\" were confused and would\r\neither:\r\n\r\n- skip over nodes that are known to exist in KV but for which gossip\r\n  information was currently unavailable, or\r\n- fail to skip over removed nodes (dead + decommissioned) or\r\n- incorrectly skip over temporarily failed nodes.\r\n\r\nThis patch comprehensively addresses this class of issues by:\r\n\r\n- tweaking `(*NodeLiveness).GetIsLiveMap()` to exclude decommissioned\r\n  nodes upfront.\r\n- tweaking `(*NodeLiveness).GetLivenessStatusMap()` to conditionally\r\n  exclude decommissioned nodes upfront, and changing all callers\r\n  accordingly.\r\n- providing a new method `(*statusServer).NodesWithLiveness()` which\r\n  always includes all nodes known in KV, not just those for which\r\n  gossip information is available.\r\n- ensuring that `(*Server).upgradeStatus()` does not incorrectly skip\r\n  over temporarily dead nodes or nodes yet unknown to gossip by\r\n  using the new `NodesWithLiveness()` method appropriately.\r\n- providing a new method `(*statusServer).iterateNodes()` which does\r\n  \"the right thing\" via `NodesWithLiveness()` and using it for\r\n  the status RPCs `ListSessions()` and `Range()`.\r\n\r\nAdditionally this patch makes SHOW QUERIES and SHOW SESSIONS report\r\nerror details when it fails to query information from a node.\r\n\r\nRelease note (bug fix): the server will not finalize a version upgrade\r\nautomatically and erroneously if there are nodes temporarily inactive\r\nin the cluster.\r\n\r\nRelease note (sql change): SHOW CLUSTER QUERIES/SESSIONS now report\r\nthe details of the error upon failing to gather data from other nodes.\r\n\r\nFixes #22863.\r\nFixes #26852.\r\n"},"comment":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/comments/399303278","html_url":"https://github.com/cockroachdb/cockroach/pull/26821#issuecomment-399303278","issue_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/26821","id":399303278,"node_id":"MDEyOklzc3VlQ29tbWVudDM5OTMwMzI3OA==","user":{"login":"knz","id":642886,"node_id":"MDQ6VXNlcjY0Mjg4Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/642886?v=4","gravatar_id":"","url":"https://api.github.com/users/knz","html_url":"https://github.com/knz","followers_url":"https://api.github.com/users/knz/followers","following_url":"https://api.github.com/users/knz/following{/other_user}","gists_url":"https://api.github.com/users/knz/gists{/gist_id}","starred_url":"https://api.github.com/users/knz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knz/subscriptions","organizations_url":"https://api.github.com/users/knz/orgs","repos_url":"https://api.github.com/users/knz/repos","events_url":"https://api.github.com/users/knz/events{/privacy}","received_events_url":"https://api.github.com/users/knz/received_events","type":"User","site_admin":false},"created_at":"2018-06-22T02:40:27Z","updated_at":"2018-06-22T02:40:27Z","author_association":"MEMBER","body":"Also added tests to ensure that SHOW QUERIES/SESSIONS indeed report the error encountered.\r\n\r\nReady for a final look!"}}
{"actor":{"display_login":"knz"}}