cockroachdb / cockroachdb/cockroach

basalt-26.3: sql/tablemetadatacache: TestDataDrivenTableMetadataCacheUpdater failed

Open
#175,607 0 comments 0 reactions 0 assignees View on GitHub
branch-basalt-26.3 C-test-failure O-robot release-blocker T-observability
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

sql/tablemetadatacache.TestDataDrivenTableMetadataCacheUpdater [failed](https://teamcity.cockroachdb.com/buildConfiguration/Cockroach_Ci_TestsAwsLinuxArm64_UnitTests/21522235?buildTab=log) with [artifacts](https://teamcity.cockroachdb.com/buildConfiguration/Cockroach_Ci_TestsAwsLinuxArm64_UnitTests/21522235?buildTab=artifacts#/) on basalt-26.3 @ [cae870e756f1463717208bb18711995458e753cf](https://github.com/cockroachdb/cockroach/commits/cae870e756f1463717208bb18711995458e753cf):

```
/home/roach/.cache/bazel/_bazel_roach/c5a4e7d36696d9cd970af2045211a7df/sandbox/processwrapper-sandbox/19570/execroot/com_github_cockroachdb_cockroach/bazel-out/aarch64-fastbuild/bin/pkg/sql/tablemetadatacache/tablemetadatacache_test_/tablemetadatacache_test.runfiles/com_github_cockroachdb_cockroach/pkg/sql/tablemetadatacache/testdata/update_table_metadata:104:
query
SELECT sum(replication_size_bytes) > 0 FROM system.table_metadata
----
true
table_metadata_updater_test.go:58:
/home/roach/.cache/bazel/_bazel_roach/c5a4e7d36696d9cd970af2045211a7df/sandbox/processwrapper-sandbox/19570/execroot/com_github_cockroachdb_cockroach/bazel-out/aarch64-fastbuild/bin/pkg/sql/tablemetadatacache/tablemetadatacache_test_/tablemetadatacache_test.runfiles/com_github_cockroachdb_cockroach/pkg/sql/tablemetadatacache/testdata/update_table_metadata:109:
query
SELECT count(*) FROM system.table_metadata WHERE total_live_data_bytes > total_data_bytes
----
0
table_metadata_updater_test.go:58:
/home/roach/.cache/bazel/_bazel_roach/c5a4e7d36696d9cd970af2045211a7df/sandbox/processwrapper-sandbox/19570/execroot/com_github_cockroachdb_cockroach/bazel-out/aarch64-fastbuild/bin/pkg/sql/tablemetadatacache/tablemetadatacache_test_/tablemetadatacache_test.runfiles/com_github_cockroachdb_cockroach/pkg/sql/tablemetadatacache/testdata/update_table_metadata:116:
query
SELECT count(*) FROM system.table_metadata
WHERE table_type IN ('TABLE', 'SEQUENCE', 'MATERIALIZED_VIEW')
AND (details->>'primary_index_id')::INT IS NULL
----
0
table_metadata_updater_test.go:58:
/home/roach/.cache/bazel/_bazel_roach/c5a4e7d36696d9cd970af2045211a7df/sandbox/processwrapper-sandbox/19570/execroot/com_github_cockroachdb_cockroach/bazel-out/aarch64-fastbuild/bin/pkg/sql/tablemetadatacache/tablemetadatacache_test_/tablemetadatacache_test.runfiles/com_github_cockroachdb_cockroach/pkg/sql/tablemetadatacache/testdata/update_table_metadata:125:
query
SELECT count(*) FROM system.table_metadata
WHERE table_type IN ('TABLE', 'SEQUENCE', 'MATERIALIZED_VIEW')
AND details->'index_sizes'->>(details->>'primary_index_id') IS NULL
----
0
table_metadata_updater_test.go:58:
/home/roach/.cache/bazel/_bazel_roach/c5a4e7d36696d9cd970af2045211a7df/sandbox/processwrapper-sandbox/19570/execroot/com_github_cockroachdb_cockroach/bazel-out/aarch64-fastbuild/bin/pkg/sql/tablemetadatacache/tablemetadatacache_test_/tablemetadatacache_test.runfiles/com_github_cockroachdb_cockroach/pkg/sql/tablemetadatacache/testdata/update_table_metadata:133:
query
SELECT details->'index_sizes' FROM system.table_metadata
WHERE table_name = 'myview'
----

table_metadata_updater_test.go:58:
/home/roach/.cache/bazel/_bazel_roach/c5a4e7d36696d9cd970af2045211a7df/sandbox/processwrapper-sandbox/19570/execroot/com_github_cockroachdb_cockroach/bazel-out/aarch64-fastbuild/bin/pkg/sql/tablemetadatacache/tablemetadatacache_test_/tablemetadatacache_test.runfiles/com_github_cockroachdb_cockroach/pkg/sql/tablemetadatacache/testdata/update_table_metadata:143:
query
SELECT replication_size_bytes >= (
SELECT COALESCE(sum(value::INT), 0)
FROM jsonb_each_text(details->'index_sizes')
)
FROM system.table_metadata
WHERE table_name = 'mytable2'

expected:
true

found:
false
--- FAIL: TestDataDrivenTableMetadataCacheUpdater/update_table_metadata (1.98s)
```
Help

See also: [How To Investigate a Go Test Failure \(internal\)](https://cockroachlabs.atlassian.net/l/c/HgfXfJgM)

Same failure on other branches

- #175586 basalt-26.3.2-rc-20260914: sql/tablemetadatacache: TestDataDrivenTableMetadataCacheUpdater failed [C-test-failure O-robot T-observability branch-basalt-26.3.2-rc-20260914 release-blocker]
- #175555 basalt-26.3.2-rc-20260908: sql/tablemetadatacache: TestDataDrivenTableMetadataCacheUpdater failed [C-test-failure O-robot T-observability branch-basalt-26.3.2-rc-20260908 release-blocker]
- #174995 basalt-26.3.2-rc-20260908: sql/tablemetadatacache: TestDataDrivenTableMetadataCacheUpdater failed [C-test-failure O-robot T-observability branch-basalt-26.3.2-rc-20260908 release-blocker]
- #174892 basalt-26.3.2-rc-20260908: sql/tablemetadatacache: TestDataDrivenTableMetadataCacheUpdater failed [C-test-failure O-robot T-observability branch-basalt-26.3.2-rc-20260908 release-blocker]

/cc @cockroachlabs/obs-prs

[This test on roachdash](https://roachdash.crdb.dev/?filter=status:open%20t:.*TestDataDrivenTableMetadataCacheUpdater.*&sort=title+created&display=lastcommented+project) | [Improve this report!](https://github.com/cockroachdb/cockroach/tree/master/pkg/cmd/bazci/githubpost/issues)

Jira issue: CRDB-68495

Contributor guide

Open the contributing guide

Research direction

Start with pkg/sql/tablemetadatacache/table_metadata_updater_test.go and the testdata/update_table_metadata data-driven case. Run TestDataDrivenTableMetadataCacheUpdater, then inspect the linked TeamCity log and artifacts alongside the failing SQL assertions. Done means the test passes consistently and the reported table_metadata values satisfy all expectations.

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
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.