Skip to content

Commit

Permalink
cdc: remove maxwell protocol, add simple protocol (pingcap#18030) (pi…
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot committed Jul 29, 2024
1 parent fc088b1 commit 3c72d25
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 14 deletions.
2 changes: 0 additions & 2 deletions releases/release-4.0.10.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ TiDB 版本:4.0.10

+ TiCDC

- 为 `maxwell` 协议默认开启 old value 特性 [#1144](https://github.com/pingcap/tiflow/pull/1144)
- 默认启用 unified sorter 特性 [#1230](https://github.com/pingcap/tiflow/pull/1230)

+ Dumpling
Expand Down Expand Up @@ -82,7 +81,6 @@ TiDB 版本:4.0.10

+ TiCDC

- 修复 `maxwell` 协议的问题,包括 `base64` 数据输出和将 TSO 转换成 unix timestamp [#1173](https://github.com/pingcap/tiflow/pull/1173)
- 修复过期的元数据可能引发新创建的 changefeed 异常的问题 [#1184](https://github.com/pingcap/tiflow/pull/1184)
- 修复在关闭的 notifier 上创建 receiver 的问题[#1199](https://github.com/pingcap/tiflow/pull/1199)
- 修复在 etcd 更新缓慢时导致内存访问量增长的问题 [#1227](https://github.com/pingcap/tiflow/pull/1227)
Expand Down
2 changes: 0 additions & 2 deletions releases/release-4.0.6.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ TiDB 版本:4.0.6

+ TiCDC(自 v4.0.6 起,TiCDC 成为**正式功能**,可用于生产环境)

- 支持输出 `maxwell` 格式的数据 [#869](https://github.com/pingcap/tiflow/pull/869)

## 优化提升

+ TiDB
Expand Down
1 change: 0 additions & 1 deletion releases/release-4.0.8.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ TiDB 版本:4.0.8

- 修复 owner 因更新 GC safepoint 失败而非预期退出的问题 [#979](https://github.com/pingcap/tiflow/pull/979)
- 修复非预期的任务信息更新 [#1017](https://github.com/pingcap/tiflow/pull/1017)
- 修复非预期的空 Maxwell 消息 [#978](https://github.com/pingcap/tiflow/pull/978)

+ TiDB Lightning

Expand Down
2 changes: 1 addition & 1 deletion releases/release-5.0.6.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ TiDB 版本:5.0.6
- 修复 Avro sink 模块不支持解析 JSON 类型列的问题 [#3624](https://github.com/pingcap/tiflow/issues/3624)
- 修复 TiKV owner 重启时 TiCDC 从 TiKV 读取到错误的元数据快照的问题 [#2603](https://github.com/pingcap/tiflow/issues/2603)
- 修复执行 DDL 后的内存泄漏的问题 [#3174](https://github.com/pingcap/tiflow/issues/3174)
- 修复 Canal 和 Maxwell 协议下 TiCDC 没有自动开启 `enable-old-value` 选项的问题 [#3676](https://github.com/pingcap/tiflow/issues/3676)
- 修复 Canal 协议下 TiCDC 没有自动开启 `enable-old-value` 选项的问题 [#3676](https://github.com/pingcap/tiflow/issues/3676)
- 修复 `cdc server` 命令在 Red Hat Enterprise Linux 系统的部分版本(如 6.8、6.9 等)上运行时出现时区错误的问题 [#3584](https://github.com/pingcap/tiflow/issues/3584)
- 修复当 Kafka 为下游时 `txn_batch_size` 监控指标数据不准确的问题 [#3431](https://github.com/pingcap/tiflow/issues/3431)
- 修复 tikv_cdc_min_resolved_ts_no_change_for_1m 监控在没有 changefeed 的情况下持续更新的问题 [#11017](https://github.com/tikv/tikv/issues/11017)
Expand Down
2 changes: 1 addition & 1 deletion releases/release-5.1.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ TiDB 版本:5.1.4
- 修复人为删除 etcd 任务的状态时导致 TiCDC panic 的问题 [#2980](https://github.com/pingcap/tiflow/issues/2980)
- 修复在某些 RHEL 发行版上因时区问题导致服务无法启动的问题 [#3584](https://github.com/pingcap/tiflow/issues/3584)
- 修复 MySQL sink 模块出现死锁时告警过于频繁的问题 [#2706](https://github.com/pingcap/tiflow/issues/2706)
- 修复 Canal 和 Maxwell 协议下 TiCDC 没有自动开启 `enable-old-value` 选项的问题 [#3676](https://github.com/pingcap/tiflow/issues/3676)
- 修复 Canal 协议下 TiCDC 没有自动开启 `enable-old-value` 选项的问题 [#3676](https://github.com/pingcap/tiflow/issues/3676)
- 修复 Avro sink 模块不支持解析 JSON 类型列的问题 [#3624](https://github.com/pingcap/tiflow/issues/3624)
- 修复监控 checkpoint lag 出现负值的问题 [#3010](https://github.com/pingcap/tiflow/issues/3010)
- 修复在容器环境中 OOM 的问题 [#1798](https://github.com/pingcap/tiflow/issues/1798)
Expand Down
2 changes: 1 addition & 1 deletion releases/release-5.2.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ TiDB 版本:5.2.4
- 修复在某些 RHEL 发行版上因时区问题导致服务无法启动的问题 [#3584](https://github.com/pingcap/tiflow/issues/3584)
- 修复集群升级后 `stopped` 状态的 changefeed 自动恢复的问题 [#3473](https://github.com/pingcap/tiflow/issues/3473)
- 修复 MySQL sink 模块出现死锁时告警过于频繁的问题 [#2706](https://github.com/pingcap/tiflow/issues/2706)
- 修复 Canal 和 Maxwell 协议下 TiCDC 没有自动开启 `enable-old-value` 选项的问题 [#3676](https://github.com/pingcap/tiflow/issues/3676)
- 修复 Canal 协议下 TiCDC 没有自动开启 `enable-old-value` 选项的问题 [#3676](https://github.com/pingcap/tiflow/issues/3676)
- 修复 Avro sink 模块不支持解析 JSON 类型列的问题 [#3624](https://github.com/pingcap/tiflow/issues/3624)
- 修复监控 checkpoint lag 出现负值的问题 [#3010](https://github.com/pingcap/tiflow/issues/3010)
- 修复在容器环境中 OOM 的问题 [#1798](https://github.com/pingcap/tiflow/issues/1798)
Expand Down
2 changes: 1 addition & 1 deletion releases/release-5.3.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ TiDB 版本:5.3.1
- 修复集群升级后 `stopped` 状态的 changefeed 自动恢复的问题 [#3473](https://github.com/pingcap/tiflow/issues/3473)
- 修复不支持同步默认值的问题 [#3793](https://github.com/pingcap/tiflow/issues/3793)
- 修复 MySQL sink 模块出现死锁时告警过于频繁的问题 [#2706](https://github.com/pingcap/tiflow/issues/2706)
- 修复 Canal 和 Maxwell 协议下 TiCDC 没有自动开启 `enable-old-value` 选项的问题 [#3676](https://github.com/pingcap/tiflow/issues/3676)
- 修复 Canal 协议下 TiCDC 没有自动开启 `enable-old-value` 选项的问题 [#3676](https://github.com/pingcap/tiflow/issues/3676)
- 修复 Avro sink 模块不支持解析 JSON 类型列的问题 [#3624](https://github.com/pingcap/tiflow/issues/3624)
- 修复监控 checkpoint lag 出现负值的问题 [#3010](https://github.com/pingcap/tiflow/issues/3010)

Expand Down
6 changes: 3 additions & 3 deletions ticdc/manage-ticdc.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ URI 中可配置的的参数如下:
| `max-message-bytes` | 每次向 Kafka broker 发送消息的最大数据量(可选,默认值 `10MB`)。从 v5.0.6 和 v4.0.6 开始,默认值分别从 64MB 和 256MB 调整至 10MB。|
| `replication-factor` | Kafka 消息保存副本数(可选,默认值 `1`|
| `compression` | 设置发送消息时使用的压缩算法(可选值为 `none``lz4``gzip``snappy``zstd`,默认值为 `none`)。|
| `protocol` | 输出到 Kafka 的消息协议,可选值有 `canal-json``open-protocol``avro``maxwell` |
| `protocol` | 输出到 Kafka 的消息协议,可选值有 `canal-json``open-protocol``avro` |
| `auto-create-topic` | 当传入的 `topic-name` 在 Kafka 集群不存在时,TiCDC 是否要自动创建该 topic(可选,默认值 `true`|
| `enable-tidb-extension` | 可选,默认值是 `false`。当输出协议为 `canal-json` 时,如果该值为 `true`,TiCDC 会发送 Resolved 事件,并在 Kafka 消息中添加 TiDB 扩展字段。从 6.1.0 开始,该参数也可以和输出协议 `avro` 一起使用。如果该值为 `true`,TiCDC 会在 Kafka 消息中添加三个 TiDB 扩展字段。|
| `max-batch-size` | 从 v4.0.9 开始引入。当消息协议支持把多条变更记录输出至一条 Kafka 消息时,该参数用于指定这一条 Kafka 消息中变更记录的最多数量。目前,仅当 Kafka 消息的 `protocol``open-protocol` 时有效(可选,默认值 `16`|
Expand Down Expand Up @@ -341,7 +341,7 @@ URI 中可配置的的参数如下:
| `auth.tls` | 使用 TLS 模式认证下游 Pulsar(可选,示例 `auth=tls&auth.tlsCertFile=/path/to/cert&auth.tlsKeyFile=/path/to/key`|
| `auth.token` | 使用 token 模式认证下游(可选,示例 `auth=token&auth.token=secret-token` 或者 `auth=token&auth.file=path/to/secret-token-file`|
| `name` | TiCDC 中 Pulsar producer 名字(可选) |
| `protocol` | 输出到 Pulsar 的消息协议,可选值有 `canal-json``open-protocol``avro``maxwell` |
| `protocol` | 输出到 Pulsar 的消息协议,可选值有 `canal-json``open-protocol``avro` |
| `maxPendingMessages` | Pending 消息队列的最大大小,例如,等待接收来自 Pulsar 的确认的消息(可选,默认值为 1000) |
| `disableBatching` | 禁止自动批量发送消息(可选) |
| `batchingMaxPublishDelay` | 设置发送消息的批处理时间(默认值为 10ms) |
Expand Down Expand Up @@ -647,7 +647,7 @@ worker-num = 16
# ]
# 对于 MQ 类的 Sink,可以指定消息的协议格式
# 目前支持 canal-json、open-protocol、avromaxwell 协议。
# 目前支持 canal-json、open-protocol 和 avro 协议。
# protocol = "canal-json"
```

Expand Down
2 changes: 1 addition & 1 deletion ticdc/ticdc-open-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ curl -X GET http://127.0.0.1:8300/api/v1/health

`matcher`:匹配语法和过滤器规则语法相同。

`protocol`:对于 MQ 类的 Sink,可以指定消息的协议格式。目前支持 `canal-json``open-protocol``avro``maxwell` 五种协议
`protocol`:对于 MQ 类的 Sink,可以指定消息的协议格式。目前支持 `canal-json``open-protocol``avro` 协议

### 使用样例

Expand Down
2 changes: 1 addition & 1 deletion ticdc/troubleshoot-ticdc.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ cdc cli changefeed create --sink-uri="mysql://[email protected]:3306/?time-zone=CST

## TiCDC 集群升级到 v4.0.8 之后,changefeed 报错 `[CDC:ErrKafkaInvalidConfig]Canal requires old value to be enabled`,为什么?

自 v4.0.8 起,如果 changefeed 使用 `canal-json` 或者 `maxwell` 协议输出,TiCDC 会自动开启 Old Value 功能。但是,当 TiCDC 是从较旧版本升级到 v4.0.8 或以上版本时,在 changefeed 使用 `canal-json``maxwell` 协议的同时 TiCDC 的 Old Value 功能会被禁用。此时,会出现该报错。可以按照以下步骤解决该报错:
自 v4.0.8 起,如果 changefeed 使用 `canal-json` 协议输出,TiCDC 会自动开启 Old Value 功能。但是,当 TiCDC 是从较旧版本升级到 v4.0.8 或以上版本时,在 changefeed 使用 `canal-json` 协议的同时 TiCDC 的 Old Value 功能会被禁用。此时,会出现该报错。可以按照以下步骤解决该报错:

1. 将 changefeed 配置文件中 `enable-old-value` 的值设为 `true`
2. 使用 `cdc cli changefeed pause` 暂停同步任务。
Expand Down

0 comments on commit 3c72d25

Please sign in to comment.