validate: use immutable descriptors only #95827
Labels
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
T-sql-foundations
SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Descriptor validation doesn't care about descriptor mutability and validating mutable tables can end up having quite a performance impact due to having to rebuild the whole cache in the descriptor implementation every time we want to access a column or an index.
We're already pretty good about passing immutable descriptors to validation in most cases except during schema changes we do a bunch of
validate.Self
calls on the mutable descriptor for all kinds of good reasons.In any case, the callers of the validation logic shouldn't have to concern themselves about mutability in the first place.
Jira issue: CRDB-23766
The text was updated successfully, but these errors were encountered: