Skip to content

cdc: add mode support for debezium - #23912

Open
wk989898 wants to merge 1 commit into
pingcap:masterfrom
wk989898:debezium-mode
Open

wk989898 wants to merge 1 commit into
pingcap:masterfrom
wk989898:debezium-mode

Conversation

@wk989898

@wk989898 wk989898 commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

First-time contributors' checklist

What is changed, added, or deleted? (Required)

Add the "Numeric and binary handling" section for debezium protocol

Which TiDB version(s) do your changes apply to? (Required)

Tips for choosing the affected version(s):

By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.

For details, see tips for choosing the affected versions.

  • master (the latest development version)
  • v9.0 (TiDB 9.0 versions)
  • v8.5 (TiDB 8.5 versions)
  • v8.1 (TiDB 8.1 versions)
  • v7.5 (TiDB 7.5 versions)
  • v7.1 (TiDB 7.1 versions)
  • v6.5 (TiDB 6.5 versions)

What is the related PR or file link(s)?

AI agent involvement

  • The changes in this PR were primarily made by an AI agent on behalf of the PR author.

Do your changes match any of the following descriptions?

  • Delete files
  • Change aliases
  • Need modification after applied to another branch
  • Might cause conflicts after applied to another branch

Summary by CodeRabbit

  • Documentation
    • Documented new Debezium JSON options for decimal, unsigned bigint, and binary value handling.
    • Added supported encoding modes, defaults, configuration locations, and precedence rules.
    • Clarified how these settings affect message keys, payload values, and schema defaults.
    • Updated Kafka sink parameter references and Debezium data type mapping guidance.

Signed-off-by: wk989898 <nhsmwk@gmail.com>
@ti-chi-bot

ti-chi-bot Bot commented Sep 20, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign overvenus for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot Bot added missing-translation-status This PR does not have translation status info. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 20, 2026
@coderabbitai

coderabbitai Bot commented Sep 20, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

📝 Walkthrough

Walkthrough

The documentation adds Debezium JSON handling modes for decimal, unsigned bigint, and binary values. It documents changefeed and sink URI configuration, precedence, defaults, supported options, encoding effects, and related data type mappings.

Changes

Debezium handling modes

Layer / File(s) Summary
Handling mode configuration
ticdc/ticdc-debezium.md, ticdc/ticdc-changefeed-config.md
Documents the three Debezium JSON handling modes, their defaults, supported values, encoding effects, debezium-avro scope, and sink URI precedence.
Data type and sink URI references
ticdc/ticdc-debezium.md, ticdc/ticdc-sink-to-kafka.md
Updates binary, decimal, and unsigned bigint mappings. Adds the corresponding Kafka sink URI parameters.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Suggested reviewers: qiancai

Merge Risk: 🔵 Low · up to e23ac

The new guidance could confuse users about which protocol receives these settings, but the issue is localized to documentation and does not affect runtime behavior.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the CDC Debezium mode support documented by this pull request.
Description check ✅ Passed The description follows the repository template, explains the documentation change, selects the master version, and provides a related code PR link.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: pingcap/docs/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: c9c75f90-b30b-4988-a64a-d73005caa91a

📥 Commits

Reviewing files that changed from the base of the PR and between f9f08f3 and e23acd3.

📒 Files selected for processing (3)
  • ticdc/ticdc-changefeed-config.md
  • ticdc/ticdc-debezium.md
  • ticdc/ticdc-sink-to-kafka.md

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.

Comment thread ticdc/ticdc-debezium.md

### Numeric and binary handling

For Debezium JSON (`protocol=debezium`), you can configure how TiCDC encodes decimal values, unsigned BIGINT values, and binary data. Set the following options in the [`[sink.debezium]`](/ticdc/ticdc-changefeed-config.md#sinkdebezium) section of the changefeed configuration file or use the corresponding `sink-uri` parameters. If you set an option in both places, the `sink-uri` value takes precedence. These options do not apply to `protocol=debezium-avro`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n -S \
  'debezium-avro|protocol\s*[:=].*(avro|debezium)|Protocol.*(Avro|Debezium)' \
  --glob '*.go' --glob '*.md' .

Repository: pingcap/docs

Length of output: 7178


🏁 Script executed:

set -euo pipefail
printf '%s\n' '--- ticdc/ticdc-changefeed-config.md ---'
sed -n '188,205p' ticdc/ticdc-changefeed-config.md
printf '%s\n' '--- ticdc/ticdc-sink-to-kafka.md ---'
sed -n '68,84p' ticdc/ticdc-sink-to-kafka.md
printf '%s\n' '--- ticdc/ticdc-debezium.md ---'
sed -n '28,40p' ticdc/ticdc-debezium.md

Repository: pingcap/docs

Length of output: 6134


Use the supported Avro protocol identifier. The supported value is protocol=avro, not protocol=debezium-avro.

Suggested change
For Debezium JSON (`protocol=debezium`), you can configure how TiCDC encodes decimal values, unsigned BIGINT values, and binary data. Set the following options in the [`[sink.debezium]`](/ticdc/ticdc-changefeed-config.md#sinkdebezium) section of the changefeed configuration file or use the corresponding `sink-uri` parameters. If you set an option in both places, the `sink-uri` value takes precedence. These options do not apply to `protocol=debezium-avro`.
For Debezium JSON (`protocol=debezium`), you can configure how TiCDC encodes decimal values, unsigned BIGINT values, and binary data. Set the following options in the [`[sink.debezium]`](/ticdc/ticdc-changefeed-config.md#sinkdebezium) section of the changefeed configuration file or use the corresponding `sink-uri` parameters. If you set an option in both places, the `sink-uri` value takes precedence. These options do not apply to `protocol=avro`.

Source: MCP tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

missing-translation-status This PR does not have translation status info. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant