Skip to content

sql/catalog: add return error to RunPostDeserializationChanges#77483

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
rafiss:error-runPostDeserializationChanges
Mar 9, 2022
Merged

sql/catalog: add return error to RunPostDeserializationChanges#77483
craig[bot] merged 1 commit intocockroachdb:masterfrom
rafiss:error-runPostDeserializationChanges

Conversation

@rafiss
Copy link
Copy Markdown
Collaborator

@rafiss rafiss commented Mar 8, 2022

Release justification: low risk enhancement to existing functionality.

Release note: None

@rafiss rafiss requested review from a team, e-mbrown and msbutler and removed request for a team March 8, 2022 14:10
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@rafiss rafiss requested review from a team and ajwerner March 8, 2022 14:10
Copy link
Copy Markdown
Contributor

@ajwerner ajwerner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 16 of 17 files at r1, all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @e-mbrown, @msbutler, and @rafiss)


pkg/ccl/backupccl/restore_planning.go, line 872 at r1 (raw file):

		}
		if err := b.RunPostDeserializationChanges(); err != nil {
			return err

can you wrap this with an assertion failure and note that it's running PostDeserializationChanges?


pkg/sql/catalog/descriptor.go, line 78 at r1 (raw file):

	// RunPostDeserializationChanges attempts to perform changes to the descriptor
	// being built from a deserialized protobuf.
	RunPostDeserializationChanges() error

Please note that any error should be treated an assertion failure and indicates corruption.


pkg/sql/catalog/descs/kv_descriptors.go, line 247 at r1 (raw file):

		b := desc.NewBuilder()
		if err := b.RunPostDeserializationChanges(); err != nil {
			return nil, err

can you wrap this with an assertion failure and note that it's running PostDeserializationChanges?


pkg/sql/catalog/internal/catkv/catalog_query.go, line 207 at r1 (raw file):

	}
	if err := b.RunPostDeserializationChanges(); err != nil {
		return nil, err

can you wrap this with an assertion failure and note that it's running PostDeserializationChanges?


pkg/sql/catalog/systemschema/system.go, line 800 at r1 (raw file):

	if err := b.RunPostDeserializationChanges(); err != nil {
		log.Fatalf(
			ctx, "System table %q cannot be registered, error during RunPostDeserializationChanges: %+v",

nit: message shouldn't be capitalized.


pkg/sql/doctor/doctor.go, line 85 at r1 (raw file):

		if b != nil {
			if err := b.RunPostDeserializationChanges(); err != nil {
				return nil, err

can you wrap this?


pkg/sql/doctor/doctor.go, line 98 at r1 (raw file):

		b := desc.NewBuilder()
		if err := b.RunPostDeserializationChanges(); err != nil {
			return nil, err

can you wrap this?

Copy link
Copy Markdown
Collaborator Author

@rafiss rafiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @ajwerner, @e-mbrown, and @msbutler)


pkg/ccl/backupccl/restore_planning.go, line 872 at r1 (raw file):

Previously, ajwerner wrote…

can you wrap this with an assertion failure and note that it's running PostDeserializationChanges?

Done.


pkg/sql/catalog/descriptor.go, line 78 at r1 (raw file):

Previously, ajwerner wrote…

Please note that any error should be treated an assertion failure and indicates corruption.

Done.


pkg/sql/catalog/descs/kv_descriptors.go, line 247 at r1 (raw file):

Previously, ajwerner wrote…

can you wrap this with an assertion failure and note that it's running PostDeserializationChanges?

Done.


pkg/sql/catalog/internal/catkv/catalog_query.go, line 207 at r1 (raw file):

Previously, ajwerner wrote…

can you wrap this with an assertion failure and note that it's running PostDeserializationChanges?

Done.


pkg/sql/catalog/systemschema/system.go, line 800 at r1 (raw file):

Previously, ajwerner wrote…

nit: message shouldn't be capitalized.

fixed this one and the existing one above


pkg/sql/doctor/doctor.go, line 85 at r1 (raw file):

Previously, ajwerner wrote…

can you wrap this?

Done.


pkg/sql/doctor/doctor.go, line 98 at r1 (raw file):

Previously, ajwerner wrote…

can you wrap this?

Done.

@rafiss rafiss force-pushed the error-runPostDeserializationChanges branch from 0d9d67e to c14632a Compare March 8, 2022 17:32
@rafiss rafiss requested a review from ajwerner March 8, 2022 17:32
Copy link
Copy Markdown
Contributor

@ajwerner ajwerner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 6 of 6 files at r2, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @e-mbrown and @msbutler)

@rafiss
Copy link
Copy Markdown
Collaborator Author

rafiss commented Mar 8, 2022

looks like a flake from Examples-ORMs. i re-ran just that job and it passed

bors r=ajwerner

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Mar 8, 2022

Build failed (retrying...):

Release justification: low risk enhancement to existing functionality.

Release note: None
@rafiss rafiss force-pushed the error-runPostDeserializationChanges branch from c14632a to 02adcd7 Compare March 8, 2022 23:29
@craig
Copy link
Copy Markdown
Contributor

craig bot commented Mar 8, 2022

Canceled.

@rafiss
Copy link
Copy Markdown
Collaborator Author

rafiss commented Mar 8, 2022

bors r=ajwerner

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Mar 9, 2022

Build succeeded:

@craig craig bot merged commit f15acd1 into cockroachdb:master Mar 9, 2022
@rafiss rafiss deleted the error-runPostDeserializationChanges branch March 9, 2022 03:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants