Repository navigation
Conversation
Document the optional Debezium JSON source.start_ts field (v8.5.9): URI debezium-include-start-ts, TOML include-start-ts, URI precedence, DML-only scope, and uint64 PD TSO precision.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe documentation adds optional transaction start TSO fields for Debezium and Simple JSON DML messages. It documents configuration methods, precedence, defaults, supported formats, protocol restrictions, and OpenAPI parameters. ChangesTransaction start TSO documentation
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Other Suggested reviewers: Merge Risk: ⚪ Minimal · up to The documented Debezium Avro restriction matches the supported TiCDC protocol configuration. No actionable merge risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Pull request overview
This PR updates TiCDC Kafka/Debezium documentation to describe the new optional source.start_ts field (introduced in v8.5.9) and how to enable it via sink URI, changefeed config, and the OpenAPI v2 config model.
Changes:
- Adds the
debezium-include-start-tssink URI parameter to the Kafka sink reference. - Documents
[sink.debezium] include-start-tsin the changefeed configuration reference andinclude_start_tsin the OpenAPI v2sink.debeziumconfig. - Expands the Debezium protocol doc with a new “Include the transaction start TSO” section and adds
payload.source.start_tsto the field table.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| ticdc/ticdc-sink-to-kafka.md | Adds a new sink URI parameter to enable emitting source.start_ts in Debezium JSON DML messages. |
| ticdc/ticdc-open-api-v2.md | Documents the new sink.debezium.include_start_ts OpenAPI v2 config field. |
| ticdc/ticdc-debezium.md | Adds a new section describing behavior/limitations and documents payload.source.start_ts in the message field table. |
| ticdc/ticdc-changefeed-config.md | Documents the new [sink.debezium] include-start-ts changefeed configuration item and its precedence rules. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| | Parameter name | Description | | ||
| |:-------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| | `output_old_value` | `BOOLEAN` type. It controls whether to output the value before the row data changes. The default value is true. When it is disabled, the UPDATE event does not output the "before" field. | | ||
| | `include_start_ts` | `BOOLEAN` type. New in v8.5.9. It controls whether Debezium JSON DML messages include `source.start_ts` (the original PD TSO of the source transaction). The default value is `false`. | |
|
|
||
| - DML value messages add integer `source.start_ts` next to `commit_ts`, and the JSON schema declares the field as `int64`. | ||
| - DDL events, WATERMARK/checkpoint events, key messages, and Debezium Avro are unchanged. Setting this option with the Debezium Avro protocol is rejected. | ||
| - To roll back, disable the option. Messages produced while it is off stay byte-compatible with the previous format. |
|
|
||
| > **Note:** | ||
| > | ||
| > `start_ts` is the original uint64 PD TSO, not a millisecond timestamp. Consumers must treat it as a 64-bit integer or a decimal string. Do not parse it as a JavaScript `Number` or IEEE-754 `float64`, which cannot represent an 18-digit TSO exactly. |
| | `payload.before` | JSON | The data value before the change event of a statement. For `"c"` events, the value of the `before` field is `null`. | | ||
| | `payload.after` | JSON | The data value after the change event of a statement. For `"d"` events, the value of the `after` field is `null`. | | ||
| | `payload.source.commit_ts` | Number | The `CommitTs` value of the event. | | ||
| | `payload.source.start_ts` | Number | The start TSO of the source transaction. Present only when `debezium-include-start-ts` or `[sink.debezium] include-start-ts` is enabled. Original uint64 PD TSO, not a millisecond timestamp. | |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 72067aab-fc9f-4682-ae05-31418d6562df
📒 Files selected for processing (4)
ticdc/ticdc-changefeed-config.mdticdc/ticdc-debezium.mdticdc/ticdc-open-api-v2.mdticdc/ticdc-sink-to-kafka.md
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.
| When this option is enabled: | ||
|
|
||
| - DML value messages add integer `source.start_ts` next to `commit_ts`, and the JSON schema declares the field as `int64`. | ||
| - DDL events, WATERMARK/checkpoint events, key messages, and Debezium Avro are unchanged. Setting this option with the Debezium Avro protocol is rejected. |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
Use Avro protocol consistently.
The supplied protocol lists define avro and debezium as separate values. “Debezium Avro” is not the established protocol name and can confuse configuration users.
ticdc/ticdc-debezium.md#L56-L56: refer to the rejected format as theAvro protocol.ticdc/ticdc-changefeed-config.md#L360-L360: refer to the rejected format as theAvro protocol.ticdc/ticdc-sink-to-kafka.md#L86-L86: refer to the rejected format as theAvro protocol.
As per path instructions: preserve established terminology in Markdown.
📍 Affects 3 files
ticdc/ticdc-debezium.md#L56-L56(this comment)ticdc/ticdc-changefeed-config.md#L360-L360ticdc/ticdc-sink-to-kafka.md#L86-L86
Source: Path instructions
What is changed, added or deleted? (Required)
Document the optional source transaction TSO in Debezium JSON (
source.start_ts) and Simple JSON (startTs) for the new TiCDC architecture. Both options are disabled by default and let consumers correlate row changes with their source transaction.falseoverridingtrue), DML-only scope, format restrictions, and integer precision.int64schema representation and complete its OpenAPI configuration contract.Validation: Markdown lint and internal link checks for all five changed pages; new JSON/TOML examples parse successfully; behavior checked against the implementation and tests in the linked code PRs.
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.
What is the related PR or file link(s)?
AI agent involvement
Do your changes match any of the following descriptions?
Summary by CodeRabbit
include-start-tssetting for Debezium JSON changefeed messages.source.start_tsto DML events.startTsfield to DML events.