-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
catalog: refactor system schema, streamline descs.Collection access
This commit refactors how the system schema and the privileges for these tables are defined: - system table names are all hard-coded in `catconstants`; - system table descriptor definitions are much more concise; - system table privilege definitions as well as privilege validation and repair logic are moved from `descpb` to `catprivilege`; - system table privileges are defined by name instead of by ID. This refactor made it possible to clean up the descriptors collection collection logic somewhat: 1. uncommitted descriptors are moved out of kvDescriptors and into their own layer, 2. all tables can now be leased except for those in a small deny-list, 3. kvDescriptors read code paths (by name and by ID) are more unified, 4. system database namespace lookups in kvDescriptors.getByName go through a cache, 5. descs.Collection read code paths are more unified as well. 6. descriptor validation at transaction commit time leverages the descs.Collection as a catalog.BatchDescGetter. Notably, as alluded in (2), instead of the existing allow-list of leasable system descriptors we now have `UnleasableSystemDescriptors` defined in `systemschema`, a deny-list comprised of: - the system database (1), - the descriptor table (3), - the lease table (11), - the rangelog table (13), - the namespace table (30). All these changes contribute to reducing the number of round-trips to the storage layer. Release note: None
- Loading branch information
Marius Posta
committed
Aug 19, 2021
1 parent
b16c86d
commit a321822
Showing
69 changed files
with
3,409 additions
and
3,002 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 18 additions & 18 deletions
36
pkg/ccl/benchccl/rttanalysisccl/testdata/benchmark_expectations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
exp,benchmark | ||
25,AlterPrimaryRegion/alter_empty_database_alter_primary_region | ||
25,AlterPrimaryRegion/alter_empty_database_set_initial_primary_region | ||
25,AlterPrimaryRegion/alter_populated_database_alter_primary_region | ||
26,AlterPrimaryRegion/alter_populated_database_set_initial_primary_region | ||
22,AlterRegions/alter_empty_database_add_region | ||
23,AlterRegions/alter_empty_database_drop_region | ||
22,AlterRegions/alter_populated_database_add_region | ||
23,AlterRegions/alter_populated_database_drop_region | ||
25,AlterSurvivalGoals/alter_empty_database_from_region_to_zone | ||
25,AlterSurvivalGoals/alter_empty_database_from_zone_to_region | ||
65,AlterSurvivalGoals/alter_populated_database_from_region_to_zone | ||
65,AlterSurvivalGoals/alter_populated_database_from_zone_to_region | ||
24,AlterTableLocality/alter_from_global_to_rbr | ||
28,AlterTableLocality/alter_from_global_to_regional_by_table | ||
22,AlterTableLocality/alter_from_rbr_to_global | ||
22,AlterTableLocality/alter_from_rbr_to_regional_by_table | ||
28,AlterTableLocality/alter_from_regional_by_table_to_global | ||
24,AlterTableLocality/alter_from_regional_by_table_to_rbr | ||
21,AlterPrimaryRegion/alter_empty_database_alter_primary_region | ||
22,AlterPrimaryRegion/alter_empty_database_set_initial_primary_region | ||
21,AlterPrimaryRegion/alter_populated_database_alter_primary_region | ||
23,AlterPrimaryRegion/alter_populated_database_set_initial_primary_region | ||
20,AlterRegions/alter_empty_database_add_region | ||
21,AlterRegions/alter_empty_database_drop_region | ||
20,AlterRegions/alter_populated_database_add_region | ||
21,AlterRegions/alter_populated_database_drop_region | ||
21,AlterSurvivalGoals/alter_empty_database_from_region_to_zone | ||
21,AlterSurvivalGoals/alter_empty_database_from_zone_to_region | ||
41,AlterSurvivalGoals/alter_populated_database_from_region_to_zone | ||
41,AlterSurvivalGoals/alter_populated_database_from_zone_to_region | ||
22,AlterTableLocality/alter_from_global_to_rbr | ||
24,AlterTableLocality/alter_from_global_to_regional_by_table | ||
20,AlterTableLocality/alter_from_rbr_to_global | ||
20,AlterTableLocality/alter_from_rbr_to_regional_by_table | ||
24,AlterTableLocality/alter_from_regional_by_table_to_global | ||
22,AlterTableLocality/alter_from_regional_by_table_to_rbr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.