cockroachdb / cockroachdb/cockroach

catalog: enhance interfaces to decouple logic from CDC for schema changes

Open
#151,498 0 comments 0 reactions 0 assignees View on GitHub
C-cleanup C-enhancement T-sql-foundations
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

Presently, there is a bunch of explicit logic inside the CDC for detecting certain schema changes. Currently the table_event_filter has logic that would be better encompassed in the catalog / table descriptor for detecting different parts of schema changes.

We have logic to inspect the schema changer state / mutations that can be better decoupled:
https://github.com/cockroachdb/cockroach/blob/0e8321e1050bb0424fe7f18ff3cbfea4985bb126/pkg/ccl/changefeedccl/schemafeed/table_event_filter.go#L297

https://github.com/cockroachdb/cockroach/blob/0e8321e1050bb0424fe7f18ff3cbfea4985bb126/pkg/ccl/changefeedccl/schemafeed/table_event_filter.go#L332
https://github.com/cockroachdb/cockroach/blob/0e8321e1050bb0424fe7f18ff3cbfea4985bb126/pkg/ccl/changefeedccl/cdcevent/event.go#L343

Jira issue: CRDB-53313

Epic CRDB-2454

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.