Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opt: internal error: memo group optimization passes surpassed limit of 100000 #80901

Closed
cockroach-teamcity opened this issue May 3, 2022 · 4 comments · Fixed by #83875
Closed
Assignees
Labels
C-test-failure Broken test (automatically or manually discovered). deprecated-branch-release-22.1.0 O-roachtest O-robot Originated from a bot. T-sql-queries SQL Queries Team

Comments

@cockroach-teamcity
Copy link
Member

cockroach-teamcity commented May 3, 2022

roachtest.sqlsmith/setup=rand-tables/setting=no-ddl failed with artifacts on release-22.1.0 @ 120fbbb2cb4bdd071c1835f29d5364953752a5bd:

The test failed on branch=release-22.1.0, cloud=gce:
test artifacts and logs in: /artifacts/sqlsmith/setup=rand-tables/setting=no-ddl/run_1
	sqlsmith.go:265,sqlsmith.go:304,test_runner.go:875: error: pq: internal error: memo group optimization passes surpassed limit of 100000; there may be a cycle in the memo
		stmt:
		SELECT
			tab_42922.col2_6 AS col_94144,
			tab_42922.col2_13 AS col_94145,
			NULL AS col_94146,
			tab_42921.col1_11 AS col_94147,
			postgis_wagyu_version()::STRING AS col_94148,
			'218.76.152.122/9':::INET AS col_94149,
			tab_42921.col1_3 AS col_94150,
			tab_42921.col1_2 AS col_94151,
			tab_42921.col1_6 AS col_94152,
			e'\\G':::STRING AS col_94153,
			tab_42921.tableoid AS col_94154,
			tab_42921.tableoid AS col_94155,
			(
				SELECT
					B'10' AS col_94156
				FROM
					defaultdb.public.table1@table1_col1_7_col1_3_col1_17_col1_12_col1_2_col1_9_col1_15_idx AS tab_42923
					JOIN defaultdb.public.table1@[0] AS tab_42924
						JOIN defaultdb.public.table1@table1_col1_12_col1_0_col1_17_expr_col1_8_col1_11_col1_4_col1_7_col1_1_expr1_col1_16_col1_10_col1_14_col1_13_col1_3_idx
								AS tab_42927
							LEFT JOIN defaultdb.public.table3@[0] AS tab_42928 ON tab_42921.col1_7
							JOIN defaultdb.public.table3@table3_col3_9_col3_3_idx AS tab_42929 ON
									(tab_42927.col1_9) = (tab_42929.col3_2) ON
								(tab_42924.col1_17) = (tab_42927.col1_15)
								AND (tab_42924.col1_12) = (tab_42929.col3_9)
								AND (tab_42924.col1_14) = (tab_42928.col3_9)
								AND (tab_42924.col1_14) = (tab_42929.col3_9)
								AND (tab_42924.col1_11) = (tab_42927.col1_17)
								AND (tab_42924.col1_11) = (tab_42927.col1_16)
								AND (tab_42924.col1_15) = (tab_42929.col3_9)
								AND (tab_42924.col1_5) = (tab_42929.crdb_internal_mvcc_timestamp) ON
							(tab_42923.col1_12) = (tab_42927.col1_16),
					defaultdb.public.table1@table1_col1_6_idx AS tab_42930
				WHERE
					tab_42924.col1_7
				LIMIT
					1:::INT8
			)
				AS col_94157
		FROM
			defaultdb.public.table1@table1_col1_1_col1_0_key AS tab_42921, defaultdb.public.table2@[0] AS tab_42922
		LIMIT
			42:::INT8;
Help

See: roachtest README

See: How To Investigate (internal)

/cc @cockroachdb/sql-queries

This test on roachdash | Improve this report!

Jira issue: CRDB-15462

@cockroach-teamcity cockroach-teamcity added deprecated-branch-release-22.1.0 C-test-failure Broken test (automatically or manually discovered). O-roachtest O-robot Originated from a bot. release-blocker Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked. labels May 3, 2022
@blathers-crl blathers-crl bot added the T-sql-queries SQL Queries Team label May 3, 2022
@rytaft
Copy link
Collaborator

rytaft commented May 3, 2022

Easy to reproduce:

SET CLUSTER SETTING sql.stats.automatic_collection.enabled = false;

SET CLUSTER SETTING sql.stats.histogram_collection.enabled = false;

