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 concurrency manager tests for shared locks #109634

Closed
arulajmani opened this issue Aug 28, 2023 · 2 comments · Fixed by #123209
Closed

concurrency: add concurrency manager tests for shared locks #109634

arulajmani opened this issue Aug 28, 2023 · 2 comments · Fixed by #123209
Assignees
Labels
A-kv-transactions Relating to MVCC and the transactional model. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-kv KV Team
Projects

Comments

@arulajmani
Copy link
Collaborator

arulajmani commented Aug 28, 2023

Describe the problem

Currently, shared locks are only tested at the level of the lock table. Once #109633 lands, we'll have all the pieces required to test shared locks from the concurrency manager level, by extending TestConcurrencyManagerBasic. Doing so allows us to test things such as deadlock detection / transaction pushes end to end.

Jira issue: CRDB-31027

Epic CRDB-34183

@arulajmani arulajmani added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. A-kv-transactions Relating to MVCC and the transactional model. T-kv KV Team labels Aug 28, 2023
@arulajmani arulajmani self-assigned this Aug 28, 2023
@blathers-crl blathers-crl bot added this to Incoming in KV Aug 28, 2023
@nvanbenschoten
Copy link
Member

Reminder for when we address this, the following line should say "strength":

arulajmani added a commit to arulajmani/cockroach that referenced this issue Sep 18, 2023
@ajd12342
Copy link

Hi @arulajmani !
I am Anuj Diwan, a Computer Science PhD student at UT Austin. I am part of a team along with @arjunrs1 (Arjun Somayazulu) and we're taking a graduate Distributed Systems course. For our course project, we are interested in contributing to CockroachDB. This issue is related to our course material. Could we work on this issue? Any pointers for us to get started would be appreciated as well.

Thanks and regards,
Anuj.

arulajmani added a commit to arulajmani/cockroach that referenced this issue Jan 16, 2024
Simple test to assert conflict resolution semantics for shared locks.

Informs cockroachdb#109634

Release note: None
arulajmani added a commit to arulajmani/cockroach that referenced this issue Jan 16, 2024
arulajmani added a commit to arulajmani/cockroach that referenced this issue Jan 16, 2024
This commit adds another basic test to ensure requests that are
compatible with a held lock, but incompatible with an already waiting
request at the lock, end up actively waiting at the lock.

Informs cockroachdb#109634

Release note: None
arulajmani added a commit to arulajmani/cockroach that referenced this issue Jan 24, 2024
This commit adds another basic test to ensure requests that are
compatible with a held lock, but incompatible with an already waiting
request at the lock, end up actively waiting at the lock.

Informs cockroachdb#109634

Release note: None
arulajmani added a commit to arulajmani/cockroach that referenced this issue Jan 30, 2024
craig bot pushed a commit that referenced this issue Feb 2, 2024
117798: sql: fix float to integer casting r=mgartner a=da-ket

Previously, casting a float value to an integer simply truncates the float. This commit fixes that by rounding the float value to the nearest integer, rounding ties to even, as in postgres.

Epic: None
Fixes: #112515

Release note (bug fix): A bug has been fixed where casts of floats to integers
truncated the value. These casts now round a float to the nearest integer,
rounding ties to even integers.

118489: concurrency: add basic deadlock tests involving shared locks r=arulajmani a=arulajmani

Informs #109634

Release note: None

118640: sql: fix usages of internal executor to delegate from user transaction r=rafiss a=rafiss

These commits fix a few usages of the internal executor to use the new interface which delegates to an internal executor that shares the outer txn's state.

For ease of review, the testing for this is in a separate PR (where the bugs were discovered): #107990

informs #100178

118653: sql: keep track of per-stmt read committed retries r=rafiss a=rafiss

This change makes it possible to view automatic retries performed under read committed txns in the DB Console.

fixes #113986
Release note: None

118657: server/status: silence missing CPU cgroup error r=nvanbenschoten a=nvanbenschoten

Fixes #111648.

This commit eliminates log spam when a CPU cgroup is not configured for the cockroach process. This is a supported deployment mode, but since `v22.2.11`/`v23.1.3`/`v23.2.0` (df55958), we've been spamming the logs with "unable to get CPU capacity" errors every 10 seconds when running outside of a CPU cgroup.

I considered reducing the severity of the log message from ERROR to INFO, but even that seemed loud for a log message every 10s in a supported deployment mode. For now, we remove the log message.

Release note (bug fix): Cockroach will no longer spam the logs with "unable to get CPU capacity" errors every 10 seconds when running outside of a CPU cgroup.

118660: server: disambiguate duplicated column names in /v2/sql endpoint r=rafiss a=rafiss

Previously, results that had the same column name would clobber each other in the response of this endpoint, since JSON does not allow duplicate key names. This is fixed by adding a suffix when column names are duplicated.

No release note since this endpoint is for internal use.

fixes #116851
Release note: None

Co-authored-by: da-ket <daket.duet@gmail.com>
Co-authored-by: Arul Ajmani <arulajmani@gmail.com>
Co-authored-by: Rafi Shamim <rafi@cockroachlabs.com>
Co-authored-by: Nathan VanBenschoten <nvanbenschoten@gmail.com>
wenyihu6 pushed a commit to wenyihu6/cockroach that referenced this issue Feb 21, 2024
arulajmani added a commit to arulajmani/cockroach that referenced this issue Apr 29, 2024
craig bot pushed a commit that referenced this issue May 15, 2024
123209: concurrency: add ConcurrencyManager test for lock promotion deadlocks r=arulajmani a=arulajmani

Closes #109634

Release note: None

Co-authored-by: Arul Ajmani <arulajmani@gmail.com>
@craig craig bot closed this as completed in 5f51f8d May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-kv-transactions Relating to MVCC and the transactional model. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-kv KV Team
Projects
KV
Incoming
Development

Successfully merging a pull request may close this issue.

3 participants