Skip to content

Commit d45b49e

Browse files
committed
backfill: skip external tenant under deadlock in vector backfill test
`TestVectorIndexMergingDuringBackfillWithPrefix` is rather intensive, and we've seen a couple of failures due to general overload in the external-process mode under deadlock, so we'll just disable that mode under deadlock. Alternative idea I had was to exempt the tenant from rate limiting, but I wasn't able to reproduce the failure on gceworker, so I couldn't verify that it worked and decided to not go with it. Release note: None
1 parent a3539f0 commit d45b49e

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

pkg/base/test_server_args.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,12 @@ func TestDoesNotWorkWithExternalProcessMode(issueNumber int) DefaultTestTenantOp
565565
return testSkippedForExternalProcessMode(issueNumber)
566566
}
567567

568+
// TestSkipForExternalProcessMode disables selecting the external process
569+
// virtual cluster for tests that are not applicable to that mode.
570+
func TestSkipForExternalProcessMode() DefaultTestTenantOptions {
571+
return testSkippedForExternalProcessMode(0 /* issueNumber */)
572+
}
573+
568574
func testSkippedForExternalProcessMode(issueNumber int) DefaultTestTenantOptions {
569575
return DefaultTestTenantOptions{
570576
testBehavior: ttSharedProcess,

pkg/sql/backfill/backfill_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,13 @@ func TestVectorIndexMergingDuringBackfillWithPrefix(t *testing.T) {
346346
blockBackfill := make(chan struct{})
347347
backfillBlocked := make(chan struct{})
348348

349+
var testTenant base.DefaultTestTenantOptions
350+
if syncutil.DeadlockEnabled {
351+
// The cluster can get overloaded under deadlock with external process
352+
// mode.
353+
testTenant = base.TestSkipForExternalProcessMode()
354+
}
355+
349356
ctx := context.Background()
350357
srv, db, _ := serverutils.StartServer(t, base.TestServerArgs{
351358
Knobs: base.TestingKnobs{
@@ -357,6 +364,7 @@ func TestVectorIndexMergingDuringBackfillWithPrefix(t *testing.T) {
357364
},
358365
},
359366
},
367+
DefaultTestTenant: testTenant,
360368
})
361369
defer srv.Stopper().Stop(ctx)
362370
sqlDB := sqlutils.MakeSQLRunner(db)

0 commit comments

Comments
 (0)