CREATE TABLE table1 (col1_0 FLOAT4 NOT NULL, col1_1 REGPROCEDURE NOT NULL, col1_2 TIMESTAMPTZ NOT NULL, col1_3 DATE NOT NULL, col1_4 INT4 NOT NULL, col1_5 DECIMAL NOT NULL, col1_6 BIT(32) NOT NULL, col1_7 BOOL, col1_8 INET, col1_9 OID NOT NULL, col1_10 TIMESTAMPTZ NOT NULL, col1_11 STRING NULL AS (CASE WHEN col1_3 IS NULL THEN '':::STRING ELSE e'hZK\x1bO^[':::STRING END) STORED, col1_12 STRING NOT NULL AS (lower(CAST(col1_8 AS STRING))) STORED, col1_13 STRING NOT NULL AS (CASE WHEN col1_2 IS NULL THEN 'X':::STRING ELSE e'\x03!D.v\x10\x14c':::STRING END) STORED, col1_14 STRING NOT NULL AS (CASE WHEN col1_1 IS NULL THEN '':::STRING ELSE e'\x0453\x13\x1fJ`f':::STRING END) STORED, col1_15 STRING NOT NULL AS (CASE WHEN col1_2 IS NULL THEN e'\x07~\x07\x17R\x16-':::STRING ELSE e'=F;r\x17q':::STRING END) STORED, col1_16 STRING NOT NULL AS (lower(CAST(col1_9 AS STRING))) STORED, col1_17 STRING NOT NULL AS (CASE WHEN col1_3 IS NULL THEN e'z\'H':::STRING ELSE NULL END) STORED, PRIMARY KEY (col1_9, col1_5 DESC, col1_12, col1_4, col1_10 DESC, col1_17 ASC, col1_3 ASC, col1_13 DESC, col1_16 ASC, col1_14 DESC, col1_0 DESC, col1_1, col1_2, col1_6 ASC, col1_15 DESC), INDEX (col1_12 DESC, col1_0, col1_17 ASC, (col1_0 + (-0.06266672164201736):::FLOAT8) DESC, col1_8, col1_11 DESC, col1_4 ASC, col1_7, col1_1 ASC, (col1_4 + 1144838197:::INT8) DESC, col1_16, col1_10, col1_14, col1_13 DESC, col1_3 ASC), INDEX (col1_6 ASC), INDEX (col1_7 DESC, col1_3, col1_17, col1_12, col1_2, col1_9 ASC, col1_15 DESC) WHERE (((((((((((table1.col1_10 < '294276-12-31 23:59:59.999999+00:00':::TIMESTAMPTZ) AND (table1.col1_3 != 'infinity':::DATE)) AND (table1.col1_12 < e'\x00':::STRING)) AND (NOT table1.col1_7)) AND (table1.col1_5 <= (-1):::DECIMAL)) AND (table1.col1_15 <= '':::STRING)) OR (table1.col1_0 <= 1.0:::FLOAT8)) OR (table1.col1_16 <= '':::STRING)) OR (table1.col1_14 < '':::STRING)) AND (table1.col1_17 < '':::STRING)) OR (table1.col1_13 < e'\U00002603':::STRING)) OR (table1.col1_2 = '3000-01-01 00:00:00+00:00':::TIMESTAMPTZ), INDEX (col1_13 DESC, col1_6 DESC, col1_8 ASC, col1_3 ASC, lower(CAST(col1_8 AS STRING)), col1_2 DESC, col1_9 ASC, col1_1 DESC, col1_7, col1_12 DESC, col1_16 DESC, col1_5 ASC), INDEX (col1_10, col1_9 DESC, col1_7 ASC), FAMILY (col1_0), FAMILY (col1_5, col1_14, col1_7), FAMILY (col1_8, col1_4, col1_2), FAMILY (col1_13, col1_3), FAMILY (col1_10), FAMILY (col1_11, col1_1, col1_6), FAMILY (col1_9), FAMILY (col1_16), UNIQUE (col1_1, col1_0));

CREATE TABLE table2 (col2_0 BIT(4) NOT NULL, col2_1 BIT(2) NOT NULL, col2_2 NAME NOT NULL, col2_3 TIMESTAMPTZ NOT NULL, col2_4 REGPROCEDURE NOT NULL, col2_5 BYTES NOT NULL, col2_6 INT2 NOT NULL, col2_7 BOOL NOT NULL, col2_8 BIT(5) NOT NULL, col2_9 DECIMAL NOT NULL, col2_10 CHAR NOT NULL, col2_11 DECIMAL NOT NULL, col2_12 INTERVAL NULL, col2_13 TIMETZ NOT NULL, col2_14 TIMETZ NOT NULL, col2_15 REGPROCEDURE NOT NULL, col2_16 STRING NOT NULL AS (CASE WHEN col2_15 IS NULL THEN NULL ELSE 'y':::STRING END) STORED, PRIMARY KEY (col2_7, col2_9 DESC, col2_10, col2_6 DESC, col2_13 ASC, col2_11 ASC, col2_16 ASC, col2_8 ASC, col2_14 DESC, col2_0, col2_1, col2_3 DESC, col2_5 DESC, col2_15, col2_4 ASC, col2_2));

CREATE TABLE table3 (col3_0 REGTYPE NOT NULL, col3_1 OID, col3_2 OID NOT NULL, col3_3 REGPROC, col3_4 FLOAT8 NOT NULL, col3_5 REGPROC NOT NULL, col3_6 VARCHAR NOT NULL, col3_7 TIMETZ NOT NULL, col3_8 FLOAT8 NOT NULL, col3_9 STRING NOT NULL AS (lower(CAST(col3_2 AS STRING))) STORED, col3_10 FLOAT8 AS (col3_8 + col3_4) STORED, PRIMARY KEY (col3_6 ASC, col3_8 DESC, col3_7, col3_5 ASC), INDEX (col3_2 DESC, col3_4 DESC, col3_7, col3_1 DESC, col3_0, col3_9, col3_8 ASC), INDEX (col3_9 DESC, col3_3) STORING (col3_0, col3_2, col3_10) WHERE (((((table3.col3_10 < 'NaN':::FLOAT8) AND (table3.col3_9 = e'\x00':::STRING)) OR (table3.col3_8 < (-1.0):::FLOAT8)) AND (table3.col3_6 >= e'\U00002603':::STRING)) AND (table3.col3_4 > 'NaN':::FLOAT8)) OR (table3.col3_7 < '00:00:00+15:59:00':::TIMETZ), INDEX (col3_10, col3_9, col3_4 ASC, col3_5) STORING (col3_1, col3_2), INDEX (col3_9 DESC, col3_10, (col3_8 + col3_4) ASC) STORING (col3_0, col3_4), FAMILY (col3_6, col3_8, col3_0, col3_4, col3_7, col3_2, col3_5, col3_3, col3_10, col3_1), FAMILY (col3_9));

ALTER TABLE table1 INJECT STATISTICS e'[{"avg_size": 0, "columns": ["col1_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 21, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 30}, {"avg_size": 0, "columns": ["col1_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 26, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 30}, {"avg_size": 0, "columns": ["col1_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 26, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 30}, {"avg_size": 0, "columns": ["col1_15"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 22, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 30}, {"avg_size": 0, "columns": ["col1_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 28, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 30}, {"avg_size": 0, "columns": ["col1_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 26, "histo_col_type": "", "name": "__auto__", "null_count": 27, "row_count": 30}, {"avg_size": 0, "columns": ["col1_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 15, "histo_buckets": [{"distinct_range": 0, "num_eq": 4000000000, "num_range": 0, "upper_bound": "698555237"}, {"distinct_range": 0, "num_eq": 5664683552581130428, "num_range": 5075576007662290245, "upper_bound": "2082751606"}, {"distinct_range": 7735627765893414000, "num_eq": 3193084623874321720, "num_range": 7735627765893413882, "upper_bound": "2466394288"}], "histo_col_type": "OID", "name": "__auto__", "null_count": 0, "row_count": 30}, {"avg_size": 0, "columns": ["col1_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5, "histo_buckets": [{"distinct_range": 0, "num_eq": 81906038034728319, "num_range": 0, "upper_bound": "\\u0016*\\u0004);`:|"}, {"distinct_range": 2053823304698898200, "num_eq": 100, "num_range": 4147253200120129787, "upper_bound": "$"}, {"distinct_range": 9000000, "num_eq": 7446044570923608843, "num_range": 9000000, "upper_bound": "\'7M\\u0014+7;"}, {"distinct_range": 0, "num_eq": 2000000, "num_range": 80000, "upper_bound": ",TP"}, {"distinct_range": 6236899.33220916, "num_eq": 300000000, "num_range": 8000000, "upper_bound": "Sh"}, {"distinct_range": 8121470825133471000, "num_eq": 4000000000, "num_range": 8121470825133470408, "upper_bound": "ha;\\u0018g\\u000c\\u00155\\u0012"}], "histo_col_type": "STRING", "name": "__auto__", "null_count": 0, "row_count": 30}, {"avg_size": 0, "columns": ["col1_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 12, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 30}, {"avg_size": 0, "columns": ["col1_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 10, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 30}, {"avg_size": 0, "columns": ["col1_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 30}, {"avg_size": 0, "columns": ["col1_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 9, "histo_col_type": "", "name": "__auto__", "null_count": 28, "row_count": 30}, {"avg_size": 0, "columns": ["col1_13"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 8, "histo_buckets": [{"distinct_range": 0, "num_eq": 6172920688512512885, "num_range": 0, "upper_bound": "\\u0002\\u001d\\u000e)D"}, {"distinct_range": 50000, "num_eq": 30, "num_range": 50000, "upper_bound": "\\u000eUu_Q\\u0005"}, {"distinct_range": 1421.8543917074435, "num_eq": 1000000, "num_range": 2000, "upper_bound": "\\u001fdb=\\u00197n\\u001e"}, {"distinct_range": 557427705.701562, "num_eq": 8000000000, "num_range": 700000000, "upper_bound": "G\\u0013"}, {"distinct_range": 0, "num_eq": 20000000, "num_range": 5000000, "upper_bound": "H7PXk+c^"}, {"distinct_range": 1226843315401817900, "num_eq": 40, "num_range": 1226843315401817869, "upper_bound": "O_"}, {"distinct_range": 1500784641798984000, "num_eq": 100, "num_range": 3909495484155349261, "upper_bound": "`RltVM\\u0010\\u0013"}, {"distinct_range": 0, "num_eq": 4619133940884127471, "num_range": 8000000000, "upper_bound": "r@:V\\u0004"}, {"distinct_range": 6665309861189473000, "num_eq": 7564944921790832510, "num_range": 6665309861189473666, "upper_bound": "vS\\u001c9"}], "histo_col_type": "STRING", "name": "__auto__", "null_count": 0, "row_count": 30}, {"avg_size": 0, "columns": ["col1_17"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 27, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 30}, {"avg_size": 0, "columns": ["col1_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 29, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 30}, {"avg_size": 0, "columns": ["col1_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 16, "histo_buckets": [{"distinct_range": 0, "num_eq": 10000000, "num_range": 0, "upper_bound": "false"}], "histo_col_type": "BOOL", "name": "__auto__", "null_count": 19, "row_count": 30}, {"avg_size": 0, "columns": ["col1_14"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 16, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 30}, {"avg_size": 0, "columns": ["col1_16"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 19, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 30}]':::JSONB;

ALTER TABLE table2 INJECT STATISTICS '[{"avg_size": 0, "columns": ["col2_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 14937119217, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 90000000000}, {"avg_size": 0, "columns": ["col2_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 44207601440, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 90000000000}, {"avg_size": 0, "columns": ["col2_12"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 45863621620, "histo_col_type": "", "name": "__auto__", "null_count": 13498010206, "row_count": 90000000000}, {"avg_size": 0, "columns": ["col2_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 48495620788, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 90000000000}, {"avg_size": 0, "columns": ["col2_11"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 24291471279, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 90000000000}, {"avg_size": 0, "columns": ["col2_16"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 76614284621, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 90000000000}, {"avg_size": 0, "columns": ["col2_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 6870062249, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 90000000000}, {"avg_size": 0, "columns": ["col2_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 66399440172, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 90000000000}, {"avg_size": 0, "columns": ["col2_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 18842511864, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 90000000000}, {"avg_size": 0, "columns": ["col2_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 54853529024, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 90000000000}, {"avg_size": 0, "columns": ["col2_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 33299872489, "histo_buckets": [{"distinct_range": 0, "num_eq": 60000000, "num_range": 0, "upper_bound": "false"}], "histo_col_type": "BOOL", "name": "__auto__", "null_count": 0, "row_count": 90000000000}, {"avg_size": 0, "columns": ["col2_14"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 62371990550, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 90000000000}, {"avg_size": 0, "columns": ["col2_13"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 5853701262, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 90000000000}, {"avg_size": 0, "columns": ["col2_15"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 65278462138, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 90000000000}, {"avg_size": 0, "columns": ["col2_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 21294084778, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 90000000000}, {"avg_size": 0, "columns": ["col2_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 33548143071, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 90000000000}, {"avg_size": 0, "columns": ["col2_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 68195622380, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 90000000000}]':::JSONB;

