cockroachdb / cockroachdb/cockroach
sql/catalog: on write, validate the references before the change
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
**Is your feature request related to a problem? Please describe.**
In recent releases we've augmented validation of the integrity of the catalog dramatically. One thing we do is validate the cross references of all descriptors we write. One gap in our validation is when we remove a forward reference and fail to remove a back reference. This sort of bug is not caught because we never validate that now-removed forward reference.
**Describe the solution you'd like**
We should validate the integrity of the descriptors which were referenced before the change in addition to those which are referenced after.
This should be straightforward because we keep track of the original version.
Jira issue: CRDB-24879
Epic CRDB-30352
Contributor guide
Assessment
This issue has not been assessed yet.