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: fix another buglet with tenant settings #109118

Merged
merged 1 commit into from
Aug 21, 2023

Conversation

knz
Copy link
Contributor

@knz knz commented Aug 21, 2023

This (hidden) bug was left over from #108902.
There is no visible negative effect to this bug being present until setting aliases are effectively introduced, which hasn't happened yet.

The code modified here is already properly exercised by logic tests.
Also, this is exercised by #109077 and #109074 and the CI in those PRs readily fail without this fix.

Epic: CRDB-27642

@knz knz requested review from stevendanna and yuzefovich August 21, 2023 08:09
@knz knz requested a review from a team as a code owner August 21, 2023 08:09
@blathers-crl
Copy link

blathers-crl bot commented Aug 21, 2023

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

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

@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@stevendanna stevendanna left a comment

Choose a reason for hiding this comment

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

If I'm reading this correctly, the bug here is that the crdb_internal.cluster_settings table was returning the name which was then being used in a join against the underlying systems table where the join actually has to happen on the setting_key.

If we wanted to add a test in this PR, I suppose we could make a test that registers a new setting that won't be in production builds and then write the test against that.

But, given that you seem to be iterating through test failures from the real-world case, we do know we have test coverage so perhaps we don't need to duplicate it.

This (hidden) bug was left over from cockroachdb#108902.
There is no visible negative effect to this bug being present until
setting aliases are effectively introduced, which hasn't happened yet.

The code modified here is already properly exercised by logic tests.

Release note: None
@knz knz force-pushed the 20230821-tenant-settings branch from 27ff4a5 to b5a7b75 Compare August 21, 2023 10:49
Copy link
Contributor Author

@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.

If I'm reading this correctly, the bug here is that the crdb_internal.cluster_settings table was returning the name which was then being used in a join against the underlying systems table where the join actually has to happen on the setting_key.

Yes.

given that you seem to be iterating through test failures from the real-world case, we do know we have test coverage so perhaps we don't need to duplicate it.

Correct

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

@knz
Copy link
Contributor Author

knz commented Aug 21, 2023

TFYR!

bors r=stevendanna

@craig
Copy link
Contributor

craig bot commented Aug 21, 2023

Build succeeded:

@craig craig bot merged commit 9ad8453 into cockroachdb:master Aug 21, 2023
@knz knz deleted the 20230821-tenant-settings branch August 21, 2023 16:40
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.

3 participants