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

sql: support crdb_internal.ranges{_no_leases} for secondary tenants #92131

Merged
merged 1 commit into from
Dec 6, 2022
Merged

sql: support crdb_internal.ranges{_no_leases} for secondary tenants #92131

merged 1 commit into from
Dec 6, 2022

Conversation

ecwall
Copy link
Contributor

@ecwall ecwall commented Nov 18, 2022

This PR makes crdb_internal.ranges{_no_leases} and SHOW RANGES
work for secondary tenants.

Release note (sql change): crdb_internal.ranges{_no_leases} and
SHOW RANGES statements now work on secondary tenants.

Epic: CRDB-14522

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@ecwall ecwall marked this pull request as ready for review December 5, 2022 19:56
@ecwall ecwall requested review from a team as code owners December 5, 2022 19:56
@ecwall ecwall requested review from a team, srosenberg, renatolabs, rafiss, knz and arulajmani and removed request for a team December 5, 2022 19:56
This PR makes crdb_internal.ranges{_no_leases} and SHOW RANGES
work for secondary tenants.

Release note (sql change): crdb_internal.ranges{_no_leases} and
SHOW RANGES statements now work on secondary tenants.

Epic: CRDB-14522
Copy link
Contributor

@knz knz left a comment

Choose a reason for hiding this comment

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

:lgtm: but also get a review from arul.

Reviewed 7 of 7 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @arulajmani, @ecwall, @rafiss, @renatolabs, and @srosenberg)


pkg/sql/multitenant_admin_function_test.go line 71 at r1 (raw file):

	// TODO(ewall): When moving tenant capability check to KV,
	//  merge test w/ SkipSQLSystemTenantCheck variant into single test case if

nit: remove the extraneous space after //

Copy link
Collaborator

@arulajmani arulajmani left a comment

Choose a reason for hiding this comment

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

Are there any logic tests that used SHOW RANGES or the like, that only worked for the system tenant before, but can now be moved such that they run as secondary tenants as well? If so, should we do that either as a separate commit or a new patch entirely?

Reviewed 7 of 7 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @ecwall, @rafiss, @renatolabs, and @srosenberg)


pkg/sql/multitenant_admin_function_test.go line 309 at r1 (raw file):

			false, /* skipSQLSystemTenantCheck */
		)
		// TODO(ewall): Retain splits after `TRUNCATE` for secondary tenants.

Let's open an issue about this, if there isn't one? This should be doable now that we've got this RangeIterator, right?

Copy link
Contributor Author

@ecwall ecwall left a comment

Choose a reason for hiding this comment

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

There are some TTL tests that are commented out that I have a separate ticket for. I will created #93148 to look into this.

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @arulajmani, @knz, @rafiss, @renatolabs, and @srosenberg)


pkg/sql/multitenant_admin_function_test.go line 71 at r1 (raw file):

Previously, knz (Raphael 'kena' Poss) wrote…

nit: remove the extraneous space after //

The extra indentation creates a multi-line TODO:
image.png
vs
image copy 1.png


pkg/sql/multitenant_admin_function_test.go line 309 at r1 (raw file):

Previously, arulajmani (Arul Ajmani) wrote…

Let's open an issue about this, if there isn't one? This should be doable now that we've got this RangeIterator, right?

There is already a ticket: #82944.

I am not sure if that was the only thing blocking it though.

@ecwall
Copy link
Contributor Author

ecwall commented Dec 6, 2022

bors r=knz,arulajmani

@craig
Copy link
Contributor

craig bot commented Dec 6, 2022

Build succeeded:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants