Skip to content
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

Add documentation on how to modify gcttl by tiup #6471

Merged
merged 11 commits into from
Jul 8, 2021
31 changes: 30 additions & 1 deletion ticdc/manage-ticdc.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ aliases: ['/docs-cn/dev/ticdc/manage-ticdc/','/docs-cn/dev/reference/tools/ticdc

# TiCDC 运维操作及任务管理

本文档介绍如何通过 TiCDC 提供的命令行工具 `cdc cli` 和 HTTP 接口两种方式来管理 TiCDC 集群和同步任务。
本文档介绍如何通过 TiCDC 提供的命令行工具 `cdc cli` 和 HTTP 接口两种方式来管理 TiCDC 集群和同步任务,并介绍了如何使用 TiUP 来升级和修改 TiCDC 集群的配置

## 使用 TiUP 升级 TiCDC

Expand All @@ -24,6 +24,35 @@ tiup cluster upgrade <cluster-name> v5.1.0
* TiCDC v4.0.2 对 `changefeed` 的配置做了调整,请参阅[配置文件兼容注意事项](/ticdc/manage-ticdc.md#配置文件兼容性的注意事项)。
* 升级期间遇到的问题及其解决办法,请参阅[使用 TiUP 升级 TiDB](/upgrade-tidb-using-tiup.md#4-升级-faq)。

## 使用 TiUP 修改 TiCDC 配置

本节介绍如何使用 TiUP 的 [`tiup cluster edit-config`](/tiup/tiup-component-cluster-edit-config.md) 命令来修改 TiCDC 的配置。在以下例子中,假设需要把 TiCDC 的 `gc-ttl` 从默认值 `86400` 修改为 `3600`,即 1 小时。

首先执行以下命令。将 `<cluster-name>` 替换成实际的集群名。

asddongmen marked this conversation as resolved.
Show resolved Hide resolved
{{< copyable "shell-regular" >}}

```shell
tiup cluster edit-config <cluster-name>
```

执行以上命令之后,进入到 vi 编辑器页面,修改 [`server-configs`](/tiup/tiup-cluster-topology-reference.md#server_configs) 下的 `cdc` 配置,如下所示:

```shell
server_configs:
tidb: {}
tikv: {}
pd: {}
tiflash: {}
tiflash-learner: {}
pump: {}
drainer: {}
cdc:
gc-ttl: 3600
```

修改完毕后执行 `tiup cluster relaod -R cdc` 命令重新加载配置。

## 使用加密传输 (TLS) 功能

请参阅[为 TiDB 组件间通信开启加密传输](/enable-tls-between-components.md)。
Expand Down