Skip to content

CockroachDB connector should default enriched_properties to source and treat the value as a passthrough #1999

@viragtripathi

Description

@viragtripathi

The cockroachdb.changefeed.enriched.properties property currently defaults to source,schema and its description lists mvcc as an accepted value. Two problems:

  1. schema is not used by the connector. The connector derives the schema of each event from the table metadata it discovers over JDBC, and it identifies each event's table from the topic the event arrives on. It does not read the enriched schema block. Requesting schema by default adds a large, redundant block to every message that the connector discards. (This holds for schema-change handling too: evolution is detected by comparing event fields against the JDBC-discovered model, not from the message's schema block.)
  2. mvcc is not a valid enriched_properties value. CockroachDB only accepts source and schema; mvcc is a separate top-level changefeed option, not an enriched_properties value.

The connector functionally requires only the base enriched envelope (op, ts_ns, after, and before when diff is set). The source block is still worth requesting by default because it carries the originating database, schema, table, and commit timestamp, which is useful for operators inspecting the intermediate topics and for other consumers of them.

Proposed changes

  • Default cockroachdb.changefeed.enriched.properties to source.
  • Treat the value as a passthrough to the CockroachDB CREATE CHANGEFEED statement, with no hardcoded allowlist of property names. CockroachDB owns the valid set (currently source, schema) and validates it at changefeed creation, so an allowlist in the connector would block adoption of a future CockroachDB value. This mirrors how the PostgreSQL connector treats slot.stream.params.
  • Surface CockroachDB's error message directly when CREATE CHANGEFEED fails (invalid option, missing privilege, bad URI), so misconfiguration is visible in the task status rather than only in the cause chain.
  • Update the property description and the connector documentation accordingly.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions