-
Notifications
You must be signed in to change notification settings - Fork 4.1k
catalog: spin validation of back-references off into distinct phase #85263
Copy link
Copy link
Closed
Labels
A-schema-catalogRelated to the schema descriptors collection and the catalog API in general.Related 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)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)GA-blockerO-postmortemOriginated from a Postmortem action item.Originated from a Postmortem action item.T-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.
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-schema-catalogRelated to the schema descriptors collection and the catalog API in general.Related 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)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)GA-blockerO-postmortemOriginated from a Postmortem action item.Originated from a Postmortem action item.T-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.