cockroachdb / cockroachdb/cockroach
logical,txn: detect source schema-change boundaries
- 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
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