-
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.
sql,distsqlrun,gossip: don't plan on incompatible nodes
If we attempt to schedule a flow on a node who's DistSQL version is incompatible, the scheduling is going to return an error. This patch attempts to minimize the occurrence of these errors by not planning flows on incompatible nodes. This is done by having each node gossip it's range of accepted versions, and having planning consult gossip before deciding to map key spans onto a node. Spans owned by incompatible nodes are mapped to the gateway. The planning version check is done in distSQLPlanner.partitionSpans(). This may not sounds like the right place for it, but there's currently no better place. That's the layer that's currently similarly concerned with node health because everything planned above TableReaders currently mechanically follows the set of nodes decided in partitionSpans(). An alternative would be to lift the remapping onto the gateway to a step done after the plan has been build, but that would lead to worse plans.
- Loading branch information
1 parent
caa0565
commit 110558c
Showing
13 changed files
with
600 additions
and
145 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
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.