ALTER TABLE table3 INJECT STATISTICS e'[{"avg_size": 0, "columns": ["col3_1"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1342807526821686535, "histo_col_type": "", "name": "__auto__", "null_count": 1374780994542211496, "row_count": 2172045810930427313}, {"avg_size": 0, "columns": ["col3_7"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1847739317000583546, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2172045810930427313}, {"avg_size": 0, "columns": ["col3_8"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1834445851343151255, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2172045810930427313}, {"avg_size": 0, "columns": ["col3_0"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1684277431165386547, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2172045810930427313}, {"avg_size": 0, "columns": ["col3_3"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1343287149148037541, "histo_col_type": "", "name": "__auto__", "null_count": 1043388332176112492, "row_count": 2172045810930427313}, {"avg_size": 0, "columns": ["col3_4"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 337125873951572053, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2172045810930427313}, {"avg_size": 0, "columns": ["col3_5"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1552684186434088268, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2172045810930427313}, {"avg_size": 0, "columns": ["col3_6"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 2006759886567553396, "histo_buckets": [{"distinct_range": 0, "num_eq": 1386725969701311156, "num_range": 0, "upper_bound": "\\u00063c"}, {"distinct_range": 0, "num_eq": 5163122520823701877, "num_range": 4541766258284168605, "upper_bound": "\\niYbMR"}, {"distinct_range": 1000, "num_eq": 0, "num_range": 1000, "upper_bound": "#4btX"}, {"distinct_range": 7393252133399174000, "num_eq": 2488435006860799697, "num_range": 7393252133399174407, "upper_bound": "+\\r\\u0003Rz13\\u001d!"}, {"distinct_range": 1327.4213019796855, "num_eq": 1698883756131799413, "num_range": 3000, "upper_bound": "=I\\u000c \\\\;:"}, {"distinct_range": 620223683445856500, "num_eq": 3560652986056327919, "num_range": 620223683445856572, "upper_bound": "K\\r\\u001a6[3\x7ft`"}, {"distinct_range": 705298817414288800, "num_eq": 70000, "num_range": 5065377375799445122, "upper_bound": "v{h[\\u0005\'z\\no"}, {"distinct_range": 2695984664551991300, "num_eq": 900, "num_range": 4222487048422082149, "upper_bound": "\x7fW"}, {"distinct_range": 0, "num_eq": 70000000000, "num_range": 4448180204405940190, "upper_bound": "\U00002603"}], "histo_col_type": "VARCHAR", "name": "__auto__", "null_count": 0, "row_count": 2172045810930427313}, {"avg_size": 0, "columns": ["col3_9"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1058714506709365993, "histo_col_type": "STRING", "name": "__auto__", "null_count": 0, "row_count": 2172045810930427313}, {"avg_size": 0, "columns": ["col3_10"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 686782401876008314, "histo_col_type": "", "name": "__auto__", "null_count": 918423699740562777, "row_count": 2172045810930427313}, {"avg_size": 0, "columns": ["col3_2"], "created_at": "2000-01-01 00:00:00+00:00", "distinct_count": 1513611251042087296, "histo_col_type": "", "name": "__auto__", "null_count": 0, "row_count": 2172045810930427313}]':::JSONB;

ALTER TABLE table3 ADD FOREIGN KEY (col3_2, col3_8) REFERENCES table1 (col1_1, col1_0) ON DELETE CASCADE ON UPDATE CASCADE;

CREATE TYPE rand_typ_0 AS ENUM ('rp', 'nys');

SET statement_timeout='1m0s';

SELECT
			tab_42922.col2_6 AS col_94144,
			tab_42922.col2_13 AS col_94145,
			NULL AS col_94146,
			tab_42921.col1_11 AS col_94147,
			postgis_wagyu_version()::STRING AS col_94148,
			'218.76.152.122/9':::INET AS col_94149,
			tab_42921.col1_3 AS col_94150,
			tab_42921.col1_2 AS col_94151,
			tab_42921.col1_6 AS col_94152,
			e'\\G':::STRING AS col_94153,
			tab_42921.tableoid AS col_94154,
			tab_42921.tableoid AS col_94155,
			(
				SELECT
					B'10' AS col_94156
				FROM
					defaultdb.public.table1@table1_col1_7_col1_3_col1_17_col1_12_col1_2_col1_9_col1_15_idx AS tab_42923
					JOIN defaultdb.public.table1@[0] AS tab_42924
						JOIN defaultdb.public.table1@table1_col1_12_col1_0_col1_17_expr_col1_8_col1_11_col1_4_col1_7_col1_1_expr1_col1_16_col1_10_col1_14_col1_13_col1_3_idx
								AS tab_42927
							LEFT JOIN defaultdb.public.table3@[0] AS tab_42928 ON tab_42921.col1_7
							JOIN defaultdb.public.table3@table3_col3_9_col3_3_idx AS tab_42929 ON
									(tab_42927.col1_9) = (tab_42929.col3_2) ON
								(tab_42924.col1_17) = (tab_42927.col1_15)
								AND (tab_42924.col1_12) = (tab_42929.col3_9)
								AND (tab_42924.col1_14) = (tab_42928.col3_9)
								AND (tab_42924.col1_14) = (tab_42929.col3_9)
								AND (tab_42924.col1_11) = (tab_42927.col1_17)
								AND (tab_42924.col1_11) = (tab_42927.col1_16)
								AND (tab_42924.col1_15) = (tab_42929.col3_9)
								AND (tab_42924.col1_5) = (tab_42929.crdb_internal_mvcc_timestamp) ON
							(tab_42923.col1_12) = (tab_42927.col1_16),
					defaultdb.public.table1@table1_col1_6_idx AS tab_42930
				WHERE
					tab_42924.col1_7
				LIMIT
					1:::INT8
			)
				AS col_94157
		FROM
			defaultdb.public.table1@table1_col1_1_col1_0_key AS tab_42921, defaultdb.public.table2@[0] AS tab_42922
		LIMIT
			42:::INT8;

