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

kv,changefeedccl: make kv.rangefeed.enabled a TenantReadOnly setting #79224

Closed

Conversation

stevendanna
Copy link
Collaborator

This setting is used by kvserver and the value in the tenant does not
matter. However, we do what to read the value from the tenant so we
can generate nice error messages for CHANGEFEED users.

Currently, the cluster setting system doesn't have a class of setting
that lets us do this. However, by changing the setting to a
TenantReadOnly setting, we can at least make it so that tenants do not
have to set a no-op setting only to have their changefeeds still fail
because of a host-level cluster setting.

The downside is that an operator of a multi-tenant cluster will have
to run two commands to enable rangefeeds for all tenants:

SET CLUSTER SETTING kv.rangefeed.enabled = true;
ALTER TENANT ALL SET CLUSTER SETTING kv.rangefeed.enabled = true;

Release note: kv.rangefeed.enabled no longer needs to be set in a
tenant in addition to the host cluster.

This setting is used by kvserver and the value in the tenant does not
matter. However, we do what to read the value from the tenant so we
can generate nice error messages for CHANGEFEED users.

Currently, the cluster setting system doesn't have a class of setting
that lets us do this. However, by changing the setting to a
TenantReadOnly setting, we can at least make it so that tenants do not
have to set a no-op setting only to have their changefeeds still fail
because of a host-level cluster setting.

The downside is that an operator of a multi-tenant cluster will have
to run two commands to enable rangefeeds for all tenants:

```
SET CLUSTER SETTING kv.rangefeed.enabled = true;
ALTER TENANT ALL SET CLUSTER SETTING kv.rangefeed.enabled = true;
```

Release note: `kv.rangefeed.enabled` no longer needs to be set in a
tenant in addition to the host cluster.
Since the goal of the demo command is to allow users to quickly
explore features of the database, it makes sense to enable rangefeeds
by default so that users can use changefeeds with little friction.

Release note (cli change): The demo command now enables rangefeeds by
default.
@stevendanna stevendanna requested review from a team as code owners April 1, 2022 13:12
@stevendanna stevendanna requested review from samiskin and removed request for a team April 1, 2022 13:12
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@stevendanna
Copy link
Collaborator Author

I'm not sure this is the right trade-off. If we merge this we'll have to make sure that CC takes it into account when deploying a version that includes it since they'll have to add an override. I don't think we have many users hosting their own multi-tenant clusters, so perhaps that isn't the end of the world.

I opened #79223 to track a possible change that would make this a bit better.

@stevendanna
Copy link
Collaborator Author

Alternatively, rather than checking the cluster setting, perhaps we can add some kvserver API where we can ask whether we are able to run a rangefeed or not.

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