Open fqazi opened 1 year ago
A related approach is the idea in https://github.com/cockroachdb/cockroach/issues/104266#issuecomment-1654209072 -- we could add a metric that shows the size of the crdb_internal.invalid_objects table. It's possible that just showing the size alone is enough to be helpful, and if it's non-zero the customer can look at the table manually. If that's fine, we may not need to resolve this ticket.
Is your feature request related to a problem? Please describe. Clusters can potentially have descriptor corruption because of schema changer bugs, which can lead to upgrade issues or inaccessible tables. Fortunately Cockroach DB has builtin diagnostics for these using the crdb_internal.invalid_objects table.
Describe the solution you'd like We should periodically have the console scan crdb_internal.invalid_objects and have some type of notification for database administration when descriptor issues are addressed. This will allow for administrators to be aware of any potential upgrade issues earlier.
Describe alternatives you've considered
Additional context This is important also in reference to a recent TA: https://www.cockroachlabs.com/docs/advisories/a99561 where this CRDB internal table now reports this problem
Jira issue: CRDB-30112