On 22.1, it produces the internal error internal error: memo group optimization passes surpassed limit of 100000. On 21.2 it causes a stack overflow, so this behavior is already much improved. Removing the release-blocker label.

@rytaft rytaft removed the release-blocker Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked. label May 3, 2022
@rytaft rytaft changed the title roachtest: sqlsmith/setup=rand-tables/setting=no-ddl failed opt: internal error: memo group optimization passes surpassed limit of 100000 May 3, 2022
@mgartner
Copy link
Collaborator

mgartner commented May 6, 2022

Here's a reduced reproduction:

CREATE TABLE table1 (
  col1_5  DECIMAL,
  col1_7  BOOL,
  col1_9  OID,
  col1_11 STRING,
  col1_12 STRING,
  col1_14 STRING,
  col1_15 STRING,
  col1_16 STRING,
  col1_17 STRING
);

CREATE TABLE table3 (col3_2 OID, col3_4 FLOAT8, col3_9 STRING);

SELECT (
  SELECT NULL
  FROM table1 AS tab_42924
  JOIN table1 AS tab_42927
    LEFT JOIN table3 AS tab_42928 ON tab_42921.col1_7
  JOIN table3 AS tab_42929
  ON tab_42927.col1_9 = tab_42929.col3_2
  ON tab_42924.col1_17 = tab_42927.col1_15
    AND tab_42924.col1_12 = tab_42929.col3_9
    AND tab_42924.col1_14 = tab_42928.col3_9
    AND tab_42924.col1_14 = tab_42929.col3_9
    AND tab_42924.col1_11 = tab_42927.col1_17
    AND tab_42924.col1_11 = tab_42927.col1_16
    AND tab_42924.col1_15 = tab_42929.col3_9
    AND tab_42924.col1_5 = tab_42929.crdb_internal_mvcc_timestamp
)
  FROM table1 AS tab_42921;
