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: add ConcurrencyManager test for lock promotion deadlocks #123209

Merged

Conversation

arulajmani
Copy link
Collaborator

Closes #109634

Release note: None

@arulajmani arulajmani requested a review from a team as a code owner April 29, 2024 14:35
@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 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @arulajmani)


pkg/kv/kvserver/concurrency/testdata/concurrency_manager/shared_locks line 1425 at r1 (raw file):

[4] sequence req4: dependency cycle detected 00000002->00000001->00000002

# We can't break the deadlock and get deterministic behaviour unfortunately.

Can we at least reset after this point so that we can add more test cases to this file?

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.

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


pkg/kv/kvserver/concurrency/testdata/concurrency_manager/shared_locks line 1425 at r1 (raw file):

Previously, nvanbenschoten (Nathan VanBenschoten) wrote…

Can we at least reset after this point so that we can add more test cases to this file?

Unfortunately we can't because req3 and req4 are still in-flight. How do you feel about moving this to its own file instead?

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.

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


pkg/kv/kvserver/concurrency/testdata/concurrency_manager/shared_locks line 1425 at r1 (raw file):

Previously, arulajmani (Arul Ajmani) wrote…

Unfortunately we can't because req3 and req4 are still in-flight. How do you feel about moving this to its own file instead?

Moving to its own file SGTM.

@arulajmani arulajmani force-pushed the shared-locks-concurrency-manager-tests branch from 30248f6 to 5f51f8d Compare May 15, 2024 13:01
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+

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


pkg/kv/kvserver/concurrency/testdata/concurrency_manager/shared_locks line 1425 at r1 (raw file):

Previously, nvanbenschoten (Nathan VanBenschoten) wrote…

Moving to its own file SGTM.

Not sure how I only caught this just now, but the test was failing because of these leaked in-flight goroutines. To get around this, I had to add a "force" modifier to cancel the context on these inflight goroutines instead. With that, we can keep these in this file.

@craig craig bot merged commit ce4063e into cockroachdb:master May 15, 2024
21 of 22 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.

concurrency: add concurrency manager tests for shared locks
3 participants