cockroachdb / cockroachdb/cockroach

logical,txn: detect source schema-change boundaries

Open
#173,604 2 comments 0 reactions 0 assignees View on GitHub
A-cdc A-logical-data-replication T-cdc
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

Have the LDR producer detect when a source table's schema changes and stop emitting data at that boundary. This gives the destination a clean point from which it can rebuild its replication plan before processing rows written under the new schema.

The producer will likely use the schemafeed and include the boundary in its existing stream metadata.

**Out of scope:** Replanning at the boundary or enabling `ADD COLUMN`.

**Done when:** The producer does not emit rows or a replicated timestamp beyond a schema-change boundary under the old plan. The test should include a non-NULL value written to the new column; a test that only observes a boundary could pass while still silently losing that value.

**Notes / risk:** The boundary must be established before buffered events are flushed. We should begin with the fail-safe schema event set rather than a narrow list.

**Depends on:** #173603

Jira issue: CRDB-66917

Epic CRDB-66920

Contributor guide

Open the contributing guide

Research direction

Start by tracing the LDR producer's schemafeed handling and existing stream metadata path, with dependency #173603 in view. Add or update the producer test to write a non-NULL value in the new column and verify that neither rows nor a replicated timestamp pass the schema-change boundary under the old plan. Confirm the boundary is established before buffered events flush.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
databases, distributed-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 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.