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

[2.0.2] zh: source level filter support #563

Merged
merged 6 commits into from
Mar 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion zh/key-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,8 @@ Binlog event filter 是比迁移表黑白名单更加细粒度的过滤规则,

> **注意:**
>
> 同一个表匹配上多个规则,将会顺序应用这些规则,并且黑名单的优先级高于白名单,即如果同时存在规则 `Ignore` 和 `Do` 应用在某个 table 上,那么 `Ignore` 生效。
> - 同一个表匹配上多个规则,将会顺序应用这些规则,并且黑名单的优先级高于白名单,即如果同时存在规则 `Ignore` 和 `Do` 应用在某个 table 上,那么 `Ignore` 生效。
> - 从 DM v2.0.2 开始,Binlog event filter 也可以在上游数据库配置文件中进行配置。见[上游数据库配置文件介绍](source-configuration-file.md)。

### 参数配置

Expand Down
19 changes: 19 additions & 0 deletions zh/source-configuration-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ from:
# interval: 3600
# expires: 0
# remain-space: 15

# 从 DM v2.0.2 开始,Binlog event filter 也可以在上游数据库配置文件中进行配置
# case-sensitive: false
# filters:
# - schema-pattern: dmctl
# table-pattern: t_1
# events: []
# sql-pattern:
# - alter table .* add column `aaa` int
# action: Ignore
```

> **注意:**
Expand Down Expand Up @@ -72,3 +82,12 @@ from:
> **注意:**
>
> 仅在 `interval` 不为 0 且 `expires` 和 `remain-space` 两个配置项中至少有一个不为 0 的情况下 DM 的自动清理策略才会生效。

### Binlog event filter

从 DM v2.0.2 开始,Binlog event filter 也可以在上游数据库配置文件中进行配置。

| 配置项 | 说明 |
| :------------ | :--------------------------------------- |
| `case-sensitive` | Binlog event filter 标识符是否大小写敏感。默认值:false 。|
| `filters` | 配置 Binlog event filter,含义见 [Binlog event filter 参数解释](key-features.md#参数解释-2)。 |