cockroachdb / cockroachdb/cockroach

changefeedccl: expand schema feed test to include schema_locked

Open
#105,022 1 comment 0 reactions 0 assignees View on GitHub
A-cdc C-bug T-cdc
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

We discovered a [race condition](https://github.com/cockroachdb/cockroach/pull/104913) via high-level testing on a test cluster. We should have caught it at a lower level, either via unit, integration or logic test.

Let’s start by adding a changefeed test with `WITH schema_locked` in the schema, perhaps alongside those in `changefeed_test.go`.

Let’s consider how [this function](https://github.com/cockroachdb/cockroach/blob/master/pkg/ccl/changefeedccl/schemafeed/schema_feed.go/#L408-L448) might be unit or integration tested in such a way that (in retrospect) would have revealed the race.

We already have issues open to randomize more generally:

- https://github.com/cockroachdb/cockroach/issues/104792
- https://github.com/cockroachdb/cockroach/issues/104793
- https://github.com/cockroachdb/cockroach/issues/104799

cc @HonoreDB @Xiang-Gu

Jira issue: CRDB-28825

Epic CRDB-2258

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.