Skip to content

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

Merged
craig[bot] merged 2 commits intocockroachdb:masterfrom
nvb:nvanbenschoten/sharedLockTestEvaluateBatch
Sep 28, 2023
Merged

kv: add shared, replicated, and shared-replicated locks to TestEvaluateBatch#111433
craig[bot] merged 2 commits intocockroachdb:masterfrom
nvb:nvanbenschoten/sharedLockTestEvaluateBatch

Conversation

@nvb
Copy link
Copy Markdown
Contributor

@nvb nvb commented Sep 28, 2023

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

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

This change is Reviewable

Copy link
Copy Markdown
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)"

nvb added 2 commits September 28, 2023 14:08
…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
@nvb nvb force-pushed the nvanbenschoten/sharedLockTestEvaluateBatch branch from 1a6beba to 6a3f134 Compare September 28, 2023 18:10
Copy link
Copy Markdown
Contributor Author

@nvb nvb 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
Copy Markdown
Contributor

craig bot commented Sep 28, 2023

Build failed (retrying...):

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Sep 28, 2023

Build failed (retrying...):

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Sep 28, 2023

Build failed:

@nvb
Copy link
Copy Markdown
Contributor Author

nvb commented Sep 28, 2023

CI flakes:

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

bors r+

@craig
Copy link
Copy Markdown
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