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

concurrency: cleanup lock table datadriven tests #102775

Merged
merged 3 commits into from
May 5, 2023

Conversation

arulajmani
Copy link
Collaborator

See individual commits for details.

Last bits of cleanup in support of #102008; the linked issue can be considered completed once this PR lands.

Followup from cockroachdb#102647. In that patch, we decided to translate the
strength field on a lock table guard back to a `SpanAccess` to
defer some test churn. This patch addresses that TODO; it's entirely
mechanical.

Informs: cockroachdb#102008

Release note: None
@arulajmani arulajmani requested a review from nvanbenschoten May 4, 2023 18:11
@arulajmani arulajmani requested a review from a team as a code owner May 4, 2023 18:11
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Member

@nvanbenschoten nvanbenschoten 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 16 of 16 files at r1, 21 of 21 files at r2, 1 of 1 files at r3, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @arulajmani)


pkg/kv/kvserver/concurrency/lock_table_test.go line 717 at r2 (raw file):

			sa = spanset.SpanReadWrite
		default:
			d.Fatalf(t, "unsupported span strength: %s", str)

nit: I don't think "span strength" is a defined term. It's just "strength" or "lock strength".

arulajmani added 2 commits May 5, 2023 16:55
In 5418acd we switched to declaring
lock spans using lock strength instead of span access; this patch
changes datadriven test input for lock table tests to do the same.

Closes cockroachdb#102008

Release note: None
Cleanup a few places where we were still referencing/using
spanset.SpanAccess or spanset.SpanScope. Of note is a change to
`tryClearLocks`, where we forgot to remove a loop over
`spanset.SpanScope` in 1cf1508.

Epic: none

Release note: None
@arulajmani arulajmani force-pushed the concurrency-testing-cleanup branch from 3f092d2 to 8a8069a Compare May 5, 2023 20:55
Copy link
Collaborator Author

@arulajmani arulajmani 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=nvanbenschoten

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

@craig
Copy link
Contributor

craig bot commented May 5, 2023

Build succeeded:

@craig craig bot merged commit f4b07ba into cockroachdb:master May 5, 2023
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