Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
93364: diagnosticccl: minor test clean r=andreimatei a=andreimatei

This test was using a storage node's Stopper in conjunction with a tenant server's component (the Reporter). That's not kosher - we were creating a trace having a parent span created with the storage node's Tracer, and a child created with the tenant's Tracer. Combining Tracers like that in a single trace is not allowed. The test is getting away with it because the parent span happened to be created with the "sterile" option, and sterile spans were allowed to be combined with children created with other Tracers as an exception for arcane reasons, but that's going away.

Release note: None
Epic: None

93450: vendor: bump Pebble to 0893071d8a52 r=jbowens a=jbowens

```
    6e8d3bb3 db: add NextPrefix to Iterator
    6311f7a9 db: add RangeKeyIteratorStats
    06047857 db: refactor merging iterator's prefix handling for TrySeekUsingNext
    e0f0de89 bench: add --max-size flag
    88c8fbcc *: use golang.org/x/sys package
```

Epic: None
Release note: None

93543: descs: refactor GetAll* methods r=postamar a=postamar

This commit refactors the descs.Collection's GetAll* methods, which
return descriptors and other catalog metadata in bulk, to share a common
access path in which the descriptor's layers are properly aggregated.
This is non-trivial as there are numerous edge cases:
  - virtual schemas and objects exist for all databases and their
    descriptors don't reference the parent database at all,
  - descriptorless public schemas and temporary schemas only exist as
    namespace entries,
  - functions don't have namespace entries,
  - and so forth.

These new methods are delegated to by the existing methods which are now
deprecated.

Informs #64089.

Release note: None

Co-authored-by: Andrei Matei <[email protected]>
Co-authored-by: Jackson Owens <[email protected]>
Co-authored-by: Marius Posta <[email protected]>
  • Loading branch information
