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: fix DataDistribution server error when creating a tenant #99142

Merged
merged 1 commit into from
Mar 30, 2023

Conversation

zachlite
Copy link
Contributor

@zachlite zachlite commented Mar 21, 2023

This is a stop-gap commit that enables the DataDistribution endpoint to handle the parts of the key space belonging to secondary tenants without error.

Despite no error, the result returned for secondary tenants is not correct. The DataDistribution endpoint was written before #79700, and therefore doesn't know that multiple tables can exist within a range.

Additionally, the results for the system tenant will be incorrect soon because #81008 is in progress.
Improvements are tracked by #97942

Fixes: #97993
Release note: None

This is a stop-gap commit that enables the DataDistribution endpoint
to handle the parts of the key space belonging to secondary tenants
without error.

Despite no error, the result returned for secondary tenants is not correct.
The DataDistribution endpoint was written before cockroachdb#79700, and therefore
doesn't know that multiple tables can exist within a range.

Additionally, the results for the system tenant will be incorrect soon
because cockroachdb#81008 is in progress.

Fixes: cockroachdb#97993
Release note: None
@zachlite zachlite requested a review from dhartunian March 21, 2023 19:28
@zachlite zachlite requested a review from a team as a code owner March 21, 2023 19:28
@zachlite zachlite requested a review from a team March 21, 2023 19:28
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@dhartunian dhartunian left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 3 files at r1, all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @zachlite)


pkg/ccl/serverccl/admin_test.go line 85 at r1 (raw file):

	sqlDB.Exec(t, `ALTER PARTITION eu OF TABLE comments CONFIGURE ZONE USING gc.ttlseconds = 9002`)

	if disableDefaultTestTenant {

why is this conditional here if the value is always true?

Copy link
Contributor Author

@zachlite zachlite 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 @dhartunian)


pkg/ccl/serverccl/admin_test.go line 85 at r1 (raw file):

Previously, dhartunian (David Hartunian) wrote…

why is this conditional here if the value is always true?

I wanted to keep this in sync with the value passed to TestServerArgs.DisableDefaultTestTenant.
If we're running the test through a tenant, we don't need to create a new tenant. Overkill?

Copy link
Collaborator

@dhartunian dhartunian left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @zachlite)


pkg/ccl/serverccl/admin_test.go line 85 at r1 (raw file):

Previously, zachlite wrote…

I wanted to keep this in sync with the value passed to TestServerArgs.DisableDefaultTestTenant.
If we're running the test through a tenant, we don't need to create a new tenant. Overkill?

👍

@zachlite zachlite added the backport-23.1.x Flags PRs that need to be backported to 23.1 label Mar 28, 2023
@zachlite
Copy link
Contributor Author

bors r+

@craig
Copy link
Contributor

craig bot commented Mar 28, 2023

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Mar 29, 2023

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Mar 29, 2023

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Mar 29, 2023

This PR was included in a batch that successfully built, but then failed to merge into master (it was a non-fast-forward update). It will be automatically retried.

@craig
Copy link
Contributor

craig bot commented Mar 30, 2023

Build succeeded:

@blathers-crl
Copy link

blathers-crl bot commented Mar 30, 2023

Encountered an error creating backports. Some common things that can go wrong:

  1. The backport branch might have already existed.
  2. There was a merge conflict.
  3. The backport branch contained merge commits.

You might need to create your backport manually using the backport tool.


error setting reviewers, but backport branch blathers/backport-release-23.1-99142 is ready: POST https://api.github.com/repos/cockroachdb/cockroach/pulls/100010/requested_reviewers: 422 Reviews may only be requested from collaborators. One or more of the teams you specified is not a collaborator of the cockroachdb/cockroach repository. []

Backport to branch 23.1.x failed. See errors above.


🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-23.1.x Flags PRs that need to be backported to 23.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

server: /data-distribution page returns error after creating tenant
3 participants