And here's what the memo looks like (click to expand)
memo (not optimized, ~60KB, required=[presentation: ?column?:50] [distribution: test])
 ├── G1: (project G2 G3)
 │    └── []
 │         ├── best: (project G2 G3)
 │         └── cost: 13545.98
 ├── G2: (ensure-distinct-on G4 G5 cols=(10)) (ensure-distinct-on G4 G5 cols=(10),ordering=+10)
 │    └── []
 │         ├── best: (ensure-distinct-on G4 G5 cols=(10))
 │         └── cost: 11808.47
 ├── G3: (projections G6)
 ├── G4: (left-join-apply G7 G8 G9)
 │    ├── [ordering: +10]
 │    │    ├── best: (sort G4)
 │    │    └── cost: 41183.62
 │    └── []
 │         ├── best: (left-join-apply G7 G8 G9)
 │         └── cost: 7155.07
 ├── G5: (aggregations G10)
 ├── G6: (variable "?column?")
 ├── G7: (scan table1 [as=tab_42921],cols=(2,10))
 │    ├── [distribution: test]
 │    │    ├── best: (scan table1 [as=tab_42921],cols=(2,10))
 │    │    └── cost: 1266.42
 │    └── []
 │         ├── best: (scan table1 [as=tab_42921],cols=(2,10))
 │         └── cost: 1266.42
 ├── G8: (project G11 G12)
 │    └── []
 │         ├── best: (project G11 G12)
 │         └── cost: 5005.86
 ├── G9: (filters)
 ├── G10: (const-agg G6)
 ├── G11: (inner-join G13 G14 G15) (inner-join G14 G13 G15) (select G16 G17) (inner-join G18 G19 G20) (inner-join G19 G18 G20) (inner-join G21 G22 G23) (inner-join G22 G21 G23)
 │    └── []
 │         ├── best: (select G16 G17)
 │         └── cost: 5004.10
 ├── G12: (projections G24)
 ├── G13: (scan table1 [as=tab_42924],cols=(13,16-19,21))
 │    ├── [distribution: test]
 │    │    ├── best: (scan table1 [as=tab_42924],cols=(13,16-19,21))
 │    │    └── cost: 1347.22
 │    └── []
 │         ├── best: (scan table1 [as=tab_42924],cols=(13,16-19,21))
 │         └── cost: 1347.22
 ├── G14: (inner-join G18 G22 G25) (left-join G26 G27 G28) (inner-join G22 G18 G25) (right-join G27 G26 G28) (select G14 G29) (inner-join G22 G18 G30)
 │    └── []
 │         ├── best: (left-join G26 G27 G28)
 │         └── cost: 101875.63
 ├── G15: (filters G31 G32 G33 G34 G35 G36 G37 G38)
 ├── G16: (left-join G39 G27 G28) (right-join G27 G39 G28)
 │    └── []
 │         ├── best: (right-join G27 G39 G28)
 │         └── cost: 5003.20
 ├── G17: (filters G33)
 ├── G18: (left-join G40 G27 G28) (right-join G27 G40 G28)
 │    ├── [distribution: test]
 │    │    ├── best: (left-join G40="[distribution: test]" G27="[distribution: test]" G28)
 │    │    └── cost: 12462.02
 │    └── []
 │         ├── best: (left-join G40 G27 G28)
 │         └── cost: 12462.02
 ├── G19: (inner-join G13 G22 G41) (inner-join G22 G13 G41)
 │    └── []
 │         ├── best: (inner-join G13 G22 G41)
 │         └── cost: 2543.77
 ├── G20: (filters G42 G31 G33 G35 G36)
 ├── G21: (inner-join G13 G18 G43) (inner-join G18 G13 G43) (select G44 G45)
 │    └── []
 │         ├── best: (select G44 G45)
 │         └── cost: 5726.41
 ├── G22: (scan table3 [as=tab_42929],cols=(43,45,47))
 │    ├── [distribution: test]
 │    │    ├── best: (scan table3 [as=tab_42929],cols=(43,45,47))
 │    │    └── cost: 1165.42
 │    └── []
 │         ├── best: (scan table3 [as=tab_42929],cols=(43,45,47))
 │         └── cost: 1165.42
 ├── G23: (filters G42 G32 G38)
 ├── G24: (null)
 ├── G25: (filters G42)
 ├── G26: (inner-join G40 G22 G25) (inner-join G22 G40 G25)
 │    ├── [distribution: test]
 │    │    ├── best: (inner-join G40="[distribution: test]" G22="[distribution: test]" G25)
 │    │    └── cost: 2600.42
 │    └── []
 │         ├── best: (inner-join G40 G22 G25)
 │         └── cost: 2600.42
 ├── G27: (scan table3 [as=tab_42928],cols=(39))
 │    ├── [distribution: test]
 │    │    ├── best: (scan table3 [as=tab_42928],cols=(39))
 │    │    └── cost: 1125.02
 │    └── []
 │         ├── best: (scan table3 [as=tab_42928],cols=(39))
 │         └── cost: 1125.02
 ├── G28: (filters G46)
 ├── G29: (filters G47)
 ├── G30: (filters G42 G47)
 ├── G31: (eq G48 G49)
 ├── G32: (eq G50 G51)
 ├── G33: (eq G52 G53)
 ├── G34: (eq G52 G51)
 ├── G35: (eq G54 G55)
 ├── G36: (eq G54 G56)
 ├── G37: (eq G57 G51)
 ├── G38: (eq G58 G59)
 ├── G39: (inner-join G13 G26 G60) (inner-join G26 G13 G60) (inner-join G40 G19 G61) (inner-join G19 G40 G61) (inner-join G62 G22 G63) (inner-join G22 G62 G63)
 │    └── []
 │         ├── best: (inner-join G40 G19 G61)
 │         └── cost: 3864.77
 ├── G40: (scan table1 [as=tab_42927],cols=(27,31-33))
 │    ├── [distribution: test]
 │    │    ├── best: (scan table1 [as=tab_42927],cols=(27,31-33))
 │    │    └── cost: 1306.82
 │    └── []
 │         ├── best: (scan table1 [as=tab_42927],cols=(27,31-33))
 │         └── cost: 1306.82
 ├── G41: (filters G32 G34 G37 G38)
 ├── G42: (eq G64 G65)
 ├── G43: (filters G31 G33 G35 G36 G66 G67)
 ├── G44: (left-join G62 G27 G28) (right-join G27 G62 G28)
 │    └── []
 │         ├── best: (right-join G27 G62 G28)
 │         └── cost: 4775.37
 ├── G45: (filters G33 G66 G67)
 ├── G46: (variable tab_42921.col1_7)
 ├── G47: (eq G53 G51)
 ├── G48: (variable tab_42924.col1_17)
 ├── G49: (variable tab_42927.col1_15)
 ├── G50: (variable tab_42924.col1_12)
 ├── G51: (variable tab_42929.col3_9)
 ├── G52: (variable tab_42924.col1_14)
 ├── G53: (variable tab_42928.col3_9)
 ├── G54: (variable tab_42924.col1_11)
 ├── G55: (variable tab_42927.col1_17)
 ├── G56: (variable tab_42927.col1_16)
 ├── G57: (variable tab_42924.col1_15)
 ├── G58: (variable tab_42924.col1_5)
 ├── G59: (variable tab_42929.crdb_internal_mvcc_timestamp)
 ├── G60: (filters G31 G32 G34 G35 G36 G37 G38)
 ├── G61: (filters G42 G31 G35 G36)
 ├── G62: (inner-join G13 G40 G68) (inner-join G40 G13 G68)
 │    └── []
 │         ├── best: (inner-join G13 G40 G68)
 │         └── cost: 2685.17
 ├── G63: (filters G42 G32 G34 G37 G38)
 ├── G64: (variable tab_42927.col1_9)
 ├── G65: (variable tab_42929.col3_2)
 ├── G66: (eq G50 G53)
 ├── G67: (eq G57 G53)
 └── G68: (filters G31 G35 G36)

The cycle in this memo is a needle in a haystack. Maybe I should write a tool that can automatically find it...

@mgartner
Copy link
Collaborator

mgartner commented May 6, 2022

The cycle is in G14. It points to itself:

G14: (inner-join G18 G22 G25) (left-join G26 G27 G28) (inner-join G22 G18 G25)
    (right-join G27 G26 G28) (select G14 G29) (inner-join G22 G18 G30)

