From a5a6618d3d862b1e5ae5c57c7f67a952c55d1ab5 Mon Sep 17 00:00:00 2001 From: Yahor Yuzefovich Date: Tue, 22 Mar 2022 08:21:23 -0700 Subject: [PATCH 1/3] logictest: clean up disabling of auto stats All logic test configs currently override the auto stats collection to be disabled, and this commit makes it explicit. Additionally, it removes the explicit statements from the tests themselves for disabling the stats collection. Release note: None --- pkg/sql/logictest/logic.go | 109 +++++++----------- pkg/sql/logictest/testdata/logic_test/delete | 4 - .../testdata/logic_test/distsql_event_log | 3 - .../testdata/logic_test/distsql_stats | 5 +- .../logictest/testdata/logic_test/index_join | 1 - .../logictest/testdata/logic_test/inv_stats | 4 - .../testdata/logic_test/partial_index | 1 - .../logictest/testdata/logic_test/pg_catalog | 3 - .../testdata/logic_test/privileges_comments | 4 - .../testdata/logic_test/privileges_table | 4 - .../testdata/logic_test/schema_change_in_txn | 5 - pkg/sql/logictest/testdata/logic_test/select | 4 - .../logictest/testdata/logic_test/vectorize | 4 - .../execbuilder/testdata/distsql_single_flow | 3 - pkg/sql/opt/exec/execbuilder/testdata/stats | 4 - .../opt/exec/execbuilder/testdata/tpch_vec | 2 - 16 files changed, 41 insertions(+), 119 deletions(-) diff --git a/pkg/sql/logictest/logic.go b/pkg/sql/logictest/logic.go index 04533af09283..c7ee9952d237 100644 --- a/pkg/sql/logictest/logic.go +++ b/pkg/sql/logictest/logic.go @@ -484,8 +484,6 @@ type testClusterConfig struct { overrideDistSQLMode string // if non-empty, overrides the default vectorize mode. overrideVectorize string - // if non-empty, overrides the default automatic statistics mode. - overrideAutoStats string // if non-empty, overrides the default experimental DistSQL planning mode. overrideExperimentalDistSQLPlanning string // if set, queries using distSQL processors or vectorized operators that can @@ -680,20 +678,17 @@ var logicTestConfigs = []testClusterConfig{ name: "local", numNodes: 1, overrideDistSQLMode: "off", - overrideAutoStats: "false", }, { name: "local-vec-off", numNodes: 1, overrideDistSQLMode: "off", - overrideAutoStats: "false", overrideVectorize: "off", }, { name: "local-v1.1@v1.0-noupgrade", numNodes: 1, overrideDistSQLMode: "off", - overrideAutoStats: "false", bootstrapVersion: roachpb.Version{Major: 1}, binaryVersion: roachpb.Version{Major: 1, Minor: 1}, disableUpgrade: true, @@ -702,7 +697,6 @@ var logicTestConfigs = []testClusterConfig{ name: "local-spec-planning", numNodes: 1, overrideDistSQLMode: "off", - overrideAutoStats: "false", overrideExperimentalDistSQLPlanning: "on", }, { @@ -710,14 +704,12 @@ var logicTestConfigs = []testClusterConfig{ numNodes: 3, useFakeSpanResolver: true, overrideDistSQLMode: "on", - overrideAutoStats: "false", }, { name: "fakedist-vec-off", numNodes: 3, useFakeSpanResolver: true, overrideDistSQLMode: "on", - overrideAutoStats: "false", overrideVectorize: "off", }, { @@ -725,7 +717,6 @@ var logicTestConfigs = []testClusterConfig{ numNodes: 3, useFakeSpanResolver: true, overrideDistSQLMode: "on", - overrideAutoStats: "false", distSQLMetadataTestEnabled: true, skipShort: true, }, @@ -734,7 +725,6 @@ var logicTestConfigs = []testClusterConfig{ numNodes: 3, useFakeSpanResolver: true, overrideDistSQLMode: "on", - overrideAutoStats: "false", sqlExecUseDisk: true, skipShort: true, }, @@ -743,20 +733,17 @@ var logicTestConfigs = []testClusterConfig{ numNodes: 3, useFakeSpanResolver: true, overrideDistSQLMode: "on", - overrideAutoStats: "false", overrideExperimentalDistSQLPlanning: "on", }, { name: "5node", numNodes: 5, overrideDistSQLMode: "on", - overrideAutoStats: "false", }, { name: "5node-metadata", numNodes: 5, overrideDistSQLMode: "on", - overrideAutoStats: "false", distSQLMetadataTestEnabled: true, skipShort: true, }, @@ -764,7 +751,6 @@ var logicTestConfigs = []testClusterConfig{ name: "5node-disk", numNodes: 5, overrideDistSQLMode: "on", - overrideAutoStats: "false", sqlExecUseDisk: true, skipShort: true, }, @@ -772,7 +758,6 @@ var logicTestConfigs = []testClusterConfig{ name: "5node-spec-planning", numNodes: 5, overrideDistSQLMode: "on", - overrideAutoStats: "false", overrideExperimentalDistSQLPlanning: "on", }, { @@ -781,13 +766,10 @@ var logicTestConfigs = []testClusterConfig{ // logictest command. // To run a logic test with this config as a directive, run: // make test PKG=./pkg/ccl/logictestccl TESTS=TestTenantLogic// - name: threeNodeTenantConfigName, - numNodes: 3, - // overrideAutoStats will disable automatic stats on the cluster this tenant - // is connected to. - overrideAutoStats: "false", - useTenant: true, - isCCLConfig: true, + name: threeNodeTenantConfigName, + numNodes: 3, + useTenant: true, + isCCLConfig: true, }, // Regions and zones below are named deliberately, and contain "-"'s to be reflective // of the naming convention in public clouds. "-"'s are handled differently in SQL @@ -795,9 +777,8 @@ var logicTestConfigs = []testClusterConfig{ // the multi-region code handles them correctly. { - name: "multiregion-invalid-locality", - numNodes: 3, - overrideAutoStats: "false", + name: "multiregion-invalid-locality", + numNodes: 3, localities: map[int]roachpb.Locality{ 1: { Tiers: []roachpb.Tier{ @@ -817,9 +798,8 @@ var logicTestConfigs = []testClusterConfig{ }, }, { - name: "multiregion-3node-3superlongregions", - numNodes: 3, - overrideAutoStats: "false", + name: "multiregion-3node-3superlongregions", + numNodes: 3, localities: map[int]roachpb.Locality{ 1: { Tiers: []roachpb.Tier{ @@ -839,36 +819,31 @@ var logicTestConfigs = []testClusterConfig{ }, }, { - name: "multiregion-9node-3region-3azs", - numNodes: 9, - overrideAutoStats: "false", - localities: multiregion9node3region3azsLocalities, + name: "multiregion-9node-3region-3azs", + numNodes: 9, + localities: multiregion9node3region3azsLocalities, }, { - name: "multiregion-9node-3region-3azs-tenant", - numNodes: 9, - overrideAutoStats: "false", - localities: multiregion9node3region3azsLocalities, - useTenant: true, + name: "multiregion-9node-3region-3azs-tenant", + numNodes: 9, + localities: multiregion9node3region3azsLocalities, + useTenant: true, }, { name: "multiregion-9node-3region-3azs-vec-off", numNodes: 9, - overrideAutoStats: "false", localities: multiregion9node3region3azsLocalities, overrideVectorize: "off", }, { - name: "multiregion-15node-5region-3azs", - numNodes: 15, - overrideAutoStats: "false", - localities: multiregion15node5region3azsLocalities, + name: "multiregion-15node-5region-3azs", + numNodes: 15, + localities: multiregion15node5region3azsLocalities, }, { name: "local-mixed-21.2-22.1", numNodes: 1, overrideDistSQLMode: "off", - overrideAutoStats: "false", bootstrapVersion: roachpb.Version{Major: 21, Minor: 2}, binaryVersion: roachpb.Version{Major: 22, Minor: 1}, disableUpgrade: true, @@ -1752,32 +1727,28 @@ func (t *logicTest) newCluster(serverArgs TestServerArgs, opts []clusterOpt) { } } - if cfg.overrideAutoStats != "" { - if _, err := conn.Exec( - "SET CLUSTER SETTING sql.stats.automatic_collection.enabled = $1::bool", cfg.overrideAutoStats, - ); err != nil { - t.Fatal(err) - } - } else { - // Background stats collection is enabled by default, but we've seen tests - // flake with it on. When the issue manifests, it seems to be around a - // schema change transaction getting pushed, which causes it to increment a - // table ID twice instead of once, causing non-determinism. - // - // In the short term, we disable auto stats by default to avoid the flakes. - // - // In the long run, these tests should be running with default settings as - // much as possible, so we likely want to address this. Two options are - // either making schema changes more resilient to being pushed or possibly - // making auto stats avoid pushing schema change transactions. There might - // be other better alternatives than these. - // - // See #37751 for details. - if _, err := conn.Exec( - "SET CLUSTER SETTING sql.stats.automatic_collection.enabled = false", - ); err != nil { - t.Fatal(err) - } + // We disable the automatic stats collection in order to have + // deterministic tests. + // + // We've also seen tests flake with it on. When the issue manifests, it + // seems to be around a schema change transaction getting pushed, which + // causes it to increment a table ID twice instead of once, causing + // non-determinism. + // + // In the short term, we disable auto stats by default to avoid the + // flakes. + // + // In the long run, these tests should be running with default settings + // as much as possible, so we likely want to address this. Two options + // are either making schema changes more resilient to being pushed or + // possibly making auto stats avoid pushing schema change transactions. + // There might be other better alternatives than these. + // + // See #37751 for details. + if _, err := conn.Exec( + "SET CLUSTER SETTING sql.stats.automatic_collection.enabled = false", + ); err != nil { + t.Fatal(err) } if cfg.overrideExperimentalDistSQLPlanning != "" { diff --git a/pkg/sql/logictest/testdata/logic_test/delete b/pkg/sql/logictest/testdata/logic_test/delete index dc1d5a2db7c5..719d5dc5721b 100644 --- a/pkg/sql/logictest/testdata/logic_test/delete +++ b/pkg/sql/logictest/testdata/logic_test/delete @@ -262,10 +262,6 @@ COMMIT subtest regression_33361 -# Disable automatic stats to avoid flakiness (sometimes causes retry errors). -statement ok -SET CLUSTER SETTING sql.stats.automatic_collection.enabled = false - statement ok CREATE TABLE t33361(x INT PRIMARY KEY, y INT UNIQUE, z INT); INSERT INTO t33361 VALUES (1, 2, 3) diff --git a/pkg/sql/logictest/testdata/logic_test/distsql_event_log b/pkg/sql/logictest/testdata/logic_test/distsql_event_log index e979e5b9a1ef..7423d1d99245 100644 --- a/pkg/sql/logictest/testdata/logic_test/distsql_event_log +++ b/pkg/sql/logictest/testdata/logic_test/distsql_event_log @@ -2,9 +2,6 @@ # CREATE STATISTICS ################### -statement ok -SET CLUSTER SETTING sql.stats.automatic_collection.enabled = false - # This test verifies that events are posted for table statistics creation. statement ok SET CLUSTER SETTING sql.stats.post_events.enabled = TRUE diff --git a/pkg/sql/logictest/testdata/logic_test/distsql_stats b/pkg/sql/logictest/testdata/logic_test/distsql_stats index 903dac6f5a2f..ca78f57c67c9 100644 --- a/pkg/sql/logictest/testdata/logic_test/distsql_stats +++ b/pkg/sql/logictest/testdata/logic_test/distsql_stats @@ -1,9 +1,6 @@ # LogicTest: 5node 5node-metadata -# Disable automatic stats. -statement ok -SET CLUSTER SETTING sql.stats.automatic_collection.enabled = false - +# Disable histogram collection. statement ok SET CLUSTER SETTING sql.stats.histogram_collection.enabled = false diff --git a/pkg/sql/logictest/testdata/logic_test/index_join b/pkg/sql/logictest/testdata/logic_test/index_join index 747c259b4f26..db26c6c264e2 100644 --- a/pkg/sql/logictest/testdata/logic_test/index_join +++ b/pkg/sql/logictest/testdata/logic_test/index_join @@ -5,7 +5,6 @@ # tests. statement ok -SET CLUSTER SETTING sql.stats.automatic_collection.enabled = false; CREATE TABLE lineitem ( l_orderkey int PRIMARY KEY, diff --git a/pkg/sql/logictest/testdata/logic_test/inv_stats b/pkg/sql/logictest/testdata/logic_test/inv_stats index f043059c1d80..ca8ab06016a2 100644 --- a/pkg/sql/logictest/testdata/logic_test/inv_stats +++ b/pkg/sql/logictest/testdata/logic_test/inv_stats @@ -3,10 +3,6 @@ # Tests that verify we retrieve the stats correctly. Note that we can't create # statistics if distsql mode is OFF. -# Disable automatic stats to prevent flakes if auto stats run. -statement ok -SET CLUSTER SETTING sql.stats.automatic_collection.enabled = false - statement ok CREATE TABLE t (j JSON, g GEOMETRY); CREATE INVERTED INDEX ON t (j); diff --git a/pkg/sql/logictest/testdata/logic_test/partial_index b/pkg/sql/logictest/testdata/logic_test/partial_index index 2208770966a1..ce153bc940d6 100644 --- a/pkg/sql/logictest/testdata/logic_test/partial_index +++ b/pkg/sql/logictest/testdata/logic_test/partial_index @@ -1036,7 +1036,6 @@ DELETE from u subtest join statement ok -SET CLUSTER SETTING sql.stats.automatic_collection.enabled = false; CREATE TABLE join_small (m INT, n INT); CREATE TABLE join_large (i INT, s STRING, INDEX (i) WHERE s IN ('foo', 'bar', 'baz')); ALTER TABLE join_small INJECT STATISTICS '[ diff --git a/pkg/sql/logictest/testdata/logic_test/pg_catalog b/pkg/sql/logictest/testdata/logic_test/pg_catalog index 545360c6d31a..ed135036625b 100644 --- a/pkg/sql/logictest/testdata/logic_test/pg_catalog +++ b/pkg/sql/logictest/testdata/logic_test/pg_catalog @@ -1,8 +1,5 @@ # LogicTest: local -statement ok -SET CLUSTER SETTING sql.stats.automatic_collection.enabled = false - # Verify pg_catalog database handles mutation statements correctly. query error database "pg_catalog" does not exist diff --git a/pkg/sql/logictest/testdata/logic_test/privileges_comments b/pkg/sql/logictest/testdata/logic_test/privileges_comments index 54fd1dbb57ae..17752cc35589 100644 --- a/pkg/sql/logictest/testdata/logic_test/privileges_comments +++ b/pkg/sql/logictest/testdata/logic_test/privileges_comments @@ -1,7 +1,3 @@ -# Disable automatic stats to avoid flakiness. -statement ok -SET CLUSTER SETTING sql.stats.automatic_collection.enabled = false - subtest regression45707 user root diff --git a/pkg/sql/logictest/testdata/logic_test/privileges_table b/pkg/sql/logictest/testdata/logic_test/privileges_table index aee1dd2e8655..a1ed704d55b2 100644 --- a/pkg/sql/logictest/testdata/logic_test/privileges_table +++ b/pkg/sql/logictest/testdata/logic_test/privileges_table @@ -1,7 +1,3 @@ -# Disable automatic stats to avoid flakiness. -statement ok -SET CLUSTER SETTING sql.stats.automatic_collection.enabled = false - # Test default table-level permissions. # Default user is root. statement ok diff --git a/pkg/sql/logictest/testdata/logic_test/schema_change_in_txn b/pkg/sql/logictest/testdata/logic_test/schema_change_in_txn index fb3e9f78f4cb..fc2591c63e07 100644 --- a/pkg/sql/logictest/testdata/logic_test/schema_change_in_txn +++ b/pkg/sql/logictest/testdata/logic_test/schema_change_in_txn @@ -1,8 +1,3 @@ -# Disable automatic stats to avoid flakiness (sometimes causes retry errors). -statement ok -SET CLUSTER SETTING sql.stats.automatic_collection.enabled = false - - # Skip the rest of the test if a retry occurs. They can happen and are fine # but there's no way to encapsulate that in logictests. skip_on_retry diff --git a/pkg/sql/logictest/testdata/logic_test/select b/pkg/sql/logictest/testdata/logic_test/select index 9da81fe86118..573809742d30 100644 --- a/pkg/sql/logictest/testdata/logic_test/select +++ b/pkg/sql/logictest/testdata/logic_test/select @@ -731,9 +731,6 @@ SELECT * FROM t44132 WHERE c0 true NULL # Tests for `disallow_full_table_scans` -statement ok -SET CLUSTER SETTING sql.stats.automatic_collection.enabled = false - statement ok CREATE TABLE t_disallow_scans(a INT, b INT, INDEX b_idx(b), INDEX b_partial(b) WHERE a > 0); @@ -842,7 +839,6 @@ SELECT * FROM t_disallow_scans@b_idx statement ok SET disallow_full_table_scans = false; RESET large_full_scan_rows; -RESET CLUSTER SETTING sql.stats.automatic_collection.enabled; # Regression test for #58104. statement ok diff --git a/pkg/sql/logictest/testdata/logic_test/vectorize b/pkg/sql/logictest/testdata/logic_test/vectorize index 696b05ca8f31..eb3d31862540 100644 --- a/pkg/sql/logictest/testdata/logic_test/vectorize +++ b/pkg/sql/logictest/testdata/logic_test/vectorize @@ -3,10 +3,6 @@ # Note that there is no much benefit from running this file with other logic # test configurations because we override vectorize setting. -# Disable automatic stats. -statement ok -SET CLUSTER SETTING sql.stats.automatic_collection.enabled = false - # NOTE: all queries in this file should run with vectorize=experimental_always # unless they are known to be unsupported (like generate_series, etc). If you do # need to execute an unsupported query, follow the pattern of diff --git a/pkg/sql/opt/exec/execbuilder/testdata/distsql_single_flow b/pkg/sql/opt/exec/execbuilder/testdata/distsql_single_flow index 38b3b39c6ff2..4a39dd6700a4 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_single_flow +++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_single_flow @@ -1,8 +1,5 @@ # LogicTest: 5node -statement ok -SET CLUSTER SETTING sql.stats.automatic_collection.enabled = false - statement ok CREATE TABLE t (a INT PRIMARY KEY, b INT, c INT) diff --git a/pkg/sql/opt/exec/execbuilder/testdata/stats b/pkg/sql/opt/exec/execbuilder/testdata/stats index 587f0534687f..52383920b889 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/stats +++ b/pkg/sql/opt/exec/execbuilder/testdata/stats @@ -3,10 +3,6 @@ # Tests that verify we retrieve the stats correctly. Note that we can't create # statistics if distsql mode is OFF. -# Disable automatic stats to prevent flakes if auto stats run. -statement ok -SET CLUSTER SETTING sql.stats.automatic_collection.enabled = false - statement ok CREATE TABLE uv (u INT, v INT, INDEX (u) STORING (v), INDEX (v) STORING (u)); INSERT INTO uv VALUES (1, 1), (1, 2), (1, 3), (1, 4), (2, 4), (2, 5), (2, 6), (2, 7) diff --git a/pkg/sql/opt/exec/execbuilder/testdata/tpch_vec b/pkg/sql/opt/exec/execbuilder/testdata/tpch_vec index 8b41bcf4c901..05f3802c4014 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/tpch_vec +++ b/pkg/sql/opt/exec/execbuilder/testdata/tpch_vec @@ -1,8 +1,6 @@ # LogicTest: local # Note that statistics are populated for TPCH Scale Factor 1. -statement ok -SET CLUSTER SETTING sql.stats.automatic_collection.enabled = false statement ok CREATE TABLE public.region From 415c2657e216dec2fc1bcdfa909b2eb3cbc7bbd9 Mon Sep 17 00:00:00 2001 From: Rafi Shamim Date: Tue, 22 Mar 2022 11:30:19 -0400 Subject: [PATCH 2/3] clusterversion: fix datestyle/intervalstyle migration key I noticed this while reviewing the backport. Seems like a typo that made it through when rewriting logic tests. The 22.1 branch is not affected. Release note: None --- docs/generated/settings/settings-for-tenants.txt | 2 +- docs/generated/settings/settings.html | 2 +- pkg/ccl/logictestccl/testdata/logic_test/crdb_internal_tenant | 4 ++-- pkg/clusterversion/cockroach_versions.go | 2 +- pkg/sql/logictest/testdata/logic_test/crdb_internal | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/generated/settings/settings-for-tenants.txt b/docs/generated/settings/settings-for-tenants.txt index 8275485b2fc6..3219ab0366c8 100644 --- a/docs/generated/settings/settings-for-tenants.txt +++ b/docs/generated/settings/settings-for-tenants.txt @@ -193,4 +193,4 @@ trace.jaeger.agent string the address of a Jaeger agent to receive traces using trace.opentelemetry.collector string address of an OpenTelemetry trace collector to receive traces using the otel gRPC protocol, as :. If no port is specified, 4317 will be used. trace.span_registry.enabled boolean true if set, ongoing traces can be seen at https:///#/debug/tracez trace.zipkin.collector string the address of a Zipkin instance to receive traces, as :. If no port is specified, 9411 will be used. -version version 22.1-94 set the active cluster version in the format '.' +version version 21.2-94 set the active cluster version in the format '.' diff --git a/docs/generated/settings/settings.html b/docs/generated/settings/settings.html index fe736143bdb3..f9d81cf6434e 100644 --- a/docs/generated/settings/settings.html +++ b/docs/generated/settings/settings.html @@ -208,6 +208,6 @@ trace.opentelemetry.collectorstringaddress of an OpenTelemetry trace collector to receive traces using the otel gRPC protocol, as :. If no port is specified, 4317 will be used. trace.span_registry.enabledbooleantrueif set, ongoing traces can be seen at https:///#/debug/tracez trace.zipkin.collectorstringthe address of a Zipkin instance to receive traces, as :. If no port is specified, 9411 will be used. -versionversion22.1-94set the active cluster version in the format '.' +versionversion21.2-94set the active cluster version in the format '.' diff --git a/pkg/ccl/logictestccl/testdata/logic_test/crdb_internal_tenant b/pkg/ccl/logictestccl/testdata/logic_test/crdb_internal_tenant index 500b23c06975..fdcd6165755f 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/crdb_internal_tenant +++ b/pkg/ccl/logictestccl/testdata/logic_test/crdb_internal_tenant @@ -355,7 +355,7 @@ select crdb_internal.get_vmodule() query T select regexp_replace(crdb_internal.node_executable_version()::string, '(-\d+)?$', ''); ---- -22.1 +21.2 query ITTT colnames select node_id, component, field, regexp_replace(regexp_replace(value, '^\d+$', ''), e':\\d+', ':') as value from crdb_internal.node_runtime_info @@ -448,7 +448,7 @@ select * from crdb_internal.gossip_alerts query T select regexp_replace(crdb_internal.node_executable_version()::string, '(-\d+)?$', ''); ---- -22.1 +21.2 user root diff --git a/pkg/clusterversion/cockroach_versions.go b/pkg/clusterversion/cockroach_versions.go index 96eb3aeec36b..4c2aa5c05b68 100644 --- a/pkg/clusterversion/cockroach_versions.go +++ b/pkg/clusterversion/cockroach_versions.go @@ -534,7 +534,7 @@ var versionsSingleton = keyedVersions{ }, { Key: DateStyleIntervalStyleCastRewrite, - Version: roachpb.Version{Major: 22, Minor: 1, Internal: 94}, + Version: roachpb.Version{Major: 21, Minor: 2, Internal: 94}, }, // ************************************************* diff --git a/pkg/sql/logictest/testdata/logic_test/crdb_internal b/pkg/sql/logictest/testdata/logic_test/crdb_internal index 6e30ddb11e3b..ab152a39681d 100644 --- a/pkg/sql/logictest/testdata/logic_test/crdb_internal +++ b/pkg/sql/logictest/testdata/logic_test/crdb_internal @@ -529,7 +529,7 @@ select crdb_internal.get_vmodule() query T select regexp_replace(crdb_internal.node_executable_version()::string, '(-\d+)?$', ''); ---- -22.1 +21.2 query ITTT colnames select node_id, component, field, regexp_replace(regexp_replace(value, '^\d+$', ''), e':\\d+', ':') as value from crdb_internal.node_runtime_info @@ -688,7 +688,7 @@ select * from crdb_internal.node_inflight_trace_spans query T select regexp_replace(crdb_internal.node_executable_version()::string, '(-\d+)?$', ''); ---- -22.1 +21.2 user root From 7b05a181c1e324cf3d6b99f69309c49ed312cbb7 Mon Sep 17 00:00:00 2001 From: Ye Ji Date: Tue, 22 Mar 2022 10:47:30 -0400 Subject: [PATCH 3/3] streamingccl: skip flaky TestPartitionedStreamReplicationClient test Release note: None --- pkg/ccl/streamingccl/streamclient/BUILD.bazel | 1 + .../streamingccl/streamclient/partitioned_stream_client_test.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/pkg/ccl/streamingccl/streamclient/BUILD.bazel b/pkg/ccl/streamingccl/streamclient/BUILD.bazel index 1f4a154423e3..b90275b78bf6 100644 --- a/pkg/ccl/streamingccl/streamclient/BUILD.bazel +++ b/pkg/ccl/streamingccl/streamclient/BUILD.bazel @@ -61,6 +61,7 @@ go_test( "//pkg/sql/catalog/desctestutils", "//pkg/streaming", "//pkg/testutils/serverutils", + "//pkg/testutils/skip", "//pkg/testutils/testcluster", "//pkg/util/ctxgroup", "//pkg/util/hlc", diff --git a/pkg/ccl/streamingccl/streamclient/partitioned_stream_client_test.go b/pkg/ccl/streamingccl/streamclient/partitioned_stream_client_test.go index 85f76933fdbc..56aba5b83f94 100644 --- a/pkg/ccl/streamingccl/streamclient/partitioned_stream_client_test.go +++ b/pkg/ccl/streamingccl/streamclient/partitioned_stream_client_test.go @@ -24,6 +24,7 @@ import ( "github.com/cockroachdb/cockroach/pkg/roachpb" "github.com/cockroachdb/cockroach/pkg/sql/catalog/desctestutils" "github.com/cockroachdb/cockroach/pkg/streaming" + "github.com/cockroachdb/cockroach/pkg/testutils/skip" "github.com/cockroachdb/cockroach/pkg/util/ctxgroup" "github.com/cockroachdb/cockroach/pkg/util/hlc" "github.com/cockroachdb/cockroach/pkg/util/leaktest" @@ -50,6 +51,7 @@ func (f *subscriptionFeedSource) Close(ctx context.Context) {} func TestPartitionedStreamReplicationClient(t *testing.T) { defer leaktest.AfterTest(t)() + skip.UnderRaceWithIssue(t, 77916, "flaky test") defer log.Scope(t).Close(t) h, cleanup := streamingtest.NewReplicationHelper(t, base.TestServerArgs{