-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
26821: server: general correctness fixes for ListSessions / Ranges / upgradeStatus r=knz a=knz Prior to this patch, various parts of the code what were attempting to "iterate over all nodes in the cluster" were confused and would either: - skip over nodes that are known to exist in KV but for which gossip information was currently unavailable, or - fail to skip over removed nodes (dead + decommissioned) or - incorrectly skip over temporarily failed nodes. This patch comprehensively addresses this class of issues by: - tweaking `(*NodeLiveness).GetIsLiveMap()` to exclude decommissioned nodes upfront. - tweaking `(*NodeLiveness).GetLivenessStatusMap()` to conditionally exclude decommissioned nodes upfront, and changing all callers accordingly. - providing a new method `(*statusServer).NodesWithLiveness()` which always includes all nodes known in KV, not just those for which gossip information is available. - ensuring that `(*Server).upgradeStatus()` does not incorrectly skip over temporarily dead nodes or nodes yet unknown to gossip by using the new `NodesWithLiveness()` method appropriately. - providing a new method `(*statusServer).iterateNodes()` which does "the right thing" via `NodesWithLiveness()` and using it for the status RPCs `ListSessions()` and `Range()`. Additionally this patch makes SHOW QUERIES and SHOW SESSIONS report error details when it fails to query information from a node. Release note (bug fix): the server will not finalize a version upgrade automatically and erroneously if there are nodes temporarily inactive in the cluster. Release note (sql change): SHOW CLUSTER QUERIES/SESSIONS now report the details of the error upon failing to gather data from other nodes. Fixes #22863. Fixes #26852. Fixes #26897. Co-authored-by: Raphael 'kena' Poss <[email protected]>
- Loading branch information
Showing
10 changed files
with
404 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.