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

sqlstats: simplify transaction latency test #120419

Conversation

dhartunian
Copy link
Collaborator

Remove need for test case counter which causes a data race.

Fixes: #119580
Epic: None
Release note: None

@dhartunian dhartunian requested review from xinhaoz and a team March 13, 2024 17:00
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@dhartunian dhartunian force-pushed the TestTransactionServiceLatencyOnExtendedProtocol-flake branch from 5d29d14 to 2f48d18 Compare March 13, 2024 23:48
Copy link
Contributor

@abarganier abarganier 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 @dhartunian and @xinhaoz)


pkg/sql/sqlstats/sslocal/sql_stats_test.go line 772 at r1 (raw file):

	q := tc.query
	p := tc.placeholders
	tc.Unlock()

nit: here and below, can we use anonymous functions so that we can defer the unlocks?

Code quote:

	tc.Unlock()

@dhartunian dhartunian force-pushed the TestTransactionServiceLatencyOnExtendedProtocol-flake branch from 2f48d18 to b874060 Compare March 19, 2024 15:09
Copy link
Collaborator Author

@dhartunian dhartunian 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 @xinhaoz)


pkg/sql/sqlstats/sslocal/sql_stats_test.go line 772 at r1 (raw file):

Previously, abarganier (Alex Barganier) wrote…

nit: here and below, can we use anonymous functions so that we can defer the unlocks?

done.

@dhartunian dhartunian force-pushed the TestTransactionServiceLatencyOnExtendedProtocol-flake branch from b874060 to 0d9771e Compare March 19, 2024 15:15
@dhartunian dhartunian added the backport-23.2.x Flags PRs that need to be backported to 23.2. label Mar 20, 2024
Copy link
Contributor

@abarganier abarganier left a comment

Choose a reason for hiding this comment

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

:lgtm:

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

@dhartunian
Copy link
Collaborator Author

TFTRs!

bors r=abarganier,xinhaoz

@craig
Copy link
Contributor

craig bot commented Mar 20, 2024

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Mar 20, 2024

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Mar 20, 2024

Build failed (retrying...):

@rickystewart
Copy link
Collaborator

bors r-

./dev generate bazel

@craig
Copy link
Contributor

craig bot commented Mar 20, 2024

Canceled.

Remove need for test case counter which causes a data race.

Fixes: cockroachdb#119580
Epic: None
Release note: None
@dhartunian dhartunian force-pushed the TestTransactionServiceLatencyOnExtendedProtocol-flake branch from 0d9771e to b71b3ce Compare March 20, 2024 17:51
@dhartunian
Copy link
Collaborator Author

bors r=abarganier,xinhaoz

@craig
Copy link
Contributor

craig bot commented Mar 20, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-23.2.x Flags PRs that need to be backported to 23.2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pkg/sql/sqlstats/sslocal/sslocal_test: TestTransactionServiceLatencyOnExtendedProtocol failed
5 participants