Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server: extract tenant-independent logic out of SQLServer #92579

Merged
merged 5 commits into from
Jan 9, 2023

Conversation

@knz knz self-assigned this Nov 28, 2022
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@knz knz changed the title server: pull isReady.Set(true) out of AcceptClients server: extract tenant-independent logic out of SQLServer Nov 28, 2022
@knz knz marked this pull request as ready for review November 28, 2022 15:43
@knz knz requested review from a team, herkolategan and smg260 and removed request for a team November 28, 2022 15:43
@knz knz added the A-multitenancy Related to multi-tenancy label Nov 28, 2022
@knz knz requested review from a team November 28, 2022 16:41
@knz knz requested a review from rafiss November 28, 2022 16:59
@dhartunian dhartunian removed the request for review from a team November 29, 2022 16:49
Copy link
Collaborator

@rafiss rafiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @herkolategan, @knz, and @smg260)


-- commits line 7 at r3:
should it be "into AcceptClients"?

@knz knz force-pushed the 20221116-shared-sql-5 branch 2 times, most recently from 295b2f7 to 1a3152c Compare December 6, 2022 12:51
@knz knz force-pushed the 20221116-shared-sql-5 branch 2 times, most recently from 5fe29d9 to 4af36de Compare December 22, 2022 14:07
craig bot pushed a commit that referenced this pull request Jan 9, 2023
92580: server,pgwire: use a single SQL listener for multiple tenants r=rafiss a=knz

Parent PRs:
- [x] #84608
- [x] #91739
- [x] #91744
- [x] #92574
- [x] #92575
- [x] #92576
- [x] #92577
- [x] #92578
- [x] #92579
- [ ] #94901

Fixes #84585.
Informs  #94310.
Epic: CRDB-14537

This commit implements tenant routing using a single SQL network listener.

The tenant name can be specified:

- via the client status param `options`, e.g. `options=-ccrdb:tenant=hello`
- via the database name, e.g. `crdb:tenant-hello.defaultdb`.

Release note (backward-incompatible change): If a SQL database is created with a name that starts with `crdb:tenant-` (e.g. `CREATE DATABASE "crdb:tenant-foo"`, clients will no longer be able to connect to it directly.

Co-authored-by: Raphael 'kena' Poss <knz@thaumogen.net>
Base automatically changed from 20221116-shared-sql-5 to master January 9, 2023 01:50
@craig craig bot merged commit e5e3f31 into master Jan 9, 2023
@craig craig bot deleted the 20221116-shared-sql-6 branch January 9, 2023 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-multitenancy Related to multi-tenancy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants