Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql/catalog/typedesc: fix bug which partially hydrated a type #85940

Merged

Conversation

ajwerner
Copy link
Contributor

@ajwerner ajwerner commented Aug 11, 2022

In rare cases where we hit an error hydrating the contained type of an
array alias type, we'd populate the name, but not the contents.

Fixes #85376

Release note (bug fix): Fixed a rare bug where errors could occur related
to the use of arrays of enums.

In rare cases where we hit an error hydrating the contained type of an
array alias type, we'd populate the name, but not the contents.

Release note (bug fix): Fixed a rare bug where errors could occur related
to the use of arrays of enums.
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@fqazi fqazi left a comment

Choose a reason for hiding this comment

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

:lgtm:

One question below for curiosity.

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @ajwerner)


pkg/sql/catalog/typedesc/type_desc.go line 898 at r1 (raw file):

				elemType := typ.ArrayContents()
				if err := EnsureTypeIsHydrated(ctx, elemType, res); err != nil {
					return err

Does this mean we are also ignoring errors somewhere? Or is it just a side effect of mutating the descriptor and caching?

Copy link
Contributor Author

@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.

TFTR!

bors r=fqazi

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @fqazi)


pkg/sql/catalog/typedesc/type_desc.go line 898 at r1 (raw file):

Previously, fqazi (Faizan Qazi) wrote…

Does this mean we are also ignoring errors somewhere? Or is it just a side effect of mutating the descriptor and caching?

I don't think we were ignoring these errors, no.

@ajwerner
Copy link
Contributor Author

4352 runs so far, 0 failures, over 1h8m15s whereas before it'd always fail within 1000 runs. I feel good about calling this the fix.

@craig
Copy link
Contributor

craig bot commented Aug 11, 2022

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Aug 11, 2022

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Aug 11, 2022

Build succeeded:

@blathers-crl
Copy link

blathers-crl bot commented Aug 11, 2022

Encountered an error creating backports. Some common things that can go wrong:

  1. The backport branch might have already existed.
  2. There was a merge conflict.
  3. The backport branch contained merge commits.

You might need to create your backport manually using the backport tool.


error creating merge commit from 6b37080 to blathers/backport-release-21.2-85940: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict []

you may need to manually resolve merge conflicts with the backport tool.

Backport to branch 21.2.x failed. See errors above.


🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

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.

pkg/sql/logictest/tests/fakedist-vec-off/fakedist-vec-off_test: TestLogic_enums failed
3 participants