cockroachdb / cockroachdb/cockroach
crosscluster/logical: support replicating table with composite type in pk
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
Examples of Composite Types: Decimals, Collated Strings
Technical Justification: Decoding a primary key with a composite type requires reading the current value. When the rangefeed sends over a delete, however, we do not see the current value. While we could rely on the prev value sent over the rangefeed, we currently have no way to handle phantom deletes (i.e. a delete on a key with no previous value)
There are also complications around column families, but let’s ignore that for now, as we disallow replicating tables with column families.
Jira issue: CRDB-43692
Contributor guide
Research direction
Start by tracing the crosscluster/logical replication path for primary-key decoding and rangefeed deletes. Investigate how composite types, current values, previous values, and phantom deletes are handled, while confirming that column-family tables remain excluded. Done means tables with composite types in their primary keys can replicate correctly, including deletes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, sql
- Domain
- databases, distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 47/100