sql: introduce CREATE TENANT syntax#91595
Conversation
9eafac2 to
ba54cca
Compare
|
First commit is #91518. |
|
actually hold off on the review for this, i want to try something |
ba54cca to
80867e5
Compare
rafiss
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @adityamaru, @knz, and @lidorcarmel)
-- commits line 34 at r3:
i just saw this PR fly by, so i might be missing some context, but i had a question. adding CREATE TENANT to the release notes seems like it would also require a lot of extra background docs to explain what tenants are. so far the docs team has explicitly avoided documenting multitenancy, so i just want to make sure that documentation work already tracked somewhere for that team
80867e5 to
5e5733b
Compare
You're right! I discussed this with the team and we'll default to no release notes for now. We might add some private preview docs closer to the release data but that can be done independently. Thanks for flagging. |
5e5733b to
7903918
Compare
|
@lidorcarmel @knz this is ready for a look. I added a |
Does it makes sense to also skip the documentation on the |
|
Yeah we need to make sure this doesn't show up in the auto-generated docs + diagrams |
| name roachpb.TenantName | ||
| } | ||
|
|
||
| func (p *planner) CreateTenantNode(_ context.Context, n *tree.CreateTenant) (planNode, error) { |
There was a problem hiding this comment.
wondering, is this where we should verify things like name uniqueness and maybe permissions? or should we rely on startExec to fail?
There was a problem hiding this comment.
- name uniqueness is ensured via the UNIQUE index on the column.
- permission is ensured inside the
CreateTenantfunction.
stevendanna
left a comment
There was a problem hiding this comment.
Nice to see this making progress.
Looks like others have caught the important things. I've just left a few nitpicks.
Release note: None
This change introduces: CREATE TENANT <tenant-name> The query automatically assigns the tenant the first available ID. This could be an ID that was previously used by a tenant that has been dropped and GC'ed. Fixes: cockroachdb#91235 Release note: None
7903918 to
ef6c279
Compare
So I see that |
As long as the release note is marked with |
|
TFTR! bors r=stevendanna,lidorcarmel |
|
Build succeeded: |
This change introduces:
CREATE TENANT
The query automatically assigns the tenant the first
available ID. This could be an ID that was previously
used by a tenant that has been dropped and GC'ed.
Fixes: #91235
Release note: None