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

ccl/sqlproxyccl: fix TestConnectionMigration test flake #83457

Merged
merged 1 commit into from
Jun 27, 2022

Conversation

jaylim-crl
Copy link
Collaborator

Fixes #83096.

It appears that database/sql does not provide any thread-safe guarantees for
methods on the Conn type except the Close method. This commit fixes a test-only
issue that causes a panic when there's a race between internal Conn methods
by ensuring that Conn methods are used in a single-threaded way.

Release note: None

Release justification: sqlproxy only test change.

Fixes cockroachdb#83096.

It appears that database/sql does not provide any thread-safe guarantees for
methods on the Conn type except the Close method. This commit fixes a test-only
issue that causes a panic when there's a race between internal Conn methods
by ensuring that Conn methods are used in a single-threaded way.

Release note: None

Release justification: sqlproxy only test change.
@jaylim-crl jaylim-crl requested review from a team as code owners June 27, 2022 20:06
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@jaylim-crl jaylim-crl requested review from jeffswenson and rafiss and removed request for a team June 27, 2022 20:06
Copy link
Collaborator

@jeffswenson jeffswenson left a comment

Choose a reason for hiding this comment

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

LGTM

@jaylim-crl
Copy link
Collaborator Author

TFTR!

bors r=JeffSwenson,rafiss

@craig
Copy link
Contributor

craig bot commented Jun 27, 2022

Build succeeded:

@craig craig bot merged commit 9dfdf1b into cockroachdb:master Jun 27, 2022
@jaylim-crl jaylim-crl deleted the jay/220627-fix-test-flake branch November 30, 2022 16:55
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.

ccl/sqlproxyccl: TestConnectionMigration failed
4 participants