4 people committed Dec 14, 2022
4 parents d6931b2 + eabba2a + 0c6ae48 + 94642ea commit 3f94d3d
Show file tree
Hide file tree
Showing 44 changed files with 648 additions and 389 deletions.
12 changes: 6 additions & 6 deletions DEPS.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1485,10 +1485,10 @@ def go_deps():
patches = [
"@com_github_cockroachdb_cockroach//build/patches:com_github_cockroachdb_pebble.patch",
],
sha256 = "76575b5e3c38334308d006475c1ec3cdf714ceaa4ae3baef8945046f943fab75",
strip_prefix = "github.com/cockroachdb/[email protected]20221207223118-463b049c1dd1",
sha256 = "0401364025128ab1d3d592293d0c3e1109eb6b50f6c30bb948c5743e7200e9e1",
strip_prefix = "github.com/cockroachdb/[email protected]20221212215000-0893071d8a52",
urls = [
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20221207223118-463b049c1dd1.zip",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20221212215000-0893071d8a52.zip",
],
)
go_repository(
Expand Down Expand Up @@ -9614,10 +9614,10 @@ def go_deps():
name = "org_golang_x_sys",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/sys",
sha256 = "5ebd34faf34cfb7824ed6d12e95e793c8564ccc989af9f9c7998422c36ec9838",
strip_prefix = "golang.org/x/sys@v0.0.0-20220811171246-fbc7d0a398ab",
sha256 = "cbdf18e3be9f211ca962684ac19d41d4be24042898ec0cc664bf8d1c2955d384",
strip_prefix = "golang.org/x/sys@v0.3.0",
urls = [
"https://storage.googleapis.com/cockroach-godeps/gomod/golang.org/x/sys/org_golang_x_sys-v0.0.0-20220811171246-fbc7d0a398ab.zip",
"https://storage.googleapis.com/cockroach-godeps/gomod/golang.org/x/sys/org_golang_x_sys-v0.3.0.zip",
],
)
go_repository(
Expand Down
4 changes: 2 additions & 2 deletions build/bazelutil/distdir_files.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ DISTDIR_FILES = {
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/google-api-go-client/com_github_cockroachdb_google_api_go_client-v0.80.1-0.20221117193156-6a9f7150cb93.zip": "b3378c579f4f4340403038305907d672c86f615f8233118a8873ebe4229c4f39",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/gostdlib/com_github_cockroachdb_gostdlib-v1.19.0.zip": "c4d516bcfe8c07b6fc09b8a9a07a95065b36c2855627cb3514e40c98f872b69e",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/logtags/com_github_cockroachdb_logtags-v0.0.0-20211118104740-dabe8e521a4f.zip": "1972c3f171f118add3fd9e64bcea6cbb9959a3b7fa0ada308e8a7310813fea74",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20221207223118-463b049c1dd1.zip": "76575b5e3c38334308d006475c1ec3cdf714ceaa4ae3baef8945046f943fab75",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20221212215000-0893071d8a52.zip": "0401364025128ab1d3d592293d0c3e1109eb6b50f6c30bb948c5743e7200e9e1",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/redact/com_github_cockroachdb_redact-v1.1.3.zip": "7778b1e4485e4f17f35e5e592d87eb99c29e173ac9507801d000ad76dd0c261e",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/returncheck/com_github_cockroachdb_returncheck-v0.0.0-20200612231554-92cdbca611dd.zip": "ce92ba4352deec995b1f2eecf16eba7f5d51f5aa245a1c362dfe24c83d31f82b",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/sentry-go/com_github_cockroachdb_sentry_go-v0.6.1-cockroachdb.2.zip": "fbb2207d02aecfdd411b1357efe1192dbb827959e36b7cab7491731ac55935c9",
Expand Down Expand Up @@ -896,7 +896,7 @@ DISTDIR_FILES = {
"https://storage.googleapis.com/cockroach-godeps/gomod/golang.org/x/oauth2/org_golang_x_oauth2-v0.0.0-20220411215720-9780585627b5.zip": "81f60a99f4f3bcb34993ca5831386d8399c472a0ca4dc6f1e3659a071d002029",
"https://storage.googleapis.com/cockroach-godeps/gomod/golang.org/x/perf/org_golang_x_perf-v0.0.0-20180704124530-6e6d33e29852.zip": "a2c7d02cc94c4ba767b6322f70ddcba4941cb5f60fed1bada3aa7a4d3a8128f1",
"https://storage.googleapis.com/cockroach-godeps/gomod/golang.org/x/sync/org_golang_x_sync-v0.0.0-20220722155255-886fb9371eb4.zip": "39d2431ae1db11be34b4012b719e7bcec1572006a122d44509da038a5b498ff1",
"https://storage.googleapis.com/cockroach-godeps/gomod/golang.org/x/sys/org_golang_x_sys-v0.0.0-20220811171246-fbc7d0a398ab.zip": "5ebd34faf34cfb7824ed6d12e95e793c8564ccc989af9f9c7998422c36ec9838",
"https://storage.googleapis.com/cockroach-godeps/gomod/golang.org/x/sys/org_golang_x_sys-v0.3.0.zip": "cbdf18e3be9f211ca962684ac19d41d4be24042898ec0cc664bf8d1c2955d384",
"https://storage.googleapis.com/cockroach-godeps/gomod/golang.org/x/term/org_golang_x_term-v0.0.0-20210927222741-03fcf44c2211.zip": "3adf713afa49fe26580ffe4adb1f4fb2f4921c945301aa5a9fb6d34031fa30cd",
"https://storage.googleapis.com/cockroach-godeps/gomod/golang.org/x/text/org_golang_x_text-v0.3.7.zip": "e1a9115e61a38da8bdc893d0ba83b65f89cc1114f152a98eb572c5ea6551e8d4",
"https://storage.googleapis.com/cockroach-godeps/gomod/golang.org/x/time/org_golang_x_time-v0.0.0-20210723032227-1f47c861a9ac.zip": "e5d8ade42804ec7d96a632c031dde7db087e8bc4cd5dfd6f38df03ce4f16d9b6",
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ require (
golang.org/x/net v0.0.0-20220722155237-a158d28d115b
golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab
golang.org/x/sys v0.3.0
golang.org/x/text v0.3.7
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac
golang.org/x/tools v0.1.12
Expand Down Expand Up @@ -112,7 +112,7 @@ require (
github.com/cockroachdb/go-test-teamcity v0.0.0-20191211140407-cff980ad0a55
github.com/cockroachdb/gostdlib v1.19.0
github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f
github.com/cockroachdb/pebble v0.0.0-20221207223118-463b049c1dd1
github.com/cockroachdb/pebble v0.0.0-20221212215000-0893071d8a52
github.com/cockroachdb/redact v1.1.3
github.com/cockroachdb/returncheck v0.0.0-20200612231554-92cdbca611dd
github.com/cockroachdb/stress v0.0.0-20220803192808-1806698b1b7b
Expand Down
7 changes: 4 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,8 @@ github.com/cockroachdb/gostdlib v1.19.0/go.mod h1:+dqqpARXbE/gRDEhCak6dm0l14AaTy
github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI=
github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f h1:6jduT9Hfc0njg5jJ1DdKCFPdMBrp/mdZfCpa5h+WM74=
github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs=
github.com/cockroachdb/pebble v0.0.0-20221207223118-463b049c1dd1 h1:KRKt6vnkAGZ4AOlPIwSq7GvVGdbCEzLFXWQD9OgmhlE=
github.com/cockroachdb/pebble v0.0.0-20221207223118-463b049c1dd1/go.mod h1:8vvNzfaCFGp5Yvnqu0+a1LCL5i+NCID7YsNdhe0xhM8=
github.com/cockroachdb/pebble v0.0.0-20221212215000-0893071d8a52 h1:kT8xHygytiJSQpqKv01NpGMG3ZdTlCjr9lW5K5RDh+k=
github.com/cockroachdb/pebble v0.0.0-20221212215000-0893071d8a52/go.mod h1:JsehdjcR1QgLZkqBeYrbVdE3cdxbdrycA/PN+Cg+RNw=
github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ=
github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg=
github.com/cockroachdb/returncheck v0.0.0-20200612231554-92cdbca611dd h1:KFOt5I9nEKZgCnOSmy8r4Oykh8BYQO8bFOTgHDS8YZA=
Expand Down Expand Up @@ -2716,8 +2716,9 @@ golang.org/x/sys v0.0.0-20220513210249-45d2b4557a2a/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab h1:2QkjZIsXupsJbJIdSjjUOgWK3aEtzyuh2mPt3l/CkeU=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ=
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
Expand Down
44 changes: 22 additions & 22 deletions pkg/bench/rttanalysis/testdata/benchmark_expectations
Original file line number Diff line number Diff line change
Expand Up @@ -33,29 +33,29 @@ exp,benchmark
14,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
11,DropDatabase/drop_database_2_tables
11,DropDatabase/drop_database_3_tables
18,DropRole/drop_1_role
26,DropRole/drop_2_roles
34,DropRole/drop_3_roles
11,DropSequence/drop_1_sequence
12,DropSequence/drop_2_sequences
13,DropSequence/drop_3_sequences
12,DropSequence/drop_3_sequences
11,DropTable/drop_1_table
12,DropTable/drop_2_tables
13,DropTable/drop_3_tables
12,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,Grant/grant_all_on_2_tables
10,Grant/grant_all_on_3_tables
11,GrantRole/grant_1_role
15,GrantRole/grant_2_roles
3,ORMQueries/activerecord_type_introspection_query
6,ORMQueries/django_table_introspection_1_table
6,ORMQueries/django_table_introspection_4_tables
6,ORMQueries/django_table_introspection_8_tables
4,ORMQueries/activerecord_type_introspection_query
8,ORMQueries/django_table_introspection_1_table
8,ORMQueries/django_table_introspection_4_tables
8,ORMQueries/django_table_introspection_8_tables
2,ORMQueries/has_column_privilege_using_attnum
2,ORMQueries/has_column_privilege_using_column_name
1,ORMQueries/has_schema_privilege_1
Expand All @@ -69,19 +69,19 @@ exp,benchmark
6,ORMQueries/has_table_privilege_5
85,ORMQueries/hasura_column_descriptions
85,ORMQueries/hasura_column_descriptions_8_tables
6,ORMQueries/hasura_column_descriptions_modified
4,ORMQueries/information_schema._pg_index_position
3,ORMQueries/pg_attribute
3,ORMQueries/pg_class
7,ORMQueries/pg_is_other_temp_schema
7,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
8,ORMQueries/hasura_column_descriptions_modified
6,ORMQueries/information_schema._pg_index_position
5,ORMQueries/pg_attribute
5,ORMQueries/pg_class
9,ORMQueries/pg_is_other_temp_schema
9,ORMQueries/pg_is_other_temp_schema_multiple_times
6,ORMQueries/pg_my_temp_schema
6,ORMQueries/pg_my_temp_schema_multiple_times
6,ORMQueries/pg_namespace
5,ORMQueries/pg_type
10,Revoke/revoke_all_on_1_table
11,Revoke/revoke_all_on_2_tables
11,Revoke/revoke_all_on_3_tables
10,Revoke/revoke_all_on_2_tables
10,Revoke/revoke_all_on_3_tables
9,RevokeRole/revoke_1_role
11,RevokeRole/revoke_2_roles
1,SystemDatabaseQueries/select_system.users_with_empty_database_Name
Expand Down
14 changes: 7 additions & 7 deletions pkg/ccl/backupccl/restore_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -2077,7 +2077,7 @@ func (r *restoreResumer) publishDescriptors(
// Write the new TableDescriptors and flip state over to public so they can be
// accessed.
for i := range details.TableDescs {
mutTable := all.LookupDescriptorEntry(details.TableDescs[i].GetID()).(*tabledesc.Mutable)
mutTable := all.LookupDescriptor(details.TableDescs[i].GetID()).(*tabledesc.Mutable)
// Note that we don't need to worry about the re-validated indexes for descriptors
// with a declarative schema change job.
if mutTable.GetDeclarativeSchemaChangerState() != nil {
Expand Down Expand Up @@ -2132,7 +2132,7 @@ func (r *restoreResumer) publishDescriptors(
// For all of the newly created types, make type schema change jobs for any
// type descriptors that were backed up in the middle of a type schema change.
for i := range details.TypeDescs {
typ := all.LookupDescriptorEntry(details.TypeDescs[i].GetID()).(catalog.TypeDescriptor)
typ := all.LookupDescriptor(details.TypeDescs[i].GetID()).(catalog.TypeDescriptor)
newTypes = append(newTypes, typ.TypeDesc())
if typ.GetDeclarativeSchemaChangerState() == nil &&
typ.HasPendingSchemaChanges() {
Expand All @@ -2144,19 +2144,19 @@ func (r *restoreResumer) publishDescriptors(
}
}
for i := range details.SchemaDescs {
sc := all.LookupDescriptorEntry(details.SchemaDescs[i].GetID()).(catalog.SchemaDescriptor)
sc := all.LookupDescriptor(details.SchemaDescs[i].GetID()).(catalog.SchemaDescriptor)
newSchemas = append(newSchemas, sc.SchemaDesc())
}
for i := range details.DatabaseDescs {
db := all.LookupDescriptorEntry(details.DatabaseDescs[i].GetID()).(catalog.DatabaseDescriptor)
db := all.LookupDescriptor(details.DatabaseDescs[i].GetID()).(catalog.DatabaseDescriptor)
newDBs = append(newDBs, db.DatabaseDesc())
}
for i := range details.FunctionDescs {
fn := all.LookupDescriptorEntry(details.FunctionDescs[i].GetID()).(catalog.FunctionDescriptor)
fn := all.LookupDescriptor(details.FunctionDescs[i].GetID()).(catalog.FunctionDescriptor)
newFunctions = append(newFunctions, fn.FuncDesc())
}
b := txn.NewBatch()
if err := all.ForEachDescriptorEntry(func(desc catalog.Descriptor) error {
if err := all.ForEachDescriptor(func(desc catalog.Descriptor) error {
d := desc.(catalog.MutableDescriptor)
d.SetPublic()
return descsCol.WriteDescToBatch(
Expand Down Expand Up @@ -2250,7 +2250,7 @@ func prefetchDescriptors(
got[i].GetID(), got[i].GetVersion(), expVersion[id],
)
}
all.UpsertDescriptorEntry(got[i])
all.UpsertDescriptor(got[i])
}
return all.Catalog, nil
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/ccl/backupccl/restore_planning.go
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ func maybeUpgradeDescriptors(descs []catalog.Descriptor, skipFKsWithNoMatchingTa
// A data structure for efficient descriptor lookup by ID or by name.
descCatalog := &nstree.MutableCatalog{}
for _, d := range descs {
descCatalog.UpsertDescriptorEntry(d)
descCatalog.UpsertDescriptor(d)
}

for j, desc := range descs {
Expand All @@ -781,7 +781,7 @@ func maybeUpgradeDescriptors(descs []catalog.Descriptor, skipFKsWithNoMatchingTa
if err := b.RunPostDeserializationChanges(); err != nil {
return errors.NewAssertionErrorWithWrappedErrf(err, "error during RunPostDeserializationChanges")
}
err := b.RunRestoreChanges(descCatalog.LookupDescriptorEntry)
err := b.RunRestoreChanges(descCatalog.LookupDescriptor)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/ccl/backupccl/show.go
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ func backupShowerDefault(p sql.PlanHookState, showSchemas bool, opts tree.KVOpti
if len(hydratedDescriptors) == 0 {
var c nstree.MutableCatalog
for _, desc := range descriptors {
c.UpsertDescriptorEntry(desc)
c.UpsertDescriptor(desc)
}
if err := descs.HydrateCatalog(ctx, c); err != nil {
return "", err
Expand Down
2 changes: 1 addition & 1 deletion pkg/ccl/serverccl/diagnosticsccl/reporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func TestTenantReport(t *testing.T) {
require.NotZero(t, len(last.FeatureUsage))

// Call PeriodicallyReportDiagnostics and ensure it sends out a report.
reporter.PeriodicallyReportDiagnostics(ctx, rt.server.Stopper())
reporter.PeriodicallyReportDiagnostics(ctx, tenant.Stopper())
testutils.SucceedsSoon(t, func() error {
if rt.diagServer.NumRequests() != 2 {
return errors.Errorf("did not receive a diagnostics report")
Expand Down
1 change: 1 addition & 0 deletions pkg/sql/catalog/catalog.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ type VirtualSchemas interface {
GetVirtualSchema(schemaName string) (VirtualSchema, bool)
GetVirtualSchemaByID(id descpb.ID) (VirtualSchema, bool)
GetVirtualObjectByID(id descpb.ID) (VirtualObject, bool)
Visit(func(desc Descriptor, comment string) error) error
}

// VirtualSchema represents a collection of VirtualObjects.
Expand Down
8 changes: 4 additions & 4 deletions pkg/sql/catalog/dbdesc/database_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,14 +267,14 @@ func TestValidateCrossDatabaseReferences(t *testing.T) {
var cb nstree.MutableCatalog
test.desc.Privileges = privilege
desc := NewBuilder(&test.desc).BuildImmutable()
cb.UpsertDescriptorEntry(desc)
cb.UpsertDescriptor(desc)
test.multiRegionEnum.Privileges = privilege
cb.UpsertDescriptorEntry(typedesc.NewBuilder(&test.multiRegionEnum).BuildImmutable())
cb.UpsertDescriptor(typedesc.NewBuilder(&test.multiRegionEnum).BuildImmutable())
for _, schemaDesc := range test.schemaDescs {
schemaDesc.Privileges = privilege
cb.UpsertDescriptorEntry(schemadesc.NewBuilder(&schemaDesc).BuildImmutable())
cb.UpsertDescriptor(schemadesc.NewBuilder(&schemaDesc).BuildImmutable())
}
_ = cb.ForEachDescriptorEntry(func(desc catalog.Descriptor) error {
_ = cb.ForEachDescriptor(func(desc catalog.Descriptor) error {
cb.UpsertNamespaceEntry(desc, desc.GetID(), desc.GetModificationTime())
return nil
})
Expand Down
Loading

0 comments on commit 3f94d3d

Please sign in to comment.