Skip to content

Commit

Permalink
catkv: replace StoredCatalog with cached CatalogReader
Browse files Browse the repository at this point in the history
This commit leverages the previous one and uses nstree.Catalog as the
data structure for caching all catalog data read by catkv.CatalogReader.
The StoredCatalog object is removed in favor of a cached CatalogReader
implementation.

This results in more consistent behavior when reading descriptors,
comments and zone configs.

Informs cockroachdb#88571.

Release note: None
  • Loading branch information
Marius Posta committed Dec 8, 2022
1 parent 957a9ba commit 21f2fbb
Show file tree
Hide file tree
Showing 18 changed files with 1,078 additions and 1,104 deletions.
120 changes: 60 additions & 60 deletions pkg/bench/rttanalysis/testdata/benchmark_expectations
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
exp,benchmark
10,AlterRole/alter_role_with_1_option
13,AlterRole/alter_role_with_2_options
17,AlterRole/alter_role_with_3_options
10,AlterTableAddCheckConstraint/alter_table_add_1_check_constraint
10,AlterTableAddCheckConstraint/alter_table_add_2_check_constraints
10,AlterTableAddCheckConstraint/alter_table_add_3_check_constraints
16,AlterTableAddColumn/alter_table_add_1_column
16,AlterTableAddColumn/alter_table_add_2_columns
16,AlterTableAddColumn/alter_table_add_3_columns
14,AlterTableAddForeignKey/alter_table_add_1_foreign_key
18,AlterTableAddForeignKey/alter_table_add_2_foreign_keys
22,AlterTableAddForeignKey/alter_table_add_3_foreign_keys
14,AlterTableAddForeignKey/alter_table_add_foreign_key_with_3_columns
11,AlterRole/alter_role_with_1_option
14,AlterRole/alter_role_with_2_options
19,AlterRole/alter_role_with_3_options
9,AlterTableAddCheckConstraint/alter_table_add_1_check_constraint
9,AlterTableAddCheckConstraint/alter_table_add_2_check_constraints
9,AlterTableAddCheckConstraint/alter_table_add_3_check_constraints
12,AlterTableAddColumn/alter_table_add_1_column
12,AlterTableAddColumn/alter_table_add_2_columns
12,AlterTableAddColumn/alter_table_add_3_columns
13,AlterTableAddForeignKey/alter_table_add_1_foreign_key
17,AlterTableAddForeignKey/alter_table_add_2_foreign_keys
21,AlterTableAddForeignKey/alter_table_add_3_foreign_keys
13,AlterTableAddForeignKey/alter_table_add_foreign_key_with_3_columns
8,AlterTableConfigureZone/alter_table_configure_zone_5_replicas
8,AlterTableConfigureZone/alter_table_configure_zone_7_replicas_
8,AlterTableConfigureZone/alter_table_configure_zone_ranges
16,AlterTableDropColumn/alter_table_drop_1_column
16,AlterTableDropColumn/alter_table_drop_2_columns
16,AlterTableDropColumn/alter_table_drop_3_columns
10,AlterTableDropConstraint/alter_table_drop_1_check_constraint
10,AlterTableDropConstraint/alter_table_drop_2_check_constraints
10,AlterTableDropConstraint/alter_table_drop_3_check_constraints
12,AlterTableDropColumn/alter_table_drop_1_column
12,AlterTableDropColumn/alter_table_drop_2_columns
12,AlterTableDropColumn/alter_table_drop_3_columns
9,AlterTableDropConstraint/alter_table_drop_1_check_constraint
9,AlterTableDropConstraint/alter_table_drop_2_check_constraints
9,AlterTableDropConstraint/alter_table_drop_3_check_constraints
9,AlterTableSplit/alter_table_split_at_1_value
13,AlterTableSplit/alter_table_split_at_2_values
17,AlterTableSplit/alter_table_split_at_3_values
7,AlterTableUnsplit/alter_table_unsplit_at_1_value
9,AlterTableUnsplit/alter_table_unsplit_at_2_values
11,AlterTableUnsplit/alter_table_unsplit_at_3_values
12,CreateRole/create_role_with_1_option
15,CreateRole/create_role_with_2_options
18,CreateRole/create_role_with_3_options
13,CreateRole/create_role_with_no_options
12,DropDatabase/drop_database_0_tables
14,DropDatabase/drop_database_1_table
14,DropDatabase/drop_database_2_tables
15,DropDatabase/drop_database_3_tables
18,DropRole/drop_1_role
26,DropRole/drop_2_roles
34,DropRole/drop_3_roles
13,DropSequence/drop_1_sequence
15,DropSequence/drop_2_sequences
17,DropSequence/drop_3_sequences
14,DropTable/drop_1_table
15,DropTable/drop_2_tables
17,DropTable/drop_3_tables
15,DropView/drop_1_view
16,DropView/drop_2_views
16,DropView/drop_3_views
11,Grant/grant_all_on_1_table
12,Grant/grant_all_on_2_tables
12,Grant/grant_all_on_3_tables
9,GrantRole/grant_1_role
11,GrantRole/grant_2_roles
15,CreateRole/create_role_with_1_option
18,CreateRole/create_role_with_2_options
21,CreateRole/create_role_with_3_options
16,CreateRole/create_role_with_no_options
10,DropDatabase/drop_database_0_tables
11,DropDatabase/drop_database_1_table
12,DropDatabase/drop_database_2_tables
13,DropDatabase/drop_database_3_tables
19,DropRole/drop_1_role
27,DropRole/drop_2_roles
35,DropRole/drop_3_roles
11,DropSequence/drop_1_sequence
12,DropSequence/drop_2_sequences
13,DropSequence/drop_3_sequences
11,DropTable/drop_1_table
12,DropTable/drop_2_tables
13,DropTable/drop_3_tables
12,DropView/drop_1_view
13,DropView/drop_2_views
13,DropView/drop_3_views
10,Grant/grant_all_on_1_table
11,Grant/grant_all_on_2_tables
11,Grant/grant_all_on_3_tables
10,GrantRole/grant_1_role
12,GrantRole/grant_2_roles
3,ORMQueries/activerecord_type_introspection_query
3,ORMQueries/django_table_introspection_1_table
3,ORMQueries/django_table_introspection_4_tables
Expand All @@ -69,31 +69,31 @@ exp,benchmark
6,ORMQueries/has_table_privilege_5
85,ORMQueries/hasura_column_descriptions
85,ORMQueries/hasura_column_descriptions_8_tables
7,ORMQueries/hasura_column_descriptions_modified
6,ORMQueries/hasura_column_descriptions_modified
4,ORMQueries/information_schema._pg_index_position
3,ORMQueries/pg_attribute
3,ORMQueries/pg_class
10,ORMQueries/pg_is_other_temp_schema
18,ORMQueries/pg_is_other_temp_schema_multiple_times
9,ORMQueries/pg_is_other_temp_schema
17,ORMQueries/pg_is_other_temp_schema_multiple_times
4,ORMQueries/pg_my_temp_schema
4,ORMQueries/pg_my_temp_schema_multiple_times
4,ORMQueries/pg_namespace
3,ORMQueries/pg_type
11,Revoke/revoke_all_on_1_table
12,Revoke/revoke_all_on_2_tables
12,Revoke/revoke_all_on_3_tables
9,RevokeRole/revoke_1_role
11,RevokeRole/revoke_2_roles
10,Revoke/revoke_all_on_1_table
11,Revoke/revoke_all_on_2_tables
11,Revoke/revoke_all_on_3_tables
10,RevokeRole/revoke_1_role
12,RevokeRole/revoke_2_roles
1,SystemDatabaseQueries/select_system.users_with_empty_database_Name
1,SystemDatabaseQueries/select_system.users_with_schema_Name
2,SystemDatabaseQueries/select_system.users_without_schema_Name
13,Truncate/truncate_1_column_0_rows
13,Truncate/truncate_1_column_1_row
13,Truncate/truncate_1_column_2_rows
13,Truncate/truncate_2_column_0_rows
13,Truncate/truncate_2_column_1_rows
13,Truncate/truncate_2_column_2_rows
12,Truncate/truncate_1_column_0_rows
12,Truncate/truncate_1_column_1_row
12,Truncate/truncate_1_column_2_rows
12,Truncate/truncate_2_column_0_rows
12,Truncate/truncate_2_column_1_rows
12,Truncate/truncate_2_column_2_rows
1,VirtualTableQueries/select_crdb_internal.invalid_objects_with_1_fk
1,VirtualTableQueries/select_crdb_internal.tables_with_1_fk
4,VirtualTableQueries/virtual_table_cache_with_point_lookups
2,VirtualTableQueries/select_crdb_internal.tables_with_1_fk
5,VirtualTableQueries/virtual_table_cache_with_point_lookups
9,VirtualTableQueries/virtual_table_cache_with_schema_change
28 changes: 14 additions & 14 deletions pkg/ccl/benchccl/rttanalysisccl/testdata/benchmark_expectations
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
exp,benchmark
11,AlterPrimaryRegion/alter_empty_database_alter_primary_region
14,AlterPrimaryRegion/alter_empty_database_set_initial_primary_region
11,AlterPrimaryRegion/alter_populated_database_alter_primary_region
15,AlterPrimaryRegion/alter_populated_database_set_initial_primary_region
11,AlterRegions/alter_empty_database_add_region
13,AlterRegions/alter_empty_database_drop_region
11,AlterRegions/alter_populated_database_add_region
13,AlterRegions/alter_populated_database_drop_region
10,AlterPrimaryRegion/alter_empty_database_alter_primary_region
13,AlterPrimaryRegion/alter_empty_database_set_initial_primary_region
10,AlterPrimaryRegion/alter_populated_database_alter_primary_region
14,AlterPrimaryRegion/alter_populated_database_set_initial_primary_region
10,AlterRegions/alter_empty_database_add_region
12,AlterRegions/alter_empty_database_drop_region
10,AlterRegions/alter_populated_database_add_region
12,AlterRegions/alter_populated_database_drop_region
11,AlterSurvivalGoals/alter_empty_database_from_region_to_zone
11,AlterSurvivalGoals/alter_empty_database_from_zone_to_region
21,AlterSurvivalGoals/alter_populated_database_from_region_to_zone
21,AlterSurvivalGoals/alter_populated_database_from_zone_to_region
14,AlterTableLocality/alter_from_global_to_rbr
12,AlterTableLocality/alter_from_global_to_regional_by_table
10,AlterTableLocality/alter_from_rbr_to_global
10,AlterTableLocality/alter_from_rbr_to_regional_by_table
12,AlterTableLocality/alter_from_regional_by_table_to_global
14,AlterTableLocality/alter_from_regional_by_table_to_rbr
12,AlterTableLocality/alter_from_global_to_rbr
11,AlterTableLocality/alter_from_global_to_regional_by_table
8,AlterTableLocality/alter_from_rbr_to_global
8,AlterTableLocality/alter_from_rbr_to_regional_by_table
11,AlterTableLocality/alter_from_regional_by_table_to_global
12,AlterTableLocality/alter_from_regional_by_table_to_rbr
Loading

0 comments on commit 21f2fbb

Please sign in to comment.