mgartner added a commit to mgartner/cockroach that referenced this issue May 9, 2022
The optimizer will error with "memo group optimization passes surpassed
limit of 100000; there may be a cycle in the memo" when it detects a
potential memo cycle. The error includes the memo in the error details
to aid in debugging. However, it can be hard for a human to find the
cycle in the formatted memo when it contains many groups (see cockroachdb#80901).

This commit updates the formatted memo within the error details to
include the path to the cycle, if one exists. A cycle is not searched
for in other cases where the memo is formatted, to avoid the overhead of
cycle detection.

A simple cycle detection library has been added that the memo formatter
uses to locate a path in a memo to a cycle.

Release note: None
mgartner added a commit to mgartner/cockroach that referenced this issue May 13, 2022
The optimizer will error with "memo group optimization passes surpassed
limit of 100000; there may be a cycle in the memo" when it detects a
potential memo cycle. The error includes the memo in the error details
to aid in debugging. However, it can be hard for a human to find the
cycle in the formatted memo when it contains many groups (see cockroachdb#80901).

This commit updates the formatted memo within the error details to
include the path to the cycle, if one exists. A cycle is not searched
for in other cases where the memo is formatted, to avoid the overhead of
cycle detection.

A simple cycle detection library has been added that the memo formatter
uses to locate a path in a memo to a cycle.

Release note: None
@jlinder jlinder added sync-me and removed sync-me labels May 20, 2022
mgartner added a commit to mgartner/cockroach that referenced this issue May 24, 2022
The optimizer will error with "memo group optimization passes surpassed
limit of 100000; there may be a cycle in the memo" when it detects a
potential memo cycle. The error includes the memo in the error details
to aid in debugging. However, it can be hard for a human to find the
cycle in the formatted memo when it contains many groups (see cockroachdb#80901).

This commit updates the formatted memo within the error details to
include the path to the cycle, if one exists. A cycle is not searched
for in other cases where the memo is formatted, to avoid the overhead of
cycle detection.

A simple cycle detection library has been added that the memo formatter
uses to locate a path in a memo to a cycle.

Release note: None
mgartner added a commit to mgartner/cockroach that referenced this issue May 24, 2022
The optimizer will error with "memo group optimization passes surpassed
limit of 100000; there may be a cycle in the memo" when it detects a
potential memo cycle. The error includes the memo in the error details
to aid in debugging. However, it can be hard for a human to find the
cycle in the formatted memo when it contains many groups (see cockroachdb#80901).

This commit updates the formatted memo within the error details to
include the path to the cycle, if one exists. A cycle is not searched
for in other cases where the memo is formatted, to avoid the overhead of
cycle detection.

A simple cycle detection library has been added that the memo formatter
uses to locate a path in a memo to a cycle.

Release note: None
craig bot pushed a commit that referenced this issue May 24, 2022
80580: rfcs: rbac extensions and system privileges r=RichardJCai a=RichardJCai

Release note: None

81121: opt: display memo cycle when potential cycle is detected r=mgartner a=mgartner

#### opt: print error details in `expropt` test directive

Error details are now printed in the output of the `expropt` optimizer
test directive. This is helpful for seeing the formatted memo that is
included in the detail of the error that occurs when a memo cycle is
detected.

Release note: None

#### opt: display memo cycle when potential cycle is detected

The optimizer will error with "memo group optimization passes surpassed
limit of 100000; there may be a cycle in the memo" when it detects a
potential memo cycle. The error includes the memo in the error details
to aid in debugging. However, it can be hard for a human to find the
cycle in the formatted memo when it contains many groups (see #80901).

This commit updates the formatted memo within the error details to
include the path to the cycle, if one exists. A cycle is not searched
for in other cases where the memo is formatted, to avoid the overhead of
cycle detection.

A simple cycle detection library has been added that the memo formatter
uses to locate a path in a memo to a cycle.

Release note: None


81767: kv: don't consider skipped snapshots to be "processed" by queues r=nvanbenschoten a=nvanbenschoten

In a support issue, we saw a very high rate of successful raftsnapshot
queue process attempts. This was confusing, as the rate of snapshots
sent was much lower. It turns out that this was because most snapshots
were being skipped on the "replica is likely in the process of being
added" path.

To avoid this confusion in the future, we no longer return `true` as the
value for `processed` from `raftSnapshotQueue.process` method in these
cases.

81783: cast: set volatility of casts to/from TEXT and NAME to leak-proof r=mgartner a=mgartner

In Postgres 14, some casts which were previously immutable and not
leak-proof are now leak-proof. This commit updates the volatility of
casts to and from TEXT and NAME to leak-proof to match Postgres. This
should aid the optimizer in decorrelating more subqueries. This is not
backward incompatible because it is less restrictive and should not
change the behavior of any users' existing queries.

There are many other casts that can be changed to leak-proof, but our
implementations of those casts need to be audited to ensure that they
cannot err (one of the requirements for leak-proof). I leave this as
future work.

We must also take care with assignment casts, which currently use the
same volatility as a normal cast. Some casts which cannot err and are
leak-proof can err as an assignment cast, so the assignment cast cannot
be leak-proof. For example, a cast like `'foo'::VARCHAR(1)` does not
err, but an assignment cast with the same inputs will err because the
value does not fit into the target type's width. To handle cases like
this, we may need to label each cast with two volatilities, one for
regular casts and one for assignment casts.

Release note: None

Co-authored-by: richardjcai <[email protected]>
Co-authored-by: Marcus Gartner <[email protected]>
Co-authored-by: Nathan VanBenschoten <[email protected]>
@DrewKimball
Copy link
Collaborator

This one's a bug in the JoinOrderBuilder, so I can take it.

DrewKimball added a commit to DrewKimball/cockroach that referenced this issue Jul 6, 2022
In some rare cases when null-rejection rules fail to fire, a redundant filter
can be inferred in an `InnerJoin` - `LeftJoin` complex. This could previously
result in the `JoinOrderBuilder` attempting to add a `Select` to the same memo
group as its input, which would create a memo cycle. This patch prevents the
`JoinOrderBuilder` from adding the `Select` to the memo in such cases.

What follows is a more detailed explanation of the conditions that could
previously cause a memo cycle.

`InnerJoin` operators have two properties that make them more 'reorderable'
than other types of joins: (1) their conjuncts can be reordered separately
and (2) new conjuncts can be inferred from equalities. As a special case of
(1), an `InnerJoin` can be pushed into the left side of a `LeftJoin`, leaving
behind any `Select` conjuncts that reference the right side of the `LeftJoin`.

This allows the `JoinOrderBuilder` to make the following transformation:
```
(InnerJoin
   A
   (InnerJoin
      B
      (LeftJoin
         C
         D
         c=d
      )
      b=c
   )
   a=b, a=d
)
=>
(InnerJoin
   A
   (Select
      (LeftJoin
         (InnerJoin
            B
            C
            b=c
         )
         D
         c=d
      )
      b=d // Inferred filter!
   )
   a=b, a=d
)
```
Note the new `b=d` filter that was inferred and subsequently left on
a `Select` operator after the reordering. The crucial point is that
this filter is redundant - the input to the `Select` is already a
valid reordering of the `BCD` join complex.

The `JoinOrderBuilder` avoids adding redundant filters to `InnerJoin`
operators, but does not do the same for the `Select` case because it
was assumed that the filters left on the `Select` would never be redundant.
This is because the `a=d` filter *should* rejects nulls, so the `LeftJoin`
should have been simplified. However, in rare cases null-rejection does not
take place. Because the input to the `Select` is already a valid reordering,
the `JoinOrderBuilder` ends up trying to add the `Select` to the same group
as its input - namely, the `BCD` join group. This causes a cycle in the memo.

Fixes cockroachdb#80901

Release note (bug fix): Fixed a bug that could cause an optimizer
panic in rare cases when a query had a left join in the input of
an inner join.
@mgartner mgartner assigned DrewKimball and unassigned mgartner Jul 6, 2022
craig bot pushed a commit that referenced this issue Jul 7, 2022
83875: opt: fix memo cycle caused by join ordering r=DrewKimball a=DrewKimball

In some rare cases when null-rejection rules fail to fire, a redundant filter
can be inferred in an `InnerJoin` - `LeftJoin` complex. This could previously
result in the `JoinOrderBuilder` attempting to add a `Select` to the same memo
group as its input, which would create a memo cycle. This patch prevents the
`JoinOrderBuilder` from adding the `Select` to the memo in such cases.

What follows is a more detailed explanation of the conditions that could
previously cause a memo cycle.

`InnerJoin` operators have two properties that make them more 'reorderable'
than other types of joins: (1) their conjuncts can be reordered separately
and (2) new conjuncts can be inferred from equalities. As a special case of
(1), an `InnerJoin` can be pushed into the left side of a `LeftJoin`, leaving
behind any `Select` conjuncts that reference the right side of the `LeftJoin`.

This allows the `JoinOrderBuilder` to make the following transformation:
```
(InnerJoin
   A
   (InnerJoin
      B
      (LeftJoin
         C
         D
         c=d
      )
      b=c
   )
   a=b, a=d
)
=>
(InnerJoin
   A
   (Select
      (LeftJoin
         (InnerJoin
            B
            C
            b=c
         )
         D
         c=d
      )
      b=d // Inferred filter!
   )
   a=b, a=d
)
```
Note the new `b=d` filter that was inferred and subsequently left on
a `Select` operator after the reordering. The crucial point is that
this filter is redundant - the input to the `Select` is already a
valid reordering of the `BCD` join complex.

The `JoinOrderBuilder` avoids adding redundant filters to `InnerJoin`
operators, but does not do the same for the `Select` case because it
was assumed that the filters left on the `Select` would never be redundant.
This is because the `a=d` filter *should* rejects nulls, so the `LeftJoin`
should have been simplified. However, in rare cases null-rejection does not
take place. Because the input to the `Select` is already a valid reordering,
the `JoinOrderBuilder` ends up trying to add the `Select` to the same group
as its input - namely, the `BCD` join group. This causes a cycle in the memo.

Fixes #80901

Release note (bug fix): Fixed a bug that could cause an optimizer
panic in rare cases when a query had a left join in the input of
an inner join.

83945: storage/metamorphic: Add MVCC delete range using tombstone r=erikgrinaker a=itsbilal

This change adds MVCCDeleteRangeUsingTombstone to the MVCC
metamorphic tests. MVCCDeleteRange had already existed in
this test suite, so this ended up being a relatively simple
addition.

One part of #82545, with possibly more parts to follow
as other MVCC-level operations are added that utilize
`writer.{Put,Clear}{MVCC,Engine}RangeKey`.

Release note: None.

83992: server: log stacks on 500 errors r=ajwerner a=ajwerner

Before this change, we'd just log the error body, which often is not very
helpful. The format specifier makes me think that the intention was to log
the stacks. This made debugging [this](#83677 (comment))
trivial as opposed to hard.

Release note: None

84015: bazel: clear configurations when running `git grep` in `check.sh` r=miretskiy,mari-crl a=rickystewart

The configurations `grep.{column,lineNumber,fullName}` can be set
globally or on a per-user basis and change the output of `git grep`,
which breaks checks that do exact-string matching. We manually clear
these configurations for the `git grep`s in this file to ensure the
output is predictable on any machine.

Release note: None

Co-authored-by: Andrew Kimball <[email protected]>
Co-authored-by: Bilal Akhtar <[email protected]>
Co-authored-by: Andrew Werner <[email protected]>
Co-authored-by: Ricky Stewart <[email protected]>
@craig craig bot closed this as completed in ac77889 Jul 7, 2022
@mgartner mgartner moved this to Done in SQL Queries Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-test-failure Broken test (automatically or manually discovered). deprecated-branch-release-22.1.0 O-roachtest O-robot Originated from a bot. T-sql-queries SQL Queries Team
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants