Skip to content

Commit

Permalink
[2.0.2] zh: source level filter support (#563) (#584)
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-srebot authored Apr 9, 2021
1 parent daa03a8 commit 2da9f2c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
3 changes: 2 additions & 1 deletion zh/key-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,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 @@ -35,6 +35,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 @@ -71,3 +81,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)|

0 comments on commit 2da9f2c

Please sign in to comment.