Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
validate: use immutable descriptors only
The descriptor validation logic will accept any implementation of catalog.Descriptor be it mutable or immutable, it doesn't care. However, using mutable implementations can have a significant performance impact especially in the case of tables, where every column or index or constraint lookup will lead to the cache being regenerated for the whole descriptor. This commit fixes this by having validate.Validate replace any mutable descriptor instances it encounters with immutable copies. This doesn't change anything except performance. Fixes #95827. Release note: None
- Loading branch information