forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql: adjust DistSQL physical planning in multi-tenant mode
This commit removes the logic that might reassign some spans to the gateway that can be applied in the multi-tenant deployment mode. This logic was introduced in cockroachdb#80353 with the following [rationale](cockroachdb#80353 (review)): ``` This will probably go away once we support locality-aware distribution, at least in this form. There's two reasons why I did this right now: 1. It avoids an extra hop (KV->assignee->gateway->client vs KV->gateway->client), and this is an optimization we sometimes do in the non-MT code path though at a later stage, 2. It makes the assignments and distribution type deterministic in testing when we expect to assign to only a single pod. ``` Since then the locality-aware planning has been implemented (addressing first half of point 1.). Also, the second half of point 1. applies both to single-tenant and multi-tenant modes (`maybeMoveSingleFlowToGateway`). Point 2. is a bit unfortunate and I'm not sure what to do about it yet (we'll need to figure it out if we ever make separate-process multi-tenant the default mode for running tests that check DistSQL planning). For now only a single test needed an adjustment to make it deterministic. Additionally, running TPCH queries experimentally has shown that this reassigning of single TableReader can make the query latency significantly different (sometimes reduce it, sometimes increase it) (see [here](cockroachdb#104379 (comment))). All of these reasons suggest that we should just get rid off this logic to unify the DistSQL physical planner more between single-tenant and multi-tenant modes. Release note: None
- Loading branch information
1 parent
247f05e
commit bdda6a0
Showing
2 changed files
with
21 additions
and
76 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