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: use generic lists in the lock table #109511

Merged
merged 2 commits into from
Aug 25, 2023

Conversation

arulajmani
Copy link
Collaborator

@arulajmani arulajmani commented Aug 25, 2023

Now that cda4fa2 has landed, we can make use of generic lists in a few places in the lock table.

Epic: none
Release note: None

Now that cda4fa2 has landed, we can make use of generic lists in a few
places in the lock table.

Epic: none

Release note: None
@arulajmani arulajmani requested a review from a team as a code owner August 25, 2023 16:19
@blathers-crl
Copy link

blathers-crl bot commented Aug 25, 2023

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@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: very nice!

Reviewed 2 of 2 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @arulajmani)


pkg/kv/kvserver/concurrency/lock_table.go line 1476 at r1 (raw file):

	// waiting for.

	// queuedLockingRequests is of requests queued at a key. They may be waiting

"is a list of locking requests"?


pkg/kv/kvserver/concurrency/lock_table.go line 1576 at r1 (raw file):

	queuedLockingRequests list.List[*queuedGuard]

	// waitingReaders is the list of non-locking reads that are actively waiting.

nit: "is a list"?

Burns down a TODO.

Epic: none

Release note: None
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! Thanks for pushing on the generics patch -- this stuff looks way nicer now!

bors r=nvanbenschoten

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


pkg/kv/kvserver/concurrency/lock_table.go line 1476 at r1 (raw file):

Previously, nvanbenschoten (Nathan VanBenschoten) wrote…

"is a list of locking requests"?

🤦

@craig
Copy link
Contributor

craig bot commented Aug 25, 2023

Build succeeded:

@craig craig bot merged commit ee7cdcf into cockroachdb:master Aug 25, 2023
8 checks passed
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