cockroachdb / cockroachdb/cockroach

logical,txn: detect and replan after destination schema changes

Open
#173,605 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

Detect when a running LDR flow has an outdated view of the destination table and replan before applying more rows. Replication should continue if the new schema is compatible; otherwise, the job should surface a schema conflict.

**Out of scope:** Source-side schema changes and enabling `ADD COLUMN`.

**Done when:** A compatible destination schema change causes LDR to replan and continue, while an incompatible change cannot be applied using the stale plan.

**Notes / risk:** The check must protect the write itself and should not trigger replanning for descriptor changes that do not affect replication.

**Depends on:** #173601, #173603

Jira issue: CRDB-66916

Epic CRDB-66920

Contributor guide

Open the contributing guide

Research direction

Start by reading the LDR flow and the prerequisite issues #173601 and #173603, then trace where the destination schema is checked, the plan is selected, and rows are written. Done means a compatible destination change triggers replanning and continued replication, while an incompatible change is rejected without using the stale plan; unrelated descriptor changes must not replan.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.