diff --git a/.bazelrc b/.bazelrc index 4cfeacc25219..384bdd6a6316 100644 --- a/.bazelrc +++ b/.bazelrc @@ -53,14 +53,15 @@ test:race --test_timeout=1200,6000,18000,72000 # CI uses a custom timeout for enormous targets. test:use_ci_timeouts --test_timeout=60,300,900,900 --define=use_ci_timeouts=true # CI should always run with `--config=ci`. -build:ci --lintonbuild +build:cibase --lintonbuild # Set `-test.v` in Go tests. # Ref: https://github.com/bazelbuild/rules_go/pull/2456 -test:ci --test_env=GO_TEST_WRAP_TESTV=1 +test:cibase --test_env=GO_TEST_WRAP_TESTV=1 # Dump all output for failed tests to the build log. -test:ci --test_output=errors +test:cibase --test_output=errors # Put all tmp artifacts in /artifacts/tmp. -build:ci --test_tmpdir=/artifacts/tmp +test:ci --test_tmpdir=/artifacts/tmp +build:ci --config=cibase build:cross --stamp @@ -111,6 +112,23 @@ build:macos --host_action_env=PATH=/opt/homebrew/bin:/opt/local/bin:/usr/local/b # more precise --workspace_status_command option. build:simplestamp --stamp --workspace_status_command=./build/bazelutil/stamp.sh +build:engflow --define=EXECUTOR=remote +build:engflow --disk_cache= +build:engflow --experimental_inmemory_dotd_files +build:engflow --experimental_inmemory_jdeps_files +build:engflow --incompatible_strict_action_env=true +build:engflow --remote_timeout=600 +build:engflow --nolegacy_important_outputs +build:engflow --grpc_keepalive_time=30s +build:engflow --experimental_remote_cache_compression=true +build:engflow --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 +build:engflow --remote_cache=grpcs://tanzanite.cluster.engflow.com +build:engflow --remote_executor=grpcs://tanzanite.cluster.engflow.com +build:engflow --bes_backend=grpcs://tanzanite.cluster.engflow.com +build:engflow --bes_results_url=https://tanzanite.cluster.engflow.com/invocation/ +build:engflow --extra_execution_platforms=//build/toolchains:cross_linux +test:engflow --test_env=REMOTE_EXEC=1 + try-import %workspace%/.bazelrc.user # vi: ft=sh diff --git a/build/toolchains/BUILD.bazel b/build/toolchains/BUILD.bazel index e1b00f28f2c2..cabe895a6890 100644 --- a/build/toolchains/BUILD.bazel +++ b/build/toolchains/BUILD.bazel @@ -31,6 +31,11 @@ platform( "@platforms//os:linux", "@platforms//cpu:x86_64", ], + exec_properties = { + "container-image": "docker://cockroachdb/bazel@sha256:2fdff6a4a2c66bf01d6ad4c6973eb4b38acdb812d07a431a0471f2b6449bb653", + "dockerReuse": "True", + "Pool": "default", + }, ) toolchain( @@ -131,6 +136,11 @@ platform( "@platforms//os:linux", "@platforms//cpu:arm64", ], + exec_properties = { + "container-image": "docker://cockroachdb/bazel@sha256:6acc131994de3e9adcdf05ddd0956a047cb7a7e07a939a76fa9cad11af3a1a8a", + "dockerReuse": "True", + "Pool": "default", + }, ) platform( diff --git a/pkg/acceptance/BUILD.bazel b/pkg/acceptance/BUILD.bazel index 984edff5682b..c629e5da1436 100644 --- a/pkg/acceptance/BUILD.bazel +++ b/pkg/acceptance/BUILD.bazel @@ -53,6 +53,7 @@ go_test( "//pkg/cli:interactive_tests", ], embed = [":acceptance"], + exec_properties = {"Pool": "large"}, gotags = ["acceptance"], shard_count = 16, tags = ["integration"], diff --git a/pkg/ccl/backupccl/BUILD.bazel b/pkg/ccl/backupccl/BUILD.bazel index 0d807c8c64aa..094339155fc4 100644 --- a/pkg/ccl/backupccl/BUILD.bazel +++ b/pkg/ccl/backupccl/BUILD.bazel @@ -205,6 +205,7 @@ go_test( }), data = glob(["testdata/**"]) + ["//c-deps:libgeos"], embed = [":backupccl"], + exec_properties = {"Pool": "large"}, shard_count = 48, tags = ["ccl_test"], deps = [ diff --git a/pkg/ccl/benchccl/rttanalysisccl/BUILD.bazel b/pkg/ccl/benchccl/rttanalysisccl/BUILD.bazel index d2ad5adffc52..e315c0ce4e2c 100644 --- a/pkg/ccl/benchccl/rttanalysisccl/BUILD.bazel +++ b/pkg/ccl/benchccl/rttanalysisccl/BUILD.bazel @@ -12,6 +12,7 @@ go_test( "//conditions:default": ["-test.timeout=3595s"], }), data = glob(["testdata/**"]), + exec_properties = {"Pool": "large"}, shard_count = 16, tags = ["ccl_test"], deps = [ diff --git a/pkg/ccl/changefeedccl/BUILD.bazel b/pkg/ccl/changefeedccl/BUILD.bazel index 958dfe52ebb9..bc7ef3f8084d 100644 --- a/pkg/ccl/changefeedccl/BUILD.bazel +++ b/pkg/ccl/changefeedccl/BUILD.bazel @@ -206,6 +206,7 @@ go_test( "//conditions:default": ["-test.timeout=3595s"], }), embed = [":changefeedccl"], + exec_properties = {"Pool": "large"}, shard_count = 16, tags = ["ccl_test"], deps = [ diff --git a/pkg/ccl/kvccl/kvtenantccl/upgradeinterlockccl/BUILD.bazel b/pkg/ccl/kvccl/kvtenantccl/upgradeinterlockccl/BUILD.bazel index b133ac76ae69..292b09102eea 100644 --- a/pkg/ccl/kvccl/kvtenantccl/upgradeinterlockccl/BUILD.bazel +++ b/pkg/ccl/kvccl/kvtenantccl/upgradeinterlockccl/BUILD.bazel @@ -12,6 +12,7 @@ go_test( "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], "//conditions:default": ["-test.timeout=3595s"], }), + exec_properties = {"Pool": "large"}, shard_count = 14, tags = ["ccl_test"], deps = [ diff --git a/pkg/ccl/logictestccl/tests/3node-tenant-multiregion/BUILD.bazel b/pkg/ccl/logictestccl/tests/3node-tenant-multiregion/BUILD.bazel index 267b73e8a448..16885e2b5a22 100644 --- a/pkg/ccl/logictestccl/tests/3node-tenant-multiregion/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/3node-tenant-multiregion/BUILD.bazel @@ -14,6 +14,7 @@ go_test( "//pkg/sql/logictest:testdata", # keep "//pkg/sql/opt/exec/execbuilder:testdata", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 5, tags = [ "ccl_test", diff --git a/pkg/ccl/logictestccl/tests/3node-tenant/BUILD.bazel b/pkg/ccl/logictestccl/tests/3node-tenant/BUILD.bazel index e358b60e662f..de88d36f004a 100644 --- a/pkg/ccl/logictestccl/tests/3node-tenant/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/3node-tenant/BUILD.bazel @@ -14,6 +14,7 @@ go_test( "//pkg/sql/logictest:testdata", # keep "//pkg/sql/opt/exec/execbuilder:testdata", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 48, tags = [ "ccl_test", diff --git a/pkg/ccl/logictestccl/tests/5node/BUILD.bazel b/pkg/ccl/logictestccl/tests/5node/BUILD.bazel index a41e2297132c..14b5880333b6 100644 --- a/pkg/ccl/logictestccl/tests/5node/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/5node/BUILD.bazel @@ -12,6 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 5, tags = [ "ccl_test", diff --git a/pkg/ccl/logictestccl/tests/fakedist-disk/BUILD.bazel b/pkg/ccl/logictestccl/tests/fakedist-disk/BUILD.bazel index b25c44450067..74f45d153872 100644 --- a/pkg/ccl/logictestccl/tests/fakedist-disk/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/fakedist-disk/BUILD.bazel @@ -12,6 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 5, tags = [ "ccl_test", diff --git a/pkg/ccl/logictestccl/tests/fakedist-vec-off/BUILD.bazel b/pkg/ccl/logictestccl/tests/fakedist-vec-off/BUILD.bazel index 0d70cbe4e767..20984899a560 100644 --- a/pkg/ccl/logictestccl/tests/fakedist-vec-off/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/fakedist-vec-off/BUILD.bazel @@ -12,6 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 5, tags = [ "ccl_test", diff --git a/pkg/ccl/logictestccl/tests/fakedist/BUILD.bazel b/pkg/ccl/logictestccl/tests/fakedist/BUILD.bazel index 0ff04b3d6c5a..639be2a328ed 100644 --- a/pkg/ccl/logictestccl/tests/fakedist/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/fakedist/BUILD.bazel @@ -12,6 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 6, tags = [ "ccl_test", diff --git a/pkg/ccl/logictestccl/tests/local-legacy-schema-changer/BUILD.bazel b/pkg/ccl/logictestccl/tests/local-legacy-schema-changer/BUILD.bazel index 17505f079718..a9b2b01e0cf1 100644 --- a/pkg/ccl/logictestccl/tests/local-legacy-schema-changer/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/local-legacy-schema-changer/BUILD.bazel @@ -12,6 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 5, tags = [ "ccl_test", diff --git a/pkg/ccl/logictestccl/tests/local-mixed-22.2-23.1/BUILD.bazel b/pkg/ccl/logictestccl/tests/local-mixed-22.2-23.1/BUILD.bazel index 01b5baa0d09a..ba8387d0fec4 100644 --- a/pkg/ccl/logictestccl/tests/local-mixed-22.2-23.1/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/local-mixed-22.2-23.1/BUILD.bazel @@ -12,6 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 6, tags = [ "ccl_test", diff --git a/pkg/ccl/logictestccl/tests/local-vec-off/BUILD.bazel b/pkg/ccl/logictestccl/tests/local-vec-off/BUILD.bazel index a3b46b7d54be..8c7271f16d64 100644 --- a/pkg/ccl/logictestccl/tests/local-vec-off/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/local-vec-off/BUILD.bazel @@ -12,6 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 5, tags = [ "ccl_test", diff --git a/pkg/ccl/logictestccl/tests/local/BUILD.bazel b/pkg/ccl/logictestccl/tests/local/BUILD.bazel index 56fa3e33c840..38bfc2463ed5 100644 --- a/pkg/ccl/logictestccl/tests/local/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/local/BUILD.bazel @@ -12,6 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 19, tags = [ "ccl_test", diff --git a/pkg/ccl/logictestccl/tests/multiregion-15node-5region-3azs/BUILD.bazel b/pkg/ccl/logictestccl/tests/multiregion-15node-5region-3azs/BUILD.bazel index 07e98ff64c9b..0f87fd28b24e 100644 --- a/pkg/ccl/logictestccl/tests/multiregion-15node-5region-3azs/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/multiregion-15node-5region-3azs/BUILD.bazel @@ -12,6 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 4, tags = [ "ccl_test", diff --git a/pkg/ccl/logictestccl/tests/multiregion-3node-3superlongregions/BUILD.bazel b/pkg/ccl/logictestccl/tests/multiregion-3node-3superlongregions/BUILD.bazel index 82b1cf5e557c..79d8cd0d7cfd 100644 --- a/pkg/ccl/logictestccl/tests/multiregion-3node-3superlongregions/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/multiregion-3node-3superlongregions/BUILD.bazel @@ -12,6 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 1, tags = [ "ccl_test", diff --git a/pkg/ccl/logictestccl/tests/multiregion-9node-3region-3azs-no-los/BUILD.bazel b/pkg/ccl/logictestccl/tests/multiregion-9node-3region-3azs-no-los/BUILD.bazel index ebf20ee5e952..61f0e0d2489d 100644 --- a/pkg/ccl/logictestccl/tests/multiregion-9node-3region-3azs-no-los/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/multiregion-9node-3region-3azs-no-los/BUILD.bazel @@ -12,6 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 19, tags = [ "ccl_test", diff --git a/pkg/ccl/logictestccl/tests/multiregion-9node-3region-3azs-tenant/BUILD.bazel b/pkg/ccl/logictestccl/tests/multiregion-9node-3region-3azs-tenant/BUILD.bazel index c9e547bd9d72..819b5fb1629d 100644 --- a/pkg/ccl/logictestccl/tests/multiregion-9node-3region-3azs-tenant/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/multiregion-9node-3region-3azs-tenant/BUILD.bazel @@ -12,6 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 15, tags = [ "ccl_test", diff --git a/pkg/ccl/logictestccl/tests/multiregion-9node-3region-3azs-vec-off/BUILD.bazel b/pkg/ccl/logictestccl/tests/multiregion-9node-3region-3azs-vec-off/BUILD.bazel index 8806702d4a7c..8d51c10ff5f4 100644 --- a/pkg/ccl/logictestccl/tests/multiregion-9node-3region-3azs-vec-off/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/multiregion-9node-3region-3azs-vec-off/BUILD.bazel @@ -12,6 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 8, tags = [ "ccl_test", diff --git a/pkg/ccl/logictestccl/tests/multiregion-9node-3region-3azs/BUILD.bazel b/pkg/ccl/logictestccl/tests/multiregion-9node-3region-3azs/BUILD.bazel index 2916dc6e6ac9..63f7fc5414ae 100644 --- a/pkg/ccl/logictestccl/tests/multiregion-9node-3region-3azs/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/multiregion-9node-3region-3azs/BUILD.bazel @@ -12,6 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/ccl/logictestccl:testdata", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 26, tags = [ "ccl_test", diff --git a/pkg/ccl/multiregionccl/BUILD.bazel b/pkg/ccl/multiregionccl/BUILD.bazel index f9b6e6cc0bb8..e1641f7e8b85 100644 --- a/pkg/ccl/multiregionccl/BUILD.bazel +++ b/pkg/ccl/multiregionccl/BUILD.bazel @@ -44,6 +44,7 @@ go_test( }), data = glob(["testdata/**"]), embed = [":multiregionccl"], + exec_properties = {"Pool": "large"}, shard_count = 16, tags = ["ccl_test"], deps = [ diff --git a/pkg/ccl/schemachangerccl/BUILD.bazel b/pkg/ccl/schemachangerccl/BUILD.bazel index 1b19a5634c02..96fb08f77025 100644 --- a/pkg/ccl/schemachangerccl/BUILD.bazel +++ b/pkg/ccl/schemachangerccl/BUILD.bazel @@ -31,6 +31,7 @@ go_test( "//pkg/sql/schemachanger:end_to_end_testdata", ], embed = [":schemachangerccl"], + exec_properties = {"Pool": "large"}, shard_count = 48, tags = [ "ccl_test", diff --git a/pkg/ccl/serverccl/BUILD.bazel b/pkg/ccl/serverccl/BUILD.bazel index 0610046dc3f9..ae084ef195a1 100644 --- a/pkg/ccl/serverccl/BUILD.bazel +++ b/pkg/ccl/serverccl/BUILD.bazel @@ -47,6 +47,7 @@ go_test( }), data = glob(["testdata/**"]), embed = [":serverccl"], + exec_properties = {"Pool": "large"}, tags = ["ccl_test"], deps = [ "//pkg/base", diff --git a/pkg/ccl/sqlitelogictestccl/tests/3node-tenant/BUILD.bazel b/pkg/ccl/sqlitelogictestccl/tests/3node-tenant/BUILD.bazel index b66d8652f486..6345281c2bbb 100644 --- a/pkg/ccl/sqlitelogictestccl/tests/3node-tenant/BUILD.bazel +++ b/pkg/ccl/sqlitelogictestccl/tests/3node-tenant/BUILD.bazel @@ -9,6 +9,7 @@ go_test( "//c-deps:libgeos", # keep "@com_github_cockroachdb_sqllogictest//:testfiles", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 48, tags = [ "ccl_test", diff --git a/pkg/ccl/sqlproxyccl/BUILD.bazel b/pkg/ccl/sqlproxyccl/BUILD.bazel index bde927661aee..1c8271a47dbf 100644 --- a/pkg/ccl/sqlproxyccl/BUILD.bazel +++ b/pkg/ccl/sqlproxyccl/BUILD.bazel @@ -59,7 +59,7 @@ go_library( go_test( name = "sqlproxyccl_test", - size = "medium", + size = "large", srcs = [ "authentication_test.go", "backend_dialer_test.go", @@ -73,9 +73,10 @@ go_test( "proxy_handler_test.go", "server_test.go", ], - args = ["-test.timeout=295s"], + args = ["-test.timeout=895s"], data = glob(["testdata/**"]), embed = [":sqlproxyccl"], + shard_count = 8, tags = ["ccl_test"], deps = [ "//pkg/base", diff --git a/pkg/ccl/streamingccl/streamclient/BUILD.bazel b/pkg/ccl/streamingccl/streamclient/BUILD.bazel index f902afb7289b..c37cd2cc95ab 100644 --- a/pkg/ccl/streamingccl/streamclient/BUILD.bazel +++ b/pkg/ccl/streamingccl/streamclient/BUILD.bazel @@ -50,7 +50,10 @@ go_test( ], args = ["-test.timeout=55s"], embed = [":streamclient"], - tags = ["ccl_test"], + tags = [ + "ccl_test", + "no-remote-exec", + ], deps = [ "//pkg/base", "//pkg/ccl", diff --git a/pkg/ccl/streamingccl/streamingest/BUILD.bazel b/pkg/ccl/streamingccl/streamingest/BUILD.bazel index 3a89034e0f95..5d69331f39a4 100644 --- a/pkg/ccl/streamingccl/streamingest/BUILD.bazel +++ b/pkg/ccl/streamingccl/streamingest/BUILD.bazel @@ -97,7 +97,10 @@ go_test( data = glob(["testdata/**"]), embed = [":streamingest"], shard_count = 16, - tags = ["ccl_test"], + tags = [ + "ccl_test", + "no-remote-exec", + ], deps = [ "//pkg/base", "//pkg/ccl", diff --git a/pkg/cmd/generate-bazel-extra/main.go b/pkg/cmd/generate-bazel-extra/main.go index ae236f937a33..94b078b79f6b 100644 --- a/pkg/cmd/generate-bazel-extra/main.go +++ b/pkg/cmd/generate-bazel-extra/main.go @@ -252,13 +252,13 @@ func excludeReallyEnormousTargets(targets []string) []string { // Answer the following questions before adding a test target to this list: // 1. Does this target run in Bazel Essential CI? If it does and you need // timeout to be > 1 hour then you need to talk to dev-inf. This is not - // expected. + // expected. // 2. Are you increasing the timeout for stress-testing purposes in CI? Make - // your change in `pkg/cmd/teamcity-trigger` by updating `customTimeouts`. - // 3. You should only add a test target here if it's for stand-alone testing. - // For example: `/pkg/sql/sqlitelogictest` is only tested in a nightly in - // `build/teamcity/cockroach/nightlies/sqlite_logic_test_impl.sh`. If this is - // the case, you should tag your test as `integration`. + // your change in `pkg/cmd/teamcity-trigger` by updating `customTimeouts`. + // 3. You should only add a test target here if it's for stand-alone testing. + // For example: `/pkg/sql/sqlitelogictest` is only tested in a nightly in + // `build/teamcity/cockroach/nightlies/sqlite_logic_test_impl.sh`. If this is + // the case, you should tag your test as `integration`. // 4. If you are not sure, please ask the dev-inf team for help. for _, toExclude := range []string{ "//pkg/ccl/sqlitelogictestccl", @@ -288,6 +288,7 @@ func generateTestsTimeouts() { } for size, defaultTimeout := range testSizeToDefaultTimeout { if size == "enormous" { + runBuildozer(append([]string{`dict_set exec_properties Pool:large`}, targets[size]...)) // Exclude really enormous targets since they have a custom timeout that // exceeds the default 1h. targets[size] = excludeReallyEnormousTargets(targets[size]) diff --git a/pkg/cmd/generate-logictest/templates.go b/pkg/cmd/generate-logictest/templates.go index 5022e9ca8735..91b03ad9792f 100644 --- a/pkg/cmd/generate-logictest/templates.go +++ b/pkg/cmd/generate-logictest/templates.go @@ -268,6 +268,7 @@ go_test( "//pkg/sql/logictest:testdata", # keep{{ end }}{{ if .ExecBuildLogicTest }} "//pkg/sql/opt/exec/execbuilder:testdata", # keep{{ end }} ], + exec_properties = {"Pool": "large"}, shard_count = {{ if gt .TestCount 48 }}48{{ else }}{{ .TestCount }}{{end}}, tags = [{{ if .Ccl }} "ccl_test",{{ end }} diff --git a/pkg/compose/BUILD.bazel b/pkg/compose/BUILD.bazel index a261505a1a93..c7c7db949e4b 100644 --- a/pkg/compose/BUILD.bazel +++ b/pkg/compose/BUILD.bazel @@ -20,6 +20,7 @@ go_test( "//pkg/compose:compare/docker-compose.yml", ], embed = [":compose"], + exec_properties = {"Pool": "large"}, gotags = ["compose"], tags = ["integration"], deps = [ diff --git a/pkg/kv/kvserver/BUILD.bazel b/pkg/kv/kvserver/BUILD.bazel index dc9c923f9ba5..7e1ef28c9db1 100644 --- a/pkg/kv/kvserver/BUILD.bazel +++ b/pkg/kv/kvserver/BUILD.bazel @@ -360,6 +360,7 @@ go_test( }), data = glob(["testdata/**"]), embed = [":kvserver"], + exec_properties = {"Pool": "large"}, shard_count = 48, tags = ["cpu:2"], deps = [ diff --git a/pkg/server/BUILD.bazel b/pkg/server/BUILD.bazel index 788f9969ca48..7b8d21324e09 100644 --- a/pkg/server/BUILD.bazel +++ b/pkg/server/BUILD.bazel @@ -471,6 +471,7 @@ go_test( }), data = glob(["testdata/**"]), embed = [":server"], + exec_properties = {"Pool": "large"}, shard_count = 16, deps = [ "//pkg/base", diff --git a/pkg/sql/BUILD.bazel b/pkg/sql/BUILD.bazel index ac2e901d367c..c97e0e574074 100644 --- a/pkg/sql/BUILD.bazel +++ b/pkg/sql/BUILD.bazel @@ -734,7 +734,9 @@ go_test( "//pkg/sql/vtable:pg_catalog.go", ], embed = [":sql"], + exec_properties = {"Pool": "large"}, shard_count = 16, + tags = ["no-remote-exec"], deps = [ "//pkg/base", "//pkg/build/bazel", diff --git a/pkg/sql/conn_executor_exec.go b/pkg/sql/conn_executor_exec.go index 37b4287fd4ae..1f599453000d 100644 --- a/pkg/sql/conn_executor_exec.go +++ b/pkg/sql/conn_executor_exec.go @@ -1012,8 +1012,8 @@ func (ex *connExecutor) execStmtInOpenState( stmtCtx = ctx } - var rollbackSP *tree.RollbackToSavepoint - var r *tree.ReleaseSavepoint + var rollbackHomeRegionSavepoint *tree.RollbackToSavepoint + var releaseHomeRegionSavepoint *tree.ReleaseSavepoint enforceHomeRegion := p.EnforceHomeRegion() _, isSelectStmt := stmt.AST.(*tree.Select) // TODO(sql-sessions): ensure this is not broken for pausable portals. @@ -1024,14 +1024,9 @@ func (ex *connExecutor) execStmtInOpenState( // historical timestamp (so that the locality-optimized ops used for error // reporting can run locally and not incur latency). This is currently only // supported for SELECT statements. - var b strings.Builder - b.WriteString("enforce_home_region_sp") // Add some unprintable ASCII characters to the name of the savepoint to // decrease the likelihood of collision with a user-created savepoint. - b.WriteRune(rune(0x11)) - b.WriteRune(rune(0x12)) - b.WriteRune(rune(0x13)) - enforceHomeRegionSavepointName := tree.Name(b.String()) + const enforceHomeRegionSavepointName = "enforce_home_region_sp\x11\x12\x13" s := &tree.Savepoint{Name: enforceHomeRegionSavepointName} var event fsm.Event var eventPayload fsm.EventPayload @@ -1039,13 +1034,13 @@ func (ex *connExecutor) execStmtInOpenState( return event, eventPayload, err } - r = &tree.ReleaseSavepoint{Savepoint: enforceHomeRegionSavepointName} - rollbackSP = &tree.RollbackToSavepoint{Savepoint: enforceHomeRegionSavepointName} + releaseHomeRegionSavepoint = &tree.ReleaseSavepoint{Savepoint: enforceHomeRegionSavepointName} + rollbackHomeRegionSavepoint = &tree.RollbackToSavepoint{Savepoint: enforceHomeRegionSavepointName} defer func() { // The default case is to roll back the internally-generated savepoint // after every request. We only need it if a retryable "query has no home // region" error occurs. - ex.execRelease(ctx, r, res) + ex.execRelease(ctx, releaseHomeRegionSavepoint, res) }() } @@ -1082,14 +1077,14 @@ func (ex *connExecutor) execStmtInOpenState( p.EvalContext().Locality = p.EvalContext().OriginalLocality } if execinfra.IsDynamicQueryHasNoHomeRegionError(err) { - if rollbackSP != nil { + if rollbackHomeRegionSavepoint != nil { // A retryable "query has no home region" error has occurred. // Roll back to the internal savepoint in preparation for the next // planning and execution of this query with a different gateway region // (as considered by the optimizer). p.StmtNoConstantsWithHomeRegionEnforced = p.stmt.StmtNoConstants event, eventPayload := ex.execRollbackToSavepointInOpenState( - ctx, rollbackSP, res, + ctx, rollbackHomeRegionSavepoint, res, ) _, isTxnRestart := event.(eventTxnRestart) rollbackToSavepointFailed := !isTxnRestart || eventPayload != nil @@ -1310,12 +1305,11 @@ func (ex *connExecutor) commitSQLTransaction( ex.extraTxnState.idleLatency += ex.statsCollector.PhaseTimes(). GetIdleLatency(ex.statsCollector.PreviousPhaseTimes()) if ex.sessionData().InjectRetryErrorsOnCommitEnabled && ast.StatementTag() == "COMMIT" { - if ex.planner.Txn().Epoch() < ex.state.lastEpoch+numTxnRetryErrors { + if ex.state.injectedTxnRetryCounter < numTxnRetryErrors { retryErr := ex.state.mu.txn.GenerateForcedRetryableErr( ctx, "injected by `inject_retry_errors_on_commit_enabled` session variable") + ex.state.injectedTxnRetryCounter++ return ex.makeErrEvent(retryErr, ast) - } else { - ex.state.lastEpoch = ex.planner.Txn().Epoch() } } ex.phaseTimes.SetSessionPhaseTime(sessionphase.SessionStartTransactionCommit, timeutil.Now()) @@ -1745,12 +1739,11 @@ func (ex *connExecutor) dispatchToExecutionEngine( isSetOrShow := stmt.AST.StatementTag() == "SET" || stmt.AST.StatementTag() == "SHOW" if ex.sessionData().InjectRetryErrorsEnabled && !isSetOrShow && planner.Txn().Sender().TxnStatus() == roachpb.PENDING { - if planner.Txn().Epoch() < ex.state.lastEpoch+numTxnRetryErrors { + if ex.state.injectedTxnRetryCounter < numTxnRetryErrors { retryErr := planner.Txn().GenerateForcedRetryableErr( ctx, "injected by `inject_retry_errors_enabled` session variable") res.SetError(retryErr) - } else { - ex.state.lastEpoch = planner.Txn().Epoch() + ex.state.injectedTxnRetryCounter++ } } } diff --git a/pkg/sql/gcjob_test/BUILD.bazel b/pkg/sql/gcjob_test/BUILD.bazel index bf6f408446bc..def3a5047b52 100644 --- a/pkg/sql/gcjob_test/BUILD.bazel +++ b/pkg/sql/gcjob_test/BUILD.bazel @@ -8,6 +8,7 @@ go_test( "main_test.go", ], args = ["-test.timeout=295s"], + shard_count = 2, deps = [ "//pkg/base", "//pkg/clusterversion", diff --git a/pkg/sql/logictest/tests/5node-disk/BUILD.bazel b/pkg/sql/logictest/tests/5node-disk/BUILD.bazel index a068c600bd72..a6bf2efdbdd0 100644 --- a/pkg/sql/logictest/tests/5node-disk/BUILD.bazel +++ b/pkg/sql/logictest/tests/5node-disk/BUILD.bazel @@ -12,6 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/logictest:testdata", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 14, tags = [ "cpu:3", diff --git a/pkg/sql/logictest/tests/5node/BUILD.bazel b/pkg/sql/logictest/tests/5node/BUILD.bazel index ce12dc8cb36d..9e8e96e16f5c 100644 --- a/pkg/sql/logictest/tests/5node/BUILD.bazel +++ b/pkg/sql/logictest/tests/5node/BUILD.bazel @@ -12,6 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/logictest:testdata", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 20, tags = [ "cpu:3", diff --git a/pkg/sql/logictest/tests/cockroach-go-testserver-upgrade-to-master/BUILD.bazel b/pkg/sql/logictest/tests/cockroach-go-testserver-upgrade-to-master/BUILD.bazel index c8f833548b55..21a7ab9b16ef 100644 --- a/pkg/sql/logictest/tests/cockroach-go-testserver-upgrade-to-master/BUILD.bazel +++ b/pkg/sql/logictest/tests/cockroach-go-testserver-upgrade-to-master/BUILD.bazel @@ -13,6 +13,7 @@ go_test( "//pkg/cmd/cockroach-short", # keep "//pkg/sql/logictest:testdata", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 9, tags = [ "cpu:2", diff --git a/pkg/sql/logictest/tests/fakedist-disk/BUILD.bazel b/pkg/sql/logictest/tests/fakedist-disk/BUILD.bazel index 97f62053e353..1a5fdab09f4c 100644 --- a/pkg/sql/logictest/tests/fakedist-disk/BUILD.bazel +++ b/pkg/sql/logictest/tests/fakedist-disk/BUILD.bazel @@ -12,6 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/logictest:testdata", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 48, tags = [ "cpu:2", diff --git a/pkg/sql/logictest/tests/fakedist-vec-off/BUILD.bazel b/pkg/sql/logictest/tests/fakedist-vec-off/BUILD.bazel index 2057439c4409..10424c303c39 100644 --- a/pkg/sql/logictest/tests/fakedist-vec-off/BUILD.bazel +++ b/pkg/sql/logictest/tests/fakedist-vec-off/BUILD.bazel @@ -12,6 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/logictest:testdata", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 48, tags = [ "cpu:2", diff --git a/pkg/sql/logictest/tests/fakedist/BUILD.bazel b/pkg/sql/logictest/tests/fakedist/BUILD.bazel index 5effd8ebfa9b..41e699b95622 100644 --- a/pkg/sql/logictest/tests/fakedist/BUILD.bazel +++ b/pkg/sql/logictest/tests/fakedist/BUILD.bazel @@ -12,6 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/logictest:testdata", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 48, tags = [ "cpu:2", diff --git a/pkg/sql/logictest/tests/local-legacy-schema-changer/BUILD.bazel b/pkg/sql/logictest/tests/local-legacy-schema-changer/BUILD.bazel index a8724328a022..af6dc80dec8c 100644 --- a/pkg/sql/logictest/tests/local-legacy-schema-changer/BUILD.bazel +++ b/pkg/sql/logictest/tests/local-legacy-schema-changer/BUILD.bazel @@ -12,6 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/logictest:testdata", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 48, tags = [ "cpu:1", diff --git a/pkg/sql/logictest/tests/local-mixed-22.2-23.1/BUILD.bazel b/pkg/sql/logictest/tests/local-mixed-22.2-23.1/BUILD.bazel index 2ca1e2055530..12f5e48a0b48 100644 --- a/pkg/sql/logictest/tests/local-mixed-22.2-23.1/BUILD.bazel +++ b/pkg/sql/logictest/tests/local-mixed-22.2-23.1/BUILD.bazel @@ -12,6 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/logictest:testdata", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 48, tags = [ "cpu:1", diff --git a/pkg/sql/logictest/tests/local-vec-off/BUILD.bazel b/pkg/sql/logictest/tests/local-vec-off/BUILD.bazel index d586c42f2159..6dc7722d0ddf 100644 --- a/pkg/sql/logictest/tests/local-vec-off/BUILD.bazel +++ b/pkg/sql/logictest/tests/local-vec-off/BUILD.bazel @@ -12,6 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/logictest:testdata", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 48, tags = [ "cpu:1", diff --git a/pkg/sql/logictest/tests/local/BUILD.bazel b/pkg/sql/logictest/tests/local/BUILD.bazel index c2ad1ff13b56..417fbd840460 100644 --- a/pkg/sql/logictest/tests/local/BUILD.bazel +++ b/pkg/sql/logictest/tests/local/BUILD.bazel @@ -12,6 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/logictest:testdata", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 48, tags = [ "cpu:1", diff --git a/pkg/sql/logictest/tests/multiregion-9node-3region-3azs/BUILD.bazel b/pkg/sql/logictest/tests/multiregion-9node-3region-3azs/BUILD.bazel index defd2185cd34..77987572bbed 100644 --- a/pkg/sql/logictest/tests/multiregion-9node-3region-3azs/BUILD.bazel +++ b/pkg/sql/logictest/tests/multiregion-9node-3region-3azs/BUILD.bazel @@ -12,6 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/logictest:testdata", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 1, tags = [ "cpu:4", diff --git a/pkg/sql/logictest/tests/multiregion-invalid-locality/BUILD.bazel b/pkg/sql/logictest/tests/multiregion-invalid-locality/BUILD.bazel index 4e1d9f6cb541..3c07595b6740 100644 --- a/pkg/sql/logictest/tests/multiregion-invalid-locality/BUILD.bazel +++ b/pkg/sql/logictest/tests/multiregion-invalid-locality/BUILD.bazel @@ -12,6 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/logictest:testdata", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 1, tags = [ "cpu:2", diff --git a/pkg/sql/opt/exec/execbuilder/tests/5node/BUILD.bazel b/pkg/sql/opt/exec/execbuilder/tests/5node/BUILD.bazel index a0de6461708c..ffbd97784bcd 100644 --- a/pkg/sql/opt/exec/execbuilder/tests/5node/BUILD.bazel +++ b/pkg/sql/opt/exec/execbuilder/tests/5node/BUILD.bazel @@ -12,6 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/opt/exec/execbuilder:testdata", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 29, tags = [ "cpu:3", diff --git a/pkg/sql/opt/exec/execbuilder/tests/fakedist-disk/BUILD.bazel b/pkg/sql/opt/exec/execbuilder/tests/fakedist-disk/BUILD.bazel index ff8d2def729b..c3c1a037b7f8 100644 --- a/pkg/sql/opt/exec/execbuilder/tests/fakedist-disk/BUILD.bazel +++ b/pkg/sql/opt/exec/execbuilder/tests/fakedist-disk/BUILD.bazel @@ -12,6 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/opt/exec/execbuilder:testdata", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 1, tags = [ "cpu:2", diff --git a/pkg/sql/opt/exec/execbuilder/tests/fakedist-vec-off/BUILD.bazel b/pkg/sql/opt/exec/execbuilder/tests/fakedist-vec-off/BUILD.bazel index 0ebd8cc0fbfc..f3c8680fb2cb 100644 --- a/pkg/sql/opt/exec/execbuilder/tests/fakedist-vec-off/BUILD.bazel +++ b/pkg/sql/opt/exec/execbuilder/tests/fakedist-vec-off/BUILD.bazel @@ -12,6 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/opt/exec/execbuilder:testdata", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 1, tags = [ "cpu:2", diff --git a/pkg/sql/opt/exec/execbuilder/tests/fakedist/BUILD.bazel b/pkg/sql/opt/exec/execbuilder/tests/fakedist/BUILD.bazel index 2096f110b6f5..ab3515c74270 100644 --- a/pkg/sql/opt/exec/execbuilder/tests/fakedist/BUILD.bazel +++ b/pkg/sql/opt/exec/execbuilder/tests/fakedist/BUILD.bazel @@ -12,6 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/opt/exec/execbuilder:testdata", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 1, tags = [ "cpu:2", diff --git a/pkg/sql/opt/exec/execbuilder/tests/local-legacy-schema-changer/BUILD.bazel b/pkg/sql/opt/exec/execbuilder/tests/local-legacy-schema-changer/BUILD.bazel index 9ded3f848f73..438d3009c8fa 100644 --- a/pkg/sql/opt/exec/execbuilder/tests/local-legacy-schema-changer/BUILD.bazel +++ b/pkg/sql/opt/exec/execbuilder/tests/local-legacy-schema-changer/BUILD.bazel @@ -12,6 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/opt/exec/execbuilder:testdata", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 1, tags = [ "cpu:1", diff --git a/pkg/sql/opt/exec/execbuilder/tests/local-mixed-22.2-23.1/BUILD.bazel b/pkg/sql/opt/exec/execbuilder/tests/local-mixed-22.2-23.1/BUILD.bazel index 03db27ddbf3e..77d8920f0a29 100644 --- a/pkg/sql/opt/exec/execbuilder/tests/local-mixed-22.2-23.1/BUILD.bazel +++ b/pkg/sql/opt/exec/execbuilder/tests/local-mixed-22.2-23.1/BUILD.bazel @@ -12,6 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/opt/exec/execbuilder:testdata", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 1, tags = [ "cpu:1", diff --git a/pkg/sql/opt/exec/execbuilder/tests/local-vec-off/BUILD.bazel b/pkg/sql/opt/exec/execbuilder/tests/local-vec-off/BUILD.bazel index 1fa60533f649..b3cffb1b9c9e 100644 --- a/pkg/sql/opt/exec/execbuilder/tests/local-vec-off/BUILD.bazel +++ b/pkg/sql/opt/exec/execbuilder/tests/local-vec-off/BUILD.bazel @@ -12,6 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/opt/exec/execbuilder:testdata", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 1, tags = [ "cpu:1", diff --git a/pkg/sql/opt/exec/execbuilder/tests/local/BUILD.bazel b/pkg/sql/opt/exec/execbuilder/tests/local/BUILD.bazel index 14b44076cedf..bb0093e3ecc2 100644 --- a/pkg/sql/opt/exec/execbuilder/tests/local/BUILD.bazel +++ b/pkg/sql/opt/exec/execbuilder/tests/local/BUILD.bazel @@ -12,6 +12,7 @@ go_test( "//c-deps:libgeos", # keep "//pkg/sql/opt/exec/execbuilder:testdata", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 48, tags = [ "cpu:1", diff --git a/pkg/sql/schemachanger/BUILD.bazel b/pkg/sql/schemachanger/BUILD.bazel index 51fee6bc6acb..38b175fac773 100644 --- a/pkg/sql/schemachanger/BUILD.bazel +++ b/pkg/sql/schemachanger/BUILD.bazel @@ -33,6 +33,7 @@ go_test( "//conditions:default": ["-test.timeout=3595s"], }), data = glob(["testdata/**"]), + exec_properties = {"Pool": "large"}, shard_count = 16, deps = [ "//pkg/base", diff --git a/pkg/sql/sqlitelogictest/tests/fakedist-disk/BUILD.bazel b/pkg/sql/sqlitelogictest/tests/fakedist-disk/BUILD.bazel index 2b9556efb58c..c53bd20958bb 100644 --- a/pkg/sql/sqlitelogictest/tests/fakedist-disk/BUILD.bazel +++ b/pkg/sql/sqlitelogictest/tests/fakedist-disk/BUILD.bazel @@ -9,6 +9,7 @@ go_test( "//c-deps:libgeos", # keep "@com_github_cockroachdb_sqllogictest//:testfiles", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 48, tags = [ "cpu:2", diff --git a/pkg/sql/sqlitelogictest/tests/fakedist-vec-off/BUILD.bazel b/pkg/sql/sqlitelogictest/tests/fakedist-vec-off/BUILD.bazel index 9f2322967c52..203a36d3efc6 100644 --- a/pkg/sql/sqlitelogictest/tests/fakedist-vec-off/BUILD.bazel +++ b/pkg/sql/sqlitelogictest/tests/fakedist-vec-off/BUILD.bazel @@ -9,6 +9,7 @@ go_test( "//c-deps:libgeos", # keep "@com_github_cockroachdb_sqllogictest//:testfiles", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 48, tags = [ "cpu:2", diff --git a/pkg/sql/sqlitelogictest/tests/fakedist/BUILD.bazel b/pkg/sql/sqlitelogictest/tests/fakedist/BUILD.bazel index a9cd0aac0bfb..1e228e11ea29 100644 --- a/pkg/sql/sqlitelogictest/tests/fakedist/BUILD.bazel +++ b/pkg/sql/sqlitelogictest/tests/fakedist/BUILD.bazel @@ -9,6 +9,7 @@ go_test( "//c-deps:libgeos", # keep "@com_github_cockroachdb_sqllogictest//:testfiles", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 48, tags = [ "cpu:2", diff --git a/pkg/sql/sqlitelogictest/tests/local-legacy-schema-changer/BUILD.bazel b/pkg/sql/sqlitelogictest/tests/local-legacy-schema-changer/BUILD.bazel index e7e465ed2350..ca44bedb4e45 100644 --- a/pkg/sql/sqlitelogictest/tests/local-legacy-schema-changer/BUILD.bazel +++ b/pkg/sql/sqlitelogictest/tests/local-legacy-schema-changer/BUILD.bazel @@ -9,6 +9,7 @@ go_test( "//c-deps:libgeos", # keep "@com_github_cockroachdb_sqllogictest//:testfiles", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 48, tags = [ "cpu:1", diff --git a/pkg/sql/sqlitelogictest/tests/local-mixed-22.2-23.1/BUILD.bazel b/pkg/sql/sqlitelogictest/tests/local-mixed-22.2-23.1/BUILD.bazel index df1dc58b8c3b..be162f0daf2e 100644 --- a/pkg/sql/sqlitelogictest/tests/local-mixed-22.2-23.1/BUILD.bazel +++ b/pkg/sql/sqlitelogictest/tests/local-mixed-22.2-23.1/BUILD.bazel @@ -9,6 +9,7 @@ go_test( "//c-deps:libgeos", # keep "@com_github_cockroachdb_sqllogictest//:testfiles", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 48, tags = [ "cpu:1", diff --git a/pkg/sql/sqlitelogictest/tests/local-vec-off/BUILD.bazel b/pkg/sql/sqlitelogictest/tests/local-vec-off/BUILD.bazel index acd809956bc7..bc5dca09f988 100644 --- a/pkg/sql/sqlitelogictest/tests/local-vec-off/BUILD.bazel +++ b/pkg/sql/sqlitelogictest/tests/local-vec-off/BUILD.bazel @@ -9,6 +9,7 @@ go_test( "//c-deps:libgeos", # keep "@com_github_cockroachdb_sqllogictest//:testfiles", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 48, tags = [ "cpu:1", diff --git a/pkg/sql/sqlitelogictest/tests/local/BUILD.bazel b/pkg/sql/sqlitelogictest/tests/local/BUILD.bazel index 24dceb218b28..38d0329291e2 100644 --- a/pkg/sql/sqlitelogictest/tests/local/BUILD.bazel +++ b/pkg/sql/sqlitelogictest/tests/local/BUILD.bazel @@ -9,6 +9,7 @@ go_test( "//c-deps:libgeos", # keep "@com_github_cockroachdb_sqllogictest//:testfiles", # keep ], + exec_properties = {"Pool": "large"}, shard_count = 48, tags = [ "cpu:1", diff --git a/pkg/sql/tests/BUILD.bazel b/pkg/sql/tests/BUILD.bazel index 7521b1b17e5b..7ff15268e5b6 100644 --- a/pkg/sql/tests/BUILD.bazel +++ b/pkg/sql/tests/BUILD.bazel @@ -28,7 +28,7 @@ go_library( go_test( name = "tests_test", - size = "large", + size = "enormous", srcs = [ "allow_role_memberships_to_change_during_transaction_test.go", "autocommit_extended_protocol_test.go", @@ -57,9 +57,13 @@ go_test( "truncate_test.go", "virtual_table_test.go", ], - args = ["-test.timeout=895s"], + args = select({ + "//build/toolchains:use_ci_timeouts": ["-test.timeout=895s"], + "//conditions:default": ["-test.timeout=3595s"], + }), data = glob(["testdata/**"]), embed = [":tests"], + exec_properties = {"Pool": "large"}, shard_count = 16, deps = [ "//pkg/base", diff --git a/pkg/sql/txn_state.go b/pkg/sql/txn_state.go index e40481319388..192ddfa9007d 100644 --- a/pkg/sql/txn_state.go +++ b/pkg/sql/txn_state.go @@ -22,7 +22,6 @@ import ( "github.com/cockroachdb/cockroach/pkg/sql/pgwire/pgerror" "github.com/cockroachdb/cockroach/pkg/sql/sem/tree" "github.com/cockroachdb/cockroach/pkg/sql/sessiondatapb" - "github.com/cockroachdb/cockroach/pkg/storage/enginepb" "github.com/cockroachdb/cockroach/pkg/util/hlc" "github.com/cockroachdb/cockroach/pkg/util/metric" "github.com/cockroachdb/cockroach/pkg/util/mon" @@ -108,8 +107,10 @@ type txnState struct { // through the use of AS OF SYSTEM TIME. isHistorical bool - // lastEpoch is the last observed epoch in the current txn. - lastEpoch enginepb.TxnEpoch + // injectedTxnRetryCounter keeps track of how many errors have been + // injected in this transaction with the inject_retry_errors_enabled + // flag. + injectedTxnRetryCounter int // mon tracks txn-bound objects like the running state of // planNode in the midst of performing a computation. @@ -191,7 +192,7 @@ func (ts *txnState) resetForNewSQLTxn( // Reset state vars to defaults. ts.sqlTimestamp = sqlTimestamp ts.isHistorical = false - ts.lastEpoch = 0 + ts.injectedTxnRetryCounter = 0 // Create a context for this transaction. It will include a root span that // will contain everything executed as part of the upcoming SQL txn, including diff --git a/pkg/storage/BUILD.bazel b/pkg/storage/BUILD.bazel index d407e8e784e0..31c8574820e3 100644 --- a/pkg/storage/BUILD.bazel +++ b/pkg/storage/BUILD.bazel @@ -142,6 +142,8 @@ go_test( args = ["-test.timeout=295s"], data = glob(["testdata/**"]), embed = [":storage"], + shard_count = 2, + tags = ["no-remote-exec"], deps = [ "//pkg/base", "//pkg/clusterversion", diff --git a/pkg/storage/metamorphic/BUILD.bazel b/pkg/storage/metamorphic/BUILD.bazel index 0322794c2bc2..c1bd89caabed 100644 --- a/pkg/storage/metamorphic/BUILD.bazel +++ b/pkg/storage/metamorphic/BUILD.bazel @@ -47,6 +47,7 @@ go_test( }), data = glob(["testdata/**"]), embed = [":metamorphic"], + exec_properties = {"Pool": "large"}, shard_count = 8, deps = [ "//pkg/settings/cluster",