Skip to content

Commit

Permalink
tickle dropped desc bug
Browse files Browse the repository at this point in the history
  • Loading branch information
msbutler committed Nov 14, 2022
1 parent 49ae84a commit cf4a7d3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pkg/ccl/backupccl/backuputils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ func AppendPaths(uris []string, tailDir ...string) ([]string, error) {
func ValidateDescriptors(
ctx context.Context, descriptors catalog.Descriptors, version roachpb.Version,
) (bool, string, error) {
descTable := make(doctor.DescriptorTable, len(descriptors))
namespaceTable := make(doctor.NamespaceTable, len(descriptors))
descTable := make(doctor.DescriptorTable, 0, len(descriptors))
namespaceTable := make(doctor.NamespaceTable, 0, len(descriptors))

for _, desc := range descriptors {
bytes, err := protoutil.Marshal(desc.DescriptorProto())
Expand Down
8 changes: 4 additions & 4 deletions pkg/ccl/backupccl/restore_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -701,8 +701,8 @@ func validateRestoredDescriptors(ctx context.Context, execConfig *sql.ExecutorCo
if err != nil {
return err
}
targetDescs := make([]catalog.Descriptor, 0)
for _, desc := range allDescs {
// targetDescs := make([]catalog.Descriptor, 0)
/*for _, desc := range allDescs {
// While we could filter out descriptors that aren't targets of the restore,
// this would cause a spurious validation failure if the restoring
// descriptors have references to descriptors that already exist in the
Expand All @@ -714,8 +714,8 @@ func validateRestoredDescriptors(ctx context.Context, execConfig *sql.ExecutorCo
// when they're in the dropped stage.
continue
}
}
ok, invalidMsg, err := backuputils.ValidateDescriptors(ctx, targetDescs,
}*/
ok, invalidMsg, err := backuputils.ValidateDescriptors(ctx, allDescs,
execConfig.Settings.Version.BinaryVersion())
if err != nil {
return err
Expand Down

0 comments on commit cf4a7d3

Please sign in to comment.