Skip to content

Commit

Permalink
Merge #123203
Browse files Browse the repository at this point in the history
123203: concurrency: deflake TestLockTableConcurrentRequests r=arulajmani a=arulajmani

Closes #123196.
Closes #123280.
Closes #123550.

Epic: none

Release note: None

Co-authored-by: Arul Ajmani <arulajmani@gmail.com>
  • Loading branch information
craig[bot] and arulajmani committed May 6, 2024
2 parents 9cc58db + 6a30d7a commit 6299317
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions pkg/kv/kvserver/concurrency/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ go_test(
"//pkg/testutils",
"//pkg/testutils/datapathutils",
"//pkg/testutils/skip",
"//pkg/util",
"//pkg/util/allstacks",
"//pkg/util/hlc",
"//pkg/util/leaktest",
Expand Down
7 changes: 4 additions & 3 deletions pkg/kv/kvserver/concurrency/lock_table_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import (
"github.com/cockroachdb/cockroach/pkg/settings/cluster"
"github.com/cockroachdb/cockroach/pkg/storage/enginepb"
"github.com/cockroachdb/cockroach/pkg/testutils/datapathutils"
"github.com/cockroachdb/cockroach/pkg/util"
"github.com/cockroachdb/cockroach/pkg/util/hlc"
"github.com/cockroachdb/cockroach/pkg/util/leaktest"
"github.com/cockroachdb/cockroach/pkg/util/log"
Expand Down Expand Up @@ -1593,9 +1594,9 @@ func TestLockTableConcurrentRequests(t *testing.T) {
probDupAccessWithWeakerStr := 0.5
probOnlyRead := possibleProbOnlyRead[rng.Intn(len(possibleProbOnlyRead))]

if syncutil.DeadlockEnabled {
// We've seen 10,000 requests to be too much when running a deadlock build.
// Override numRequests to the lowest option (1,000) for deadlock builds.
if syncutil.DeadlockEnabled || util.RaceEnabled {
// We've seen 10,000 requests to be too much when running a deadlock/race
// build. Override numRequests to the lowest option (1,000) for such builds.
numRequests = 1000
}

Expand Down

0 comments on commit 6299317

Please sign in to comment.