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

kv: add shared, replicated, and shared-replicated locks to TestEvaluateBatch #111433

Conversation

nvanbenschoten
Copy link
Member

Informs #91545.
Informs #100193.

This commit extends TestEvaluateBatch to include shared, replicated, and shared-replicated lock acquisition using Get, Scan, and ReverseScan requests.

Release note: None

@nvanbenschoten nvanbenschoten requested a review from a team as a code owner September 28, 2023 17:38
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@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.

:lgtm:

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


pkg/kv/kvserver/replica_evaluate_test.go line 321 at r1 (raw file):

			setup: func(t *testing.T, d *data) {
				writeABCDEFAt(t, d, ts.Prev())
				scanA := getArgsString("a")

nit: Should these say "getA" and "getG", here and elsewhere?

It's a bit weird because the verification method is called "verifyScanResult" as well, and then switches over Get/Scan/ReverseScan requests -- should we rename the thing to "verifyReadResult" instead?


pkg/kv/kvserver/replica_evaluate_test.go line 384 at r1 (raw file):

		{
			// Same as above, but with replicated shared locks.
			name: "gets with key locking (exclusive, replicated)",

"(shared, replicated)"

…teBatch

Informs cockroachdb#91545.
Informs cockroachdb#100193.

This commit extends TestEvaluateBatch to include shared, replicated, and
shared-replicated lock acquisition using Get, Scan, and ReverseScan requests.

Release note: None
This commit updates the naming of a few variables and the verifyScanResult
function to better reflect the use of GetRequests in the test.

Epic: None
Release note: None
@nvanbenschoten nvanbenschoten force-pushed the nvanbenschoten/sharedLockTestEvaluateBatch branch from 1a6beba to 6a3f134 Compare September 28, 2023 18:10
Copy link
Member Author

@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.

TFTR!

bors r+

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


pkg/kv/kvserver/replica_evaluate_test.go line 321 at r1 (raw file):

Previously, arulajmani (Arul Ajmani) wrote…

nit: Should these say "getA" and "getG", here and elsewhere?

It's a bit weird because the verification method is called "verifyScanResult" as well, and then switches over Get/Scan/ReverseScan requests -- should we rename the thing to "verifyReadResult" instead?

Done for both.


pkg/kv/kvserver/replica_evaluate_test.go line 384 at r1 (raw file):

Previously, arulajmani (Arul Ajmani) wrote…

"(shared, replicated)"

Done.

@craig
Copy link
Contributor

craig bot commented Sep 28, 2023

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Sep 28, 2023

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Sep 28, 2023

Build failed:

@nvanbenschoten
Copy link
Member Author

CI flakes:

Cannot find commit 7c44d697313fb6cd4f4cd48c014c4943ed245c33 in the https://github.com/cockroachdb/cockroach repository

bors r+

@craig
Copy link
Contributor

craig bot commented Sep 28, 2023

Build succeeded:

@craig craig bot merged commit 39614e9 into cockroachdb:master Sep 28, 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