cockroachdb / cockroachdb/cockroach

crosscluster/logical: transactional LDR emits one duplicate endTime checkpoint per remaining KV

Open Beginner friendly
#172,373 3 comments 0 reactions 0 assignees View on GitHub
A-logical-data-replication C-bug O-agent T-cdc
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

**Describe the problem**

The type comment says the synthetic `endTime` checkpoint is deduplicated by
`maybeEmitCheckpoint`, but `processPastEndTime` calls `emitCheckpoint`
unconditionally — one checkpoint per remaining KV after cutoff, each broadcast to
every applier, precisely while the convergence loop is trying to wind down.

**Impact**

Checkpoint storm during convergence teardown (extra broadcasts per remaining KV);
inefficiency during the sensitive wind-down phase.

**Code references**
- [txnfeed/merge_feed.go:222](https://github.com/cockroachdb/cockroach/blob/master/pkg/crosscluster/logical/txnfeed/merge_feed.go#L222)

**Suggested fix**

Call `maybeEmitCheckpoint` (the first emission still fires).

Epic CRDB-65552

Jira issue: CRDB-65608

Contributor guide

Open the contributing guide

Research direction

Start in pkg/crosscluster/logical/txnfeed/merge_feed.go at processPastEndTime and inspect maybeEmitCheckpoint alongside the referenced line. Verify the existing checkpoint behavior and relevant txnfeed tests, then confirm that the first synthetic endTime checkpoint is emitted while subsequent remaining KVs do not cause duplicate broadcasts.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
databases, distributed-systems
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.