cockroachdb / cockroachdb/cockroach

server: default zone config is not propagated into virtual clusters

Open
#110,003 5 comments 0 reactions 0 assignees View on GitHub
A-multitenancy A-zone-configs C-bug T-db-server
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

Found while working on #110001.

**Describe the problem**

Found while investigating a test failure that was looking at the default zone config (the `DefaultZoneConfig` field in the system config provider).

The `DefaultZoneConfig` for secondary tenant services is initialized to the global default. It does not inherit from the KV layer (it should).

This default is used in two places:

- when running `ALTER RANGE default CONFIGURE ZONE USING DEFAULT`
if the KV layer has num replicas = 1, then this statement unexpectedly will set the tenant default config to num replicas = 3.

- when using the `.DefaultZoneConfig()` accessor in `ApplicationLaterInterface` in test servers.

**Expected behavior**

`ALTER RANGE default CONFIGURE ZONE USING DEFAULT` should always use the default tenant zone config as set via the system tenant.

Epic CRDB-26686

Jira issue: CRDB-31213

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.