-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
upgrades: Add sanity check that we only repair descriptors that show up in invalid_objects table. #110906
Comments
Follow up for this |
We could also consider using the repairable_catalog_corruptions table. |
I see that the repair step already has this: https://github.com/cockroachdb/cockroach/blob/be961bf36f01162a0787c6d81be2d2be1016ff58/pkg/upgrade/upgrades/first_upgrade.go#L58C1-L61C4 That check should cause the code to short-circuit for any descriptor that is not invalid. Let's confirm if that is true - if so, we could try adding a test to assert that, and close this out. |
This patch adds a test to assert that during automated repair of corrupt descriptors, we short-circuit for any descriptor that is not invalid. Epic: none Fixes: cockroachdb#110906 Release note: None
This patch adds a test to assert that during automated repair of corrupt descriptors, we do not try to repair a descriptor that is not corrupted. Epic: none Fixes: cockroachdb#110906 Release note: None
112700: upgrades: assert descriptor repair has correct set of targets r=rafiss a=annrpom This patch adds a test to assert that during automated repair of corrupt descriptors, we do not try to repair a descriptor that is not corrupted. While testing, it was discovered that function descriptors (regardless of corruption/repair) had their descriptor version increased due to `grantExecuteToPublicOnAllFunctions` being called on each function during a cluster upgrade; however, we noticed that the functions we were testing already had execute privileges for `public`. Thus, a check was added in said logic that ensures functions in this situation (where public already has execute priv. for the func) do not try to grant execute again. Epic: none Fixes: #110906 Release note: None 113319: opt: optimize FuncDepSet.ReduceCols r=mgartner a=mgartner #### opt/bench: add slow-query-5 This commit adds the new `slow-query-5` benchmark which tests a 40+ -way join modelled off of a real-world production query. The query stresses the efficiency of the optimizer, particularly in building and manipulating thousands of functional dependencies for the thousands of possible join orderings. Release note: None #### opt: optimize FuncDepSet.ReduceCols `FuncDepSet.ReduceCols` is used frequently to manipulate `FuncDepSet`s. In queries with many tables, columns, and joins, it can contribute significantly to the latency of query planning, due to the `O(n²)` time complexity of calculating a transitive closure (see `FuncDepSet.inClosureOf`), where `n` is the number of dependencies in the set, and the relatively expensive `SubsetOf` set operation performed multiple times for each of the `n²` iterations. This commit optimizes the `ReduceCols` by adding a fast path that can more quickly determine if a column cannot be reduced by checking if it exists in none of the `to` sets of the functional dependencies. This avoids having to calculate the transitive closure in many cases, significantly speeding up query planning time. Epic: None Release note (performance improvement): Query planning time has been reduced significantly for some queries in which many tables are joined. Co-authored-by: Annie Pompa <[email protected]> Co-authored-by: Marcus Gartner <[email protected]>
This patch adds a test to assert that during automated repair of corrupt descriptors, we do not try to repair a descriptor that is not corrupted. Epic: none Fixes: #110906 Release note: None
We should add a sanity check within the automated descriptor corruption repair that ensures we only attempt repairs for descriptors that show up in the
invalid_objects
table.Jira issue: CRDB-31670
The text was updated successfully, but these errors were encountered: