Skip to content

catalog: spin validation of back-references off into distinct phase #85263

@postamar

Description

@postamar

Presently, when reading a descriptor, we validate its internal consistency with the ValidateSelf phase and its referential consistency with the ValidateCrossReferences phase. The problem is that if the descriptor has corrupt back-references, validation will fail and render the table unavailable even when the descriptor is leased just to run a query. Back-references only come into play when dropping things in DDL statements. For this reason we should split ValidateCrossReferences into two distinct phases and only validate forward references on reads.

Or, at least, only in reads for leasing for a query, make validation usage aware. Also, perhaps validate back-references, but log errors instead of returning them.

Jira issue: CRDB-18145

Metadata

Metadata

Assignees

Labels

A-schema-catalogRelated to the schema descriptors collection and the catalog API in general.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)GA-blockerO-postmortemOriginated from a Postmortem action item.T-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