From f58037c81122253fbacd96a93827bef48f40f51c Mon Sep 17 00:00:00 2001 From: Evan Wall Date: Mon, 18 Sep 2023 15:47:53 +0000 Subject: [PATCH] testing: set UseTransactionalDescIDGenerator testing knob in SQLTranslator tests Fixes #110242 Set UseTransactionalDescIDGenerator to true to prevent transaction retries from resulting in different descriptor IDs. Descriptor IDs appear directly in the test output and must remain stable. Release note: None --- .../spanconfigsqltranslatorccl/datadriven_test.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkg/ccl/spanconfigccl/spanconfigsqltranslatorccl/datadriven_test.go b/pkg/ccl/spanconfigccl/spanconfigsqltranslatorccl/datadriven_test.go index 00aac6223a40..f6e582269f15 100644 --- a/pkg/ccl/spanconfigccl/spanconfigsqltranslatorccl/datadriven_test.go +++ b/pkg/ccl/spanconfigccl/spanconfigsqltranslatorccl/datadriven_test.go @@ -111,14 +111,18 @@ func TestDataDriven(t *testing.T) { // test cluster). ManagerDisableJobCreation: true, } + sqlExecutorKnobs := &sql.ExecutorTestingKnobs{ + UseTransactionalDescIDGenerator: true, + } tsArgs := func(attr string) base.TestServerArgs { return base.TestServerArgs{ // Test fails when run within a tenant. More investigation // is required. Tracked with #76378. DisableDefaultTestTenant: true, Knobs: base.TestingKnobs{ - GCJob: gcTestingKnobs, - SpanConfig: scKnobs, + GCJob: gcTestingKnobs, + SpanConfig: scKnobs, + SQLExecutor: sqlExecutorKnobs, }, StoreSpecs: []base.StoreSpec{ {InMemory: true, Attributes: roachpb.Attributes{Attrs: []string{attr}}},