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

fixups #5

Closed

Conversation

knz
Copy link

@knz knz commented Mar 14, 2023

Now that we have a datadriven framework available to exercise tenant
capabilities, we can move tests in `TestMultiTenantAdminFunction` to
make use of this. This patch rewrites SPLIT/SCATTER related tests to
make use of the datadriven test framework.

As is, the construction is cumbersome to work with. The move is done
with the next commit in mind, where we will change the default behavior
of split/scatter capabilities. To that end, I've only moved the tests
that were in my way. At some point we should get rid of this entire
thing and rewrite it to use the datadriven test framework. That day
is not today.

Epic: none

Release note: None
AdminSplit and AdminScatter requests are subject to capability checks.
Previously, these capabilities were codified in the "enabled" form. As
such, by default, secondary tenants did not have the ability to perform
these operations. This is in violation of what secondary tenants could
do prior to 23.1, at a time before capabilities existed. Moreover,
RESTORE/IMPORT rely on performing these operations for performance.
This made disallowing these operations by default a performance
regression.

This patch flips the phrasing of how these capabilities are stored on
the proto to use the "disable" verbiage. As such, secondary tenants are
able to perform splits and scatters by default. However, no change is
made to the public interface -- users above the `tenantcapabilitiespb`
package continue to interact with these capabilities as they were
before, oblivious to how these things are stored on disk.

As part of this patch, we also clean up a testing knob that was used by
various backup, CDC, and logictests to override capability checks in the
Authorizer. We no longer need this with the new defaults.

Fixes cockroachdb#96736

Release note: None
Now that tenants are able to perform splits by default, we can cleanup
`TestMultiTenantAdminFunction` to not use a setupCapability concept.

Epic: none

Release note: None
knz added 2 commits March 14, 2023 19:18
This reverts commit e794f51.
It also reverts part of 6c148e3.

Release note: None
@knz knz force-pushed the arulajmani/flip-admin-split-cap branch from 22f7216 to fea1df6 Compare March 14, 2023 18:18
@knz knz force-pushed the flip-admin-split-cap branch from e794f51 to 879bd1c Compare March 14, 2023 19:05
@knz knz closed this Mar 14, 2023
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.

2 participants