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

release-20.2: opt: fix panic due to concurrent map writes when copying metadata #66801

Closed
wants to merge 1 commit into from

Conversation

rytaft
Copy link
Collaborator

@rytaft rytaft commented Jun 23, 2021

Backport 1/1 commits from #66792.

/cc @cockroachdb/release


This commit fixes a bug that caused a panic due to concurrent map writes
when copying table metadata. The fix is to make a deep copy of the map
before updating it.

Fixes #66717

Release note (bug fix): Fixed a panic that could occur in the optimizer
when executing a prepared plan with placeholders. This could happen when
one of the tables used by the query had computed columns or a partial
index.

This commit fixes a bug that caused a panic due to concurrent map writes
when copying table metadata. The fix is to make a deep copy of the map
before updating it.

Fixes cockroachdb#66717

Release note (bug fix): Fixed a panic that could occur in the optimizer
when executing a prepared plan with placeholders. This could happen when
one of the tables used by the query had computed columns or a partial
index.
@rytaft rytaft requested review from RaduBerinde and a team June 23, 2021 21:34
@rytaft rytaft requested a review from a team as a code owner June 23, 2021 21:34
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@michae2 michae2 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 1 of 1 files at r1.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @RaduBerinde)

@rytaft
Copy link
Collaborator Author

rytaft commented Jun 23, 2021

TFTR! But I'm going to close this and reopen with the new updates. I was too hasty.

@rytaft rytaft closed this Jun 23, 2021
@rytaft rytaft deleted the backport20.2-66792 branch June 23, 2021 22:07
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