Skip to content

Commit

Permalink
ticdc: synchronize data in the new collations (pingcap#7151)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rustin170506 authored May 11, 2022
1 parent 075ba84 commit f5cc4b3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions ticdc/manage-ticdc.md
Original file line number Diff line number Diff line change
Expand Up @@ -592,11 +592,7 @@ protocol = "canal-json"

## 输出行变更的历史值 <span class="version-mark">从 v4.0.5 版本开始引入</span>

> **警告:**
>
> 目前输出行变更历史值属于实验特性,尚未经过完备的测试,不建议在生产环境中使用该功能。

在默认配置下同步任务输出的 TiCDC Open Protocol 行变更数据只包含变更后的值,不包含变更前行的值,因此该输出数据不支持 TiDB 4.0 [新的 Collation 框架](/character-set-and-collation.md#新框架下的排序规则支持),也不满足 TiCDC Open Protocol 的消费端使用行变更历史值的需求。
默认配置下,同步任务输出的 TiCDC Open Protocol 行变更数据只包含变更后的值,不包含变更前行的值,因此该输出数据不满足 TiCDC Open Protocol 的消费端使用行变更历史值的需求。

从 v4.0.5 开始,TiCDC 支持输出行变更数据的历史值。若要开启该特性,需要在 changefeed 的配置文件的根级别指定以下配置:

Expand All @@ -606,7 +602,11 @@ protocol = "canal-json"
enable-old-value = true
```

开启该特性后,TiCDC Open Protocol 的输出格式参考 [TiCDC 开放数据协议 - Row Changed Event](/ticdc/ticdc-open-protocol.md#row-changed-event),使用 MySQL sink 时也会自动支持的 TiDB 4.0 新 Collation 特性。
从 v5.0 开始默认启用该特性,开启该特性后 TiCDC Open Protocol 的输出格式参考 [TiCDC 开放数据协议 - Row Changed Event](/ticdc/ticdc-open-protocol.md#row-changed-event)。

## 同步启用了 TiDB 新的 Collation 框架的表

从 v4.0.15、v5.0.4、v5.1.1 和 v5.2.0 开始,TiCDC 支持同步启用了 TiDB [新的 Collation 框架](/character-set-and-collation.md#新框架下的排序规则支持)的表。

## 同步没有有效索引的表

Expand Down
2 changes: 1 addition & 1 deletion ticdc/troubleshoot-ticdc.md
Original file line number Diff line number Diff line change
Expand Up @@ -463,4 +463,4 @@ Sink 为 TiDB 或 MySQL 时,下游数据库的用户需要以下权限:
- `Alter`
- `Create View`

如果要同步 `recover table` 到下游 TiDB,需要有 `Super` 权限。
如果要同步 `recover table` 到下游 TiDB,需要有 `Super` 权限。

0 comments on commit f5cc4b3

Please sign in to comment.