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

opt: fix data race when building filters item props #37972

Merged
merged 1 commit into from Jun 3, 2019

Conversation

Projects
None yet
3 participants
@rytaft
Copy link
Contributor

commented Jun 2, 2019

This commit fixes a race condition where two threads could be
simultaneously trying to build the logical properties of a filters
item and stepping on each others toes. In particular, one thread
could set scalar.Constraints to nil, causing a panic when another
thread tries to check whether scalar.Constraints.IsUnconstrained().
This commit fixes the issue by using a local variable to check whether
the constraint set is unconstrained.

Fixes #37951
Informs #37073
Informs #36148

Release note (bug fix): Fixed a race condition that could cause a
panic during query planning.

opt: fix data race when building filters item props
This commit fixes a race condition where two threads could be
simultaneously trying to build the logical properties of a filters
item and stepping on each others toes. In particular, one thread
could set scalar.Constraints to nil, causing a panic when another
thread tries to check whether scalar.Constraints.IsUnconstrained().
This commit fixes the issue by using a local variable to check whether
the constraint set is unconstrained.

Fixes #37951
Informs #37073
Informs #36148

Release note (bug fix): Fixed a race condition that could cause a
panic during query planning.

@rytaft rytaft requested review from justinj, RaduBerinde and andy-kimball Jun 2, 2019

@rytaft rytaft requested a review from cockroachdb/sql-opt-prs as a code owner Jun 2, 2019

@cockroach-teamcity

This comment has been minimized.

Copy link
Member

commented Jun 2, 2019

This change is Reviewable

@RaduBerinde
Copy link
Member

left a comment

LGTM, thanks!

@rytaft
Copy link
Contributor Author

left a comment

bors r+

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @andy-kimball and @justinj)

craig bot pushed a commit that referenced this pull request Jun 3, 2019

Merge #37972
37972: opt: fix data race when building filters item props r=rytaft a=rytaft

This commit fixes a race condition where two threads could be
simultaneously trying to build the logical properties of a filters
item and stepping on each others toes. In particular, one thread
could set `scalar.Constraints` to nil, causing a panic when another
thread tries to check whether `scalar.Constraints.IsUnconstrained()`.
This commit fixes the issue by using a local variable to check whether
the constraint set is unconstrained.

Fixes #37951
Informs #37073
Informs #36148

Release note (bug fix): Fixed a race condition that could cause a
panic during query planning.

Co-authored-by: Rebecca Taft <becca@cockroachlabs.com>
@craig

This comment has been minimized.

Copy link

commented Jun 3, 2019

Build succeeded

@craig craig bot merged commit d3d9c2d into cockroachdb:master Jun 3, 2019

5 checks passed

GitHub CI (Cockroach) TeamCity build finished
Details
bors Build succeeded
Details
license/cla Contributor License Agreement is signed.
Details
security/snyk - Gopkg.lock (tim) No manifest changes detected
security/snyk - pkg/ui/package.json (tim) No manifest changes detected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.