cockroachdb / cockroachdb/cockroach
basalt-26.3: pkg/sql/sqlstats/sqlstats_test: TestDataDrivenTest failed
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
pkg/sql/sqlstats/sqlstats_test.TestDataDrivenTest [failed](https://mesolite.cluster.engflow.com/invocations/default/759a4d1d-20e2-453c-b574-58d043b8afcb?testReportRun=1&testReportShard=1&testReportAttempt=1#targets-Ly9wa2cvc3FsL3NxbHN0YXRzOnNxbHN0YXRzX3Rlc3Q=) on basalt-26.3 @ [00b50017bbdd3b9a2c1b295df16c2c85c7ce8ab2](https://github.com/cockroachdb/cockroach/commits/00b50017bbdd3b9a2c1b295df16c2c85c7ce8ab2):
```
test_log_scope.go:82: use -show-logs to present logs inline
sqlstats_test.go:99: -- test log scope end --
test logs left over in: outputs.zip/logTestDataDrivenTest4067939168
--- FAIL: TestDataDrivenTest (444.14s)
=== RUN TestDataDrivenTest/plpgsql
test_server_shim.go:168: automatically injected a shared process virtual cluster under test; see comment at top of test_server_shim.go for details.
datadriven.go:357: /mnt/engflow/worker/work/3/exec/bazel-out/k8-fastbuild/bin/pkg/sql/sqlstats/sqlstats_test_/sqlstats_test.runfiles/com_github_cockroachdb_cockroach/pkg/sql/sqlstats/testdata/plpgsql:1: still running after 10.028880099s
sqlstats_test.go:53:
/mnt/engflow/worker/work/3/exec/bazel-out/k8-fastbuild/bin/pkg/sql/sqlstats/sqlstats_test_/sqlstats_test.runfiles/com_github_cockroachdb_cockroach/pkg/sql/sqlstats/testdata/plpgsql:1:
exec-sql db=udf_test app-name=plpgsql
CREATE TABLE IF NOT EXISTS test(a int);
CREATE OR REPLACE PROCEDURE insert_incremental(n INT)
LANGUAGE plpgsql
AS $$
DECLARE
i INT := 0;
next_val INT;
BEGIN
WHILE i < n LOOP
SELECT coalesce(max(a), 0) + 1 INTO next_val FROM test;
INSERT INTO test(a) VALUES (next_val);
i := i + 1;
END LOOP;
END;
$$;
----
datadriven.go:357: /mnt/engflow/worker/work/3/exec/bazel-out/k8-fastbuild/bin/pkg/sql/sqlstats/sqlstats_test_/sqlstats_test.runfiles/com_github_cockroachdb_cockroach/pkg/sql/sqlstats/testdata/plpgsql:19: still running after 10.057551532s
datadriven.go:357: /mnt/engflow/worker/work/3/exec/bazel-out/k8-fastbuild/bin/pkg/sql/sqlstats/sqlstats_test_/sqlstats_test.runfiles/com_github_cockroachdb_cockroach/pkg/sql/sqlstats/testdata/plpgsql:19: still running after 20.069253249s
datadriven.go:357: /mnt/engflow/worker/work/3/exec/bazel-out/k8-fastbuild/bin/pkg/sql/sqlstats/sqlstats_test_/sqlstats_test.runfiles/com_github_cockroachdb_cockroach/pkg/sql/sqlstats/testdata/plpgsql:19: still running after 30.078491734s
datadriven.go:357: /mnt/engflow/worker/work/3/exec/bazel-out/k8-fastbuild/bin/pkg/sql/sqlstats/sqlstats_test_/sqlstats_test.runfiles/com_github_cockroachdb_cockroach/pkg/sql/sqlstats/testdata/plpgsql:19: still running after 40.093417166s
sqlstats_test.go:53:
/mnt/engflow/worker/work/3/exec/bazel-out/k8-fastbuild/bin/pkg/sql/sqlstats/sqlstats_test_/sqlstats_test.runfiles/com_github_cockroachdb_cockroach/pkg/sql/sqlstats/testdata/plpgsql:19:
exec-sql db=udf_test app-name=plpgsql
CALL insert_incremental(5);
----
sqlstats_test.go:53:
/mnt/engflow/worker/work/3/exec/bazel-out/k8-fastbuild/bin/pkg/sql/sqlstats/sqlstats_test_/sqlstats_test.runfiles/com_github_cockroachdb_cockroach/pkg/sql/sqlstats/testdata/plpgsql:23:
show-stats db=udf_test app-name=plpgsql
output didn't match expected:
@@ -1,6 +1,6 @@
{"count": "1", "fingerprint_id": "4057632793bd4769", "nodes": [1], "parse_lat_not_zero": true, "plan_distributed": false, "plan_full_scan": false, "plan_hash_set": true, "plan_lat_not_zero": true, "plan_vectorized": true, "query": "CREATE OR REPLACE PROCEDURE insert_incremental(n INT8)\n\tLANGUAGE plpgsql\n\tAS $$_$$", "run_lat_not_zero": true, "sql_type": "TypeDDL", "summary": "CREATE OR REPLACE PROCEDURE insert_incremental(n INT8)\n\tLANGUAGE plpgsql\n\tAS $$_$$", "svc_lat_not_zero": true, "transaction_fingerprint_id": "ef34de6b15bcf0b6"}
-{"count": "1", "fingerprint_id": "8c317651ff701c49", "nodes": [1], "parse_lat_not_zero": true, "plan_distributed": false, "plan_full_scan": false, "plan_hash_set": true, "plan_lat_not_zero": true, "plan_vectorized": true, "query": "CALL insert_incremental(_)", "run_lat_not_zero": true, "sql_type": "TypeTCL", "summary": "CALL insert_incremental(_)", "svc_lat_not_zero": true, "transaction_fingerprint_id": "2352cb1d7971ab96"}
-{"count": "5", "fingerprint_id": "a457fd0c13d1514f", "nodes": [1], "parse_lat_not_zero": true, "plan_distributed": false, "plan_full_scan": true, "plan_hash_set": true, "plan_lat_not_zero": true, "plan_vectorized": true, "query": "SELECT COALESCE(max(a), _) + _ FROM udf_test.public.test", "run_lat_not_zero": true, "sql_type": "TypeDML", "summary": "SELECT COALESCE(max(a)...)... FROM udf_test.public.test", "svc_lat_not_zero": true, "transaction_fingerprint_id": "2352cb1d7971ab96"}
+{"count": "2", "fingerprint_id": "8c317651ff701c49", "nodes": [1], "parse_lat_not_zero": true, "plan_distributed": false, "plan_full_scan": false, "plan_hash_set": true, "plan_lat_not_zero": true, "plan_vectorized": true, "query": "CALL insert_incremental(_)", "run_lat_not_zero": true, "sql_type": "TypeTCL", "summary": "CALL insert_incremental(_)", "svc_lat_not_zero": true, "transaction_fingerprint_id": "2352cb1d7971ab96"}
+{"count": "10", "fingerprint_id": "a457fd0c13d1514f", "nodes": [1], "parse_lat_not_zero": true, "plan_distributed": false, "plan_full_scan": true, "plan_hash_set": true, "plan_lat_not_zero": true, "plan_vectorized": true, "query": "SELECT COALESCE(max(a), _) + _ FROM udf_test.public.test", "run_lat_not_zero": true, "sql_type": "TypeDML", "summary": "SELECT COALESCE(max(a)...)... FROM udf_test.public.test", "svc_lat_not_zero": true, "transaction_fingerprint_id": "2352cb1d7971ab96"}
{"count": "1", "fingerprint_id": "f17c354bb29f8432", "nodes": [1], "parse_lat_not_zero": true, "plan_distributed": false, "plan_full_scan": false, "plan_hash_set": true, "plan_lat_not_zero": true, "plan_vectorized": true, "query": "CREATE TABLE IF NOT EXISTS test (a INT8)", "run_lat_not_zero": true, "sql_type": "TypeDDL", "summary": "CREATE TABLE IF NOT EXISTS test (a INT8)", "svc_lat_not_zero": true, "transaction_fingerprint_id": "5e1f8807349e33ed"}
-{"count": "5", "fingerprint_id": "f71d046ecfc2a04f", "nodes": [1], "parse_lat_not_zero": true, "plan_distributed": false, "plan_full_scan": false, "plan_hash_set": true, "plan_lat_not_zero": true, "plan_vectorized": true, "query": "INSERT INTO udf_test.public.test(a) VALUES (next_val)", "run_lat_not_zero": true, "sql_type": "TypeDML", "summary": "INSERT INTO udf_test.public.test(a)", "svc_lat_not_zero": true, "transaction_fingerprint_id": "2352cb1d7971ab96"}
+{"count": "10", "fingerprint_id": "f71d046ecfc2a04f", "nodes": [1], "parse_lat_not_zero": true, "plan_distributed": false, "plan_full_scan": false, "plan_hash_set": true, "plan_lat_not_zero": true, "plan_vectorized": true, "query": "INSERT INTO udf_test.public.test(a) VALUES (next_val)", "run_lat_not_zero": true, "sql_type": "TypeDML", "summary": "INSERT INTO udf_test.public.test(a)", "svc_lat_not_zero": true, "transaction_fingerprint_id": "2352cb1d7971ab96"}
--- FAIL: TestDataDrivenTest/plpgsql (93.69s)
```
Parameters:
- attempt=1
- race=true
- run=1
- shard=1
Help
See also: [How To Investigate a Go Test Failure \(internal\)](https://cockroachlabs.atlassian.net/l/c/HgfXfJgM)
/cc @cockroachlabs/obs-prs
[This test on roachdash](https://roachdash.crdb.dev/?filter=status:open%20t:.*TestDataDrivenTest.*&sort=title+created&display=lastcommented+project) | [Improve this report!](https://github.com/cockroachdb/cockroach/tree/master/pkg/cmd/bazci/githubpost/issues)
Jira issue: CRDB-67235
Contributor guide
Research direction
Start with pkg/sql/sqlstats/sqlstats_test.go and the data-driven case in pkg/sql/sqlstats/testdata/plpgsql; reproduce TestDataDrivenTest/plpgsql and inspect the referenced test logs. Determine why the procedure call times out and why the reported SQL statistics counts differ from the expected output, then make the test pass consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, sql
- Domain
- databases, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100