-
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.
49693: server: use "read-only" Gossip for tenants r=asubiotto,nvanbenschoten a=tbg We were previously using the Gossip instance of the TestServer against which the tenant was initialized. This commit trims the dependency further by initializing its own Gossip instance which is never written to (i.e. `AddInfo` is never called) and which does not accept incoming connections. As a reminder, the remaining problematic uses of Gossip as of this commit are: - making a `nodeDialer` (for `DistSender`), tracked in: #47909 - access to the system config: - `(schemaChangeGCResumer).Resume`, tracked: #49691 - `database.Cache`, tracked: #49692 - `(physicalplan).spanResolver` (for replica oracle). This is likely not a blocker as we can use a "dumber" oracle in this case; the oracle is used for distsql physical planning of which tenants will do none. Tracked in: #48432 cc @ajwerner Release note: None 49724: sql: clean up of scanNode and some other things r=yuzefovich a=yuzefovich **sql: unify PlanningCtx constructors into one** Release note: None **sql: remove separate scanVisilibity struct** This commit removes `sql.scanVisibility` in favor of protobuf-generated `execinfrapb.ScanVisibility`. It also introduces prettier aliases for the two values into `execinfra` package that are now used throughout the code. Release note: None **sql: clean up of scan node and a few other things** This commit does the following cleanups of `scanNode`: 1. refactors `scanNode.initCols` method to be standalone (it will probably be reused later by distsql spec exec factory). 2. removes `numBackfillColumns`, `specifiedIndexReverse`, and `isSecondaryIndex` fields since they are no longer used. 3. refactors the code to remove `valNeededForCols` field which was always consecutive numbers in range `[0, len(n.cols)-1]`. 4. refactors `getIndexIdx` method to not depend on `scanNode`. Additionally, this commit removes `planDependencies` business from `planTop` since optimizer now handles CREATE VIEW and handles the plan dependencies on its own (and CREATE VIEW was the single user of that struct in the plan top). Also, it removes (which seems like) unnecessary call to `planColumns` when creating distinct spec and an unused parameter from `createTableReaders` method. Addresses: #47474. Release note: None Co-authored-by: Tobias Schottdorf <tobias.schottdorf@gmail.com> Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com>
- Loading branch information
Showing
40 changed files
with
382 additions
and
403 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.