Skip to content

multiregion: add validation for zone config extension #85015

@ZhouXing19

Description

@ZhouXing19

We should validate the zone config extension set by the user won't affect certain existing multi-region primitives.

As suggested in #83605 (review), we may want to add the following validation:

  1. REGIONAL extensions don't set lease_preferences
  2. REGIONAL IN extensions don't set lease_preferences that disagree with their home region. I.e. After the extension gets applied, the home region is unchanged.
  3. REGIONAL IN extensions don't set replica constraints or voter contains that disagree with their home region.
  4. Extensions can't break a database's survivability goal.

If we find out the user gives a zone config extension that violate the rules above, we return an error and reject the incoherent extension. We want to guide the user towards a configuration that makes sense.

Jira issue: CRDB-18004
Epic CRDB-14616

Metadata

Metadata

Assignees

Labels

C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)GA-blockerT-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)branch-masterFailures and bugs on the master branch.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions