cockroachdb / cockroachdb/cockroach

logical replication: disallow the sql/crud immediate-mode writer on 25.2

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

Description

**Is your feature request related to a problem? Please describe.**

On the release-25.2 line, the LDR immediate-mode writer can be set to `sql` or `crud` (via the `logical_replication.consumer.immediate_mode_writer` setting), but neither writer is actually supported on 25.2. Using them exposes LDR jobs to known LWW correctness bugs, including:

- The index-backfill LWW bug (#146117).
- The tombstone-updater bug (#159306, fixed by #159746). The tombstone fix was intentionally never backported to release-25.2 because the sql writer was already considered unsupported there, so 25.2.x releases do not contain it.

The `crud`/`sql` writer only becomes supported starting in 25.4, which carries the relevant fixes. There is currently no guardrail preventing a user from switching to these unsupported writers on 25.2, which can lead to potential correctness issues.

**Describe the solution you'd like**

Add a guardrail on the release-25.2 line that prevents LDR users from selecting the `sql` or `crud` immediate-mode writer, leaving `legacy-kv` as the only supported option on 25.2.

**Describe alternatives you've considered**

Documenting that the `sql`/`crud` writers are unsupported on 25.2 without an enforced guardrail. This is insufficient, since users can and have switched to these writers as a mitigation for other errors, unknowingly exposing themselves to the LWW bugs above.

**Additional context**

Context and discussion: https://cockroachlabs.slack.com/archives/C9TGBJB44/p1788209652574679?thread_ts=1788204876.352469&cid=C9TGBJB44

Jira issue: CRDB-67700

Contributor guide

Open the contributing guide

Research direction

No source file or test is named. Start by locating the release-25.2 handling of logical_replication.consumer.immediate_mode_writer and trace how sql, crud, and legacy-kv are validated; done means sql and crud cannot be selected on 25.2 while legacy-kv remains available.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, sql
Domain
databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.