Skip to content

Commit

Permalink
sql/logictest: add MVCC range tombstone test configs
Browse files Browse the repository at this point in the history
This patch adds two new test configurations, `fakedist-range-tombstone`
and `3node-tenant-range-tombstone`, for the SQL logic tests. These write
a single, global MVCC range tombstone across the entire user keyspace
during cluster bootstrapping. This should not semantically affect the
test data written above it, but will activate MVCC range tombstone code
paths in the storage layer for testing.

Release justification: non-production code changes

Release note: None
  • Loading branch information
erikgrinaker committed Aug 26, 2022
1 parent 909219c commit 254113a
Show file tree
Hide file tree
Showing 31 changed files with 3,989 additions and 18 deletions.
15 changes: 15 additions & 0 deletions pkg/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ ALL_TESTS = [
"//pkg/ccl/kvccl/kvfollowerreadsccl:kvfollowerreadsccl_test",
"//pkg/ccl/kvccl/kvtenantccl:kvtenantccl_test",
"//pkg/ccl/logictestccl/tests/3node-tenant-multiregion:3node-tenant-multiregion_test",
"//pkg/ccl/logictestccl/tests/3node-tenant-range-tombstone:3node-tenant-range-tombstone_test",
"//pkg/ccl/logictestccl/tests/3node-tenant:3node-tenant_test",
"//pkg/ccl/logictestccl/tests/5node:5node_test",
"//pkg/ccl/logictestccl/tests/fakedist-disk:fakedist-disk_test",
"//pkg/ccl/logictestccl/tests/fakedist-range-tombstone:fakedist-range-tombstone_test",
"//pkg/ccl/logictestccl/tests/fakedist-vec-off:fakedist-vec-off_test",
"//pkg/ccl/logictestccl/tests/fakedist:fakedist_test",
"//pkg/ccl/logictestccl/tests/local-vec-off:local-vec-off_test",
Expand Down Expand Up @@ -357,6 +359,7 @@ ALL_TESTS = [
"//pkg/sql/logictest/tests/5node-disk:5node-disk_test",
"//pkg/sql/logictest/tests/5node:5node_test",
"//pkg/sql/logictest/tests/fakedist-disk:fakedist-disk_test",
"//pkg/sql/logictest/tests/fakedist-range-tombstone:fakedist-range-tombstone_test",
"//pkg/sql/logictest/tests/fakedist-vec-off:fakedist-vec-off_test",
"//pkg/sql/logictest/tests/fakedist:fakedist_test",
"//pkg/sql/logictest/tests/local-mixed-22.1-22.2:local-mixed-22_1-22_2_test",
Expand All @@ -374,6 +377,7 @@ ALL_TESTS = [
"//pkg/sql/opt/distribution:distribution_test",
"//pkg/sql/opt/exec/execbuilder/tests/5node:5node_test",
"//pkg/sql/opt/exec/execbuilder/tests/fakedist-disk:fakedist-disk_test",
"//pkg/sql/opt/exec/execbuilder/tests/fakedist-range-tombstone:fakedist-range-tombstone_test",
"//pkg/sql/opt/exec/execbuilder/tests/fakedist-vec-off:fakedist-vec-off_test",
"//pkg/sql/opt/exec/execbuilder/tests/fakedist:fakedist_test",
"//pkg/sql/opt/exec/execbuilder/tests/local-vec-off:local-vec-off_test",
Expand Down Expand Up @@ -460,6 +464,7 @@ ALL_TESTS = [
"//pkg/sql/sqlinstance/instanceprovider:instanceprovider_test",
"//pkg/sql/sqlinstance/instancestorage:instancestorage_test",
"//pkg/sql/sqlitelogictest/tests/fakedist-disk:fakedist-disk_test",
"//pkg/sql/sqlitelogictest/tests/fakedist-range-tombstone:fakedist-range-tombstone_test",
"//pkg/sql/sqlitelogictest/tests/fakedist-vec-off:fakedist-vec-off_test",
"//pkg/sql/sqlitelogictest/tests/fakedist:fakedist_test",
"//pkg/sql/sqlitelogictest/tests/local-vec-off:local-vec-off_test",
Expand Down Expand Up @@ -682,9 +687,11 @@ GO_TARGETS = [
"//pkg/ccl/kvccl/kvtenantccl:kvtenantccl_test",
"//pkg/ccl/kvccl:kvccl",
"//pkg/ccl/logictestccl/tests/3node-tenant-multiregion:3node-tenant-multiregion_test",
"//pkg/ccl/logictestccl/tests/3node-tenant-range-tombstone:3node-tenant-range-tombstone_test",
"//pkg/ccl/logictestccl/tests/3node-tenant:3node-tenant_test",
"//pkg/ccl/logictestccl/tests/5node:5node_test",
"//pkg/ccl/logictestccl/tests/fakedist-disk:fakedist-disk_test",
"//pkg/ccl/logictestccl/tests/fakedist-range-tombstone:fakedist-range-tombstone_test",
"//pkg/ccl/logictestccl/tests/fakedist-vec-off:fakedist-vec-off_test",
"//pkg/ccl/logictestccl/tests/fakedist:fakedist_test",
"//pkg/ccl/logictestccl/tests/local-vec-off:local-vec-off_test",
Expand Down Expand Up @@ -1455,6 +1462,7 @@ GO_TARGETS = [
"//pkg/sql/logictest/tests/5node-disk:5node-disk_test",
"//pkg/sql/logictest/tests/5node:5node_test",
"//pkg/sql/logictest/tests/fakedist-disk:fakedist-disk_test",
"//pkg/sql/logictest/tests/fakedist-range-tombstone:fakedist-range-tombstone_test",
"//pkg/sql/logictest/tests/fakedist-vec-off:fakedist-vec-off_test",
"//pkg/sql/logictest/tests/fakedist:fakedist_test",
"//pkg/sql/logictest/tests/local-mixed-22.1-22.2:local-mixed-22_1-22_2_test",
Expand All @@ -1481,6 +1489,7 @@ GO_TARGETS = [
"//pkg/sql/opt/distribution:distribution_test",
"//pkg/sql/opt/exec/execbuilder/tests/5node:5node_test",
"//pkg/sql/opt/exec/execbuilder/tests/fakedist-disk:fakedist-disk_test",
"//pkg/sql/opt/exec/execbuilder/tests/fakedist-range-tombstone:fakedist-range-tombstone_test",
"//pkg/sql/opt/exec/execbuilder/tests/fakedist-vec-off:fakedist-vec-off_test",
"//pkg/sql/opt/exec/execbuilder/tests/fakedist:fakedist_test",
"//pkg/sql/opt/exec/execbuilder/tests/local-vec-off:local-vec-off_test",
Expand Down Expand Up @@ -1689,6 +1698,7 @@ GO_TARGETS = [
"//pkg/sql/sqlinstance/instancestorage:instancestorage_test",
"//pkg/sql/sqlinstance:sqlinstance",
"//pkg/sql/sqlitelogictest/tests/fakedist-disk:fakedist-disk_test",
"//pkg/sql/sqlitelogictest/tests/fakedist-range-tombstone:fakedist-range-tombstone_test",
"//pkg/sql/sqlitelogictest/tests/fakedist-vec-off:fakedist-vec-off_test",
"//pkg/sql/sqlitelogictest/tests/fakedist:fakedist_test",
"//pkg/sql/sqlitelogictest/tests/local-vec-off:local-vec-off_test",
Expand Down Expand Up @@ -2117,9 +2127,11 @@ GET_X_DATA_TARGETS = [
"//pkg/ccl/logictestccl:get_x_data",
"//pkg/ccl/logictestccl/tests/3node-tenant:get_x_data",
"//pkg/ccl/logictestccl/tests/3node-tenant-multiregion:get_x_data",
"//pkg/ccl/logictestccl/tests/3node-tenant-range-tombstone:get_x_data",
"//pkg/ccl/logictestccl/tests/5node:get_x_data",
"//pkg/ccl/logictestccl/tests/fakedist:get_x_data",
"//pkg/ccl/logictestccl/tests/fakedist-disk:get_x_data",
"//pkg/ccl/logictestccl/tests/fakedist-range-tombstone:get_x_data",
"//pkg/ccl/logictestccl/tests/fakedist-vec-off:get_x_data",
"//pkg/ccl/logictestccl/tests/local:get_x_data",
"//pkg/ccl/logictestccl/tests/local-vec-off:get_x_data",
Expand Down Expand Up @@ -2579,6 +2591,7 @@ GET_X_DATA_TARGETS = [
"//pkg/sql/logictest/tests/5node-disk:get_x_data",
"//pkg/sql/logictest/tests/fakedist:get_x_data",
"//pkg/sql/logictest/tests/fakedist-disk:get_x_data",
"//pkg/sql/logictest/tests/fakedist-range-tombstone:get_x_data",
"//pkg/sql/logictest/tests/fakedist-vec-off:get_x_data",
"//pkg/sql/logictest/tests/local:get_x_data",
"//pkg/sql/logictest/tests/local-mixed-22.1-22.2:get_x_data",
Expand All @@ -2600,6 +2613,7 @@ GET_X_DATA_TARGETS = [
"//pkg/sql/opt/exec/execbuilder/tests/5node:get_x_data",
"//pkg/sql/opt/exec/execbuilder/tests/fakedist:get_x_data",
"//pkg/sql/opt/exec/execbuilder/tests/fakedist-disk:get_x_data",
"//pkg/sql/opt/exec/execbuilder/tests/fakedist-range-tombstone:get_x_data",
"//pkg/sql/opt/exec/execbuilder/tests/fakedist-vec-off:get_x_data",
"//pkg/sql/opt/exec/execbuilder/tests/local:get_x_data",
"//pkg/sql/opt/exec/execbuilder/tests/local-vec-off:get_x_data",
Expand Down Expand Up @@ -2728,6 +2742,7 @@ GET_X_DATA_TARGETS = [
"//pkg/sql/sqlitelogictest:get_x_data",
"//pkg/sql/sqlitelogictest/tests/fakedist:get_x_data",
"//pkg/sql/sqlitelogictest/tests/fakedist-disk:get_x_data",
"//pkg/sql/sqlitelogictest/tests/fakedist-range-tombstone:get_x_data",
"//pkg/sql/sqlitelogictest/tests/fakedist-vec-off:get_x_data",
"//pkg/sql/sqlitelogictest/tests/local:get_x_data",
"//pkg/sql/sqlitelogictest/tests/local-vec-off:get_x_data",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
load("//build/bazelutil/unused_checker:unused.bzl", "get_x_data")
load("@io_bazel_rules_go//go:def.bzl", "go_test")

go_test(
name = "3node-tenant-range-tombstone_test",
size = "enormous",
srcs = ["generated_test.go"],
data = [
"//c-deps:libgeos", # keep
"//pkg/sql/logictest:testdata", # keep
],
shard_count = 1,
tags = ["cpu:2"],
deps = [
"//pkg/build/bazel",
"//pkg/ccl",
"//pkg/ccl/utilccl",
"//pkg/security/securityassets",
"//pkg/security/securitytest",
"//pkg/server",
"//pkg/sql/logictest",
"//pkg/testutils/serverutils",
"//pkg/testutils/skip",
"//pkg/testutils/testcluster",
"//pkg/util/leaktest",
"//pkg/util/randutil",
],
)

get_x_data(name = "get_x_data")

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/ccl/logictestccl/tests/3node-tenant/generated_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/ccl/logictestccl/tests/5node/generated_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions pkg/ccl/logictestccl/tests/fakedist-range-tombstone/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
load("//build/bazelutil/unused_checker:unused.bzl", "get_x_data")
load("@io_bazel_rules_go//go:def.bzl", "go_test")

go_test(
name = "fakedist-range-tombstone_test",
size = "enormous",
srcs = ["generated_test.go"],
data = [
"//c-deps:libgeos", # keep
"//pkg/ccl/logictestccl:testdata", # keep
],
shard_count = 3,
tags = ["cpu:2"],
deps = [
"//pkg/build/bazel",
"//pkg/ccl",
"//pkg/ccl/utilccl",
"//pkg/security/securityassets",
"//pkg/security/securitytest",
"//pkg/server",
"//pkg/sql/logictest",
"//pkg/testutils/serverutils",
"//pkg/testutils/skip",
"//pkg/testutils/testcluster",
"//pkg/util/leaktest",
"//pkg/util/randutil",
],
)

get_x_data(name = "get_x_data")

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 254113a

Please sign in to comment.