-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql,config: tenant zone config lookup is broken #75864
Copy link
Copy link
Closed
Labels
A-zone-configsC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.GA-blockerT-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)SQL Foundations Team (formerly SQL Schema + SQL Sessions)branch-masterFailures and bugs on the master branch.Failures and bugs on the master branch.branch-release-22.1Used to mark GA and release blockers, technical advisories, and bugs for 22.1Used to mark GA and release blockers, technical advisories, and bugs for 22.1
Description
Describe the problem
In #74612 we made it so that the tenant has access to its own zone configs via the SystemConfig object provided by the systemconfigwatcher. Unfortunately this did not go far enough to actually fully address #70558 because of this special case logic:
cockroach/pkg/config/system.go
Lines 371 to 385 in 4b8258c
| func (s *SystemConfig) GetZoneConfigForObject( | |
| codec keys.SQLCodec, id uint32, | |
| ) (*zonepb.ZoneConfig, error) { | |
| var sysID SystemTenantObjectID | |
| if codec.ForSystemTenant() { | |
| sysID = SystemTenantObjectID(id) | |
| } else { | |
| sysID = keys.TenantsRangesID | |
| } | |
| entry, err := s.getZoneEntry(sysID) | |
| if err != nil { | |
| return nil, err | |
| } | |
| return entry.combined, nil | |
| } |
Solution
We need to either remove the above logic or make it conditional on where the config is coming from and more generally make sure that the SystemConfig methods work for the tenant.
Epic: CRDB-10489
Jira issue: CRDB-12864
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-zone-configsC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.GA-blockerT-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)SQL Foundations Team (formerly SQL Schema + SQL Sessions)branch-masterFailures and bugs on the master branch.Failures and bugs on the master branch.branch-release-22.1Used to mark GA and release blockers, technical advisories, and bugs for 22.1Used to mark GA and release blockers, technical advisories, and bugs for 22.1