-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cdc: add description about the tidb extension field #19369
base: master
Are you sure you want to change the base?
Conversation
[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.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@3AceShowHand: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
||
| 字段 | 类型 | 说明 | | ||
|:-------------------|:-------|:-------------------------------------------------------------------------| | ||
| commitTs | Number | 产生事件变更的事务提交使用的 TSO。设置于 DDL 和 DML 事件 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| commitTs | Number | 产生事件变更的事务提交使用的 TSO。设置于 DDL 和 DML 事件 | | |
| commitTs | Number | 提交产生事件变更的事务使用的 TSO。用于 DDL 和 DML 事件。 | |
@@ -82,7 +82,21 @@ TiCDC 会把一个 DDL Event 编码成如下 Canal-JSON 格式: | |||
| mysqlType | object | 当 isDdl 为 false 时,记录每一列数据类型在 MySQL 中的类型表示 | | |||
| data | Object | 当 isDdl 为 false 时,记录每一列的名字及其数据值 | | |||
| old | Object | 仅当该条消息由 Update 类型事件产生时,记录每一列的名字,和 Update 之前的数据值 | | |||
| _tidb | Object | TiDB 扩展字段,仅当 `enable-tidb-extension` 为 true 时才会存在。其中的 `commitTs` 值为造成 Row 变更的事务的 TSO | | |||
| _tidb | Object | TiDB 扩展字段,仅当 `enable-tidb-extension` 为 true 时才会存在。 | | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| watermarkTs | Number | TiCDC 周期性发送的 Watermark Ts,其类型也是 TSO。设置于 Watermark 事件| | ||
| tableId | Number | 事件所属表的 ID。设置于 DML 事件 | | ||
| partitionId | Number | 事件如果来自于分区表,消息会携带该字段,表示所属分区的 ID。设置于 DML 事件 | | ||
| onlyHandleKey | Bool | 当前事件仅包含 handle key 部分内容。设置于 DML 事件 | | ||
| claimCheckLocation | String | 当前事件含有 claim check location。设置于 DML 事件 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| watermarkTs | Number | TiCDC 周期性发送的 Watermark Ts,其类型也是 TSO。设置于 Watermark 事件| | |
| tableId | Number | 事件所属表的 ID。设置于 DML 事件 | | |
| partitionId | Number | 事件如果来自于分区表,消息会携带该字段,表示所属分区的 ID。设置于 DML 事件 | | |
| onlyHandleKey | Bool | 当前事件仅包含 handle key 部分内容。设置于 DML 事件 | | |
| claimCheckLocation | String | 当前事件含有 claim check location。设置于 DML 事件 | | |
| watermarkTs | Number | TiCDC 周期性发送的 Watermark Ts,其类型也是 TSO。用于 Watermark 事件。| | |
| tableId | Number | 事件所属表的 ID。用于 DML 事件。 | | |
| partitionId | Number | 如果事件来自分区表,消息会携带该字段,表示所属分区的 ID。用于 DML 事件。 | | |
| onlyHandleKey | Bool | 当前事件仅包含 handle key 部分内容。用于 DML 事件。 | | |
| claimCheckLocation | String | 当前事件含有 claim check location。用于 DML 事件。 | |
| onlyHandleKey | Bool | 当前事件仅包含 handle key 部分内容。设置于 DML 事件 | | ||
| claimCheckLocation | String | 当前事件含有 claim check location。设置于 DML 事件 | | ||
|
||
`tableId` 和 `partitionId` 字段从 xxx 版本开始引入,主要目的是为了应对分区表场景下,消费者可以通过 `partitionId` 得知当前事件所属的表分区,以及关联的分区表。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
记得加上版本号
First-time contributors' checklist
What is changed, added or deleted? (Required)
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 (in Chinese).
What is the related PR or file link(s)?
Do your changes match any of the following descriptions?