Skip to content

serverutils: flake in tests that use ALTER TENANT SET CLUSTER SETTING #110560

@knz

Description

@knz

Describe the problem

Found by @miretskiy in #110516:

=== RUN   TestAlterChangefeedSwitchFamily/kafka
    alter_changefeed_test.go:282: failed to start feed for job 0: pq: rangefeeds require the kv.rangefeed.enabled setting. See https://www.cockroachlabs.com/docs/v23.2/change-data-capture.html#enable-rangefeeds-to-reduce-latency

In a nutshell the test does this:

  1. StartServer()
  2. ALTER TENANT ALL SET CLUSTER SETTING kv.rangefeed.enabled = true via SQL
  3. StartTenant()

then the error happens when the test uses the tenant service.

The problem is that the setting override at step (2) has not yet propagated through the rangefeed when StartTenant is invoked.

Expected behavior

StartTenant should also restart the rangefeed on the setting overrides (currnetly it only restarts the rangefeed on the tenant metadata and capabilities).

Jira issue: CRDB-31506
Epic: CRDB-18499

Metadata

Metadata

Assignees

Labels

A-multitenancyRelated to multi-tenancyC-test-failureBroken test (automatically or manually discovered).T-multitenantIssues owned by the multi-tenant virtual teamdb-cy-23

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions