Skip to content

Commit

Permalink
Update ticdc changefeed filter case senssitive default value (pingcap…
Browse files Browse the repository at this point in the history
  • Loading branch information
sdojjy authored Nov 23, 2023
1 parent cc3d73a commit 9460251
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 26 deletions.
6 changes: 3 additions & 3 deletions ticdc/ticdc-changefeed-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ cdc cli changefeed create --server=http://10.0.10.25:8300 --sink-uri="mysql://ro
```shell
Create changefeed successfully!
ID: simple-replication-task
Info: {"upstream_id":7178706266519722477,"namespace":"default","id":"simple-replication-task","sink_uri":"mysql://root:xxxxx@127.0.0.1:4000/?time-zone=","create_time":"2022-12-19T15:05:46.679218+08:00","start_ts":438156275634929669,"engine":"unified","config":{"case_sensitive":true,"enable_old_value":true,"force_replicate":false,"ignore_ineligible_table":false,"check_gc_safe_point":true,"enable_sync_point":true,"bdr_mode":false,"sync_point_interval":30000000000,"sync_point_retention":3600000000000,"filter":{"rules":["test.*"],"event_filters":null},"mounter":{"worker_num":16},"sink":{"protocol":"","schema_registry":"","csv":{"delimiter":",","quote":"\"","null":"\\N","include_commit_ts":false},"column_selectors":null,"transaction_atomicity":"none","encoder_concurrency":16,"terminator":"\r\n","date_separator":"none","enable_partition_separator":false},"consistent":{"level":"none","max_log_size":64,"flush_interval":2000,"storage":""}},"state":"normal","creator_version":"v6.5.0"}
Info: {"upstream_id":7178706266519722477,"namespace":"default","id":"simple-replication-task","sink_uri":"mysql://root:xxxxx@127.0.0.1:4000/?time-zone=","create_time":"2023-11-28T15:05:46.679218+08:00","start_ts":438156275634929669,"engine":"unified","config":{"case_sensitive":false,"enable_old_value":true,"force_replicate":false,"ignore_ineligible_table":false,"check_gc_safe_point":true,"enable_sync_point":true,"bdr_mode":false,"sync_point_interval":30000000000,"sync_point_retention":3600000000000,"filter":{"rules":["test.*"],"event_filters":null},"mounter":{"worker_num":16},"sink":{"protocol":"","schema_registry":"","csv":{"delimiter":",","quote":"\"","null":"\\N","include_commit_ts":false},"column_selectors":null,"transaction_atomicity":"none","encoder_concurrency":16,"terminator":"\r\n","date_separator":"none","enable_partition_separator":false},"consistent":{"level":"none","max_log_size":64,"flush_interval":2000,"storage":""}},"state":"normal","creator_version":"v7.5.0"}
```

- `--changefeed-id`:同步任务的 ID,格式需要符合正则表达式 `^[a-zA-Z0-9]+(\-[a-zA-Z0-9]+)*$`。如果不指定该 ID,TiCDC 会自动生成一个 UUID(version 4 格式)作为 ID。
Expand All @@ -42,8 +42,8 @@ Info: {"upstream_id":7178706266519722477,"namespace":"default","id":"simple-repl
# memory-quota = 1073741824
# 指定配置文件中涉及的库名、表名是否为大小写敏感
# 该配置会同时影响 filter 和 sink 相关配置,默认为 true
case-sensitive = true
# 该配置会同时影响 filter 和 sink 相关配置。自 v7.5.0 起,默认值由 true 改为 false
case-sensitive = false
# 是否开启 Syncpoint 功能,从 v6.3.0 开始支持,该功能默认关闭。
# 从 v6.4.0 开始,使用 Syncpoint 功能需要同步任务拥有下游集群的 SYSTEM_VARIABLES_ADMIN 或者 SUPER 权限。
Expand Down
4 changes: 2 additions & 2 deletions ticdc/ticdc-manage-changefeed.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ cdc cli changefeed create --server=http://10.0.10.25:8300 --sink-uri="mysql://ro
```shell
Create changefeed successfully!
ID: simple-replication-task
Info: {"upstream_id":7178706266519722477,"namespace":"default","id":"simple-replication-task","sink_uri":"mysql://root:xxxxx@127.0.0.1:4000/?time-zone=","create_time":"2022-12-19T15:05:46.679218+08:00","start_ts":438156275634929669,"engine":"unified","config":{"case_sensitive":true,"enable_old_value":true,"force_replicate":false,"ignore_ineligible_table":false,"check_gc_safe_point":true,"enable_sync_point":true,"bdr_mode":false,"sync_point_interval":30000000000,"sync_point_retention":3600000000000,"filter":{"rules":["test.*"],"event_filters":null},"mounter":{"worker_num":16},"sink":{"protocol":"","schema_registry":"","csv":{"delimiter":",","quote":"\"","null":"\\N","include_commit_ts":false},"column_selectors":null,"transaction_atomicity":"none","encoder_concurrency":16,"terminator":"\r\n","date_separator":"none","enable_partition_separator":false},"consistent":{"level":"none","max_log_size":64,"flush_interval":2000,"storage":""}},"state":"normal","creator_version":"v6.5.0"}
Info: {"upstream_id":7178706266519722477,"namespace":"default","id":"simple-replication-task","sink_uri":"mysql://root:xxxxx@127.0.0.1:4000/?time-zone=","create_time":"2023-11-28T15:05:46.679218+08:00","start_ts":438156275634929669,"engine":"unified","config":{"case_sensitive":false,"enable_old_value":true,"force_replicate":false,"ignore_ineligible_table":false,"check_gc_safe_point":true,"enable_sync_point":true,"bdr_mode":false,"sync_point_interval":30000000000,"sync_point_retention":3600000000000,"filter":{"rules":["test.*"],"event_filters":null},"mounter":{"worker_num":16},"sink":{"protocol":"","schema_registry":"","csv":{"delimiter":",","quote":"\"","null":"\\N","include_commit_ts":false},"column_selectors":null,"transaction_atomicity":"none","encoder_concurrency":16,"terminator":"\r\n","date_separator":"none","enable_partition_separator":false},"consistent":{"level":"none","max_log_size":64,"flush_interval":2000,"storage":""}},"state":"normal","creator_version":"v7.5.0"}
```

## 查询同步任务列表
Expand Down Expand Up @@ -91,7 +91,7 @@ cdc cli changefeed query --server=http://10.0.10.25:8300 --changefeed-id=simple-
"sort-engine": "unified",
"sort-dir": ".",
"config": {
"case-sensitive": true,
"case-sensitive": false,
"filter": {
"rules": [
"*.*"
Expand Down
34 changes: 17 additions & 17 deletions ticdc/ticdc-open-api-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ curl -X GET http://127.0.0.1:8300/api/v2/health
"changefeed_id": "string",
"replica_config": {
"bdr_mode": true,
"case_sensitive": true,
"case_sensitive": false,
"check_gc_safe_point": true,
"consistent": {
"flush_interval": 0,
Expand Down Expand Up @@ -261,21 +261,21 @@ curl -X GET http://127.0.0.1:8300/api/v2/health

`replica_config` 参数说明如下:

| 参数名 | 说明 |
|:--------------------------|:----------------------------------------------------------------------------------------------------|
| `bdr_mode` | `BOOLEAN` 类型,是否开启[双向同步复制](/ticdc/ticdc-bidirectional-replication.md)。默认值为 `false`。(非必选) |
| `case_sensitive` | `BOOLEAN` 类型,过滤表名时大小写是否敏感,默认值为 `true`。(非必选) |
| `check_gc_safe_point` | `BOOLEAN` 类型,是否检查同步任务的开始时间早于 GC 时间,默认值为 `true`。(非必选) |
| `consistent` | Redo log 配置。(非必选) |
| `enable_sync_point` | `BOOLEAN` 类型,是否开启 `sync point` 功能。(非必选) |
| `filter` | filter 配置。(非必选) |
| `force_replicate` | `BOOLEAN` 类型,该值默认为 `false`,当指定为 `true` 时,同步任务会尝试强制同步没有唯一索引的表。(非必选) |
| `ignore_ineligible_table` | `BOOLEAN` 类型,该值默认为 `false`,当指定为 `true` 时,同步任务会忽略无法进行同步的表。(非必选) |
| `memory_quota` | `UINT64` 类型,同步任务的内存 quota。(非必选) |
| `mounter` | 同步任务 `mounter` 配置。(非必选) |
| `sink` | 同步任务的`sink`配置。(非必选) |
| 参数名 | 说明 |
|:--------------------------|:---------------------------------------------------------------------------------------------------------|
| `bdr_mode` | `BOOLEAN` 类型,是否开启[双向同步复制](/ticdc/ticdc-bidirectional-replication.md)。默认值为 `false`。(非必选) |
| `case_sensitive` | `BOOLEAN` 类型,过滤表名时大小写是否敏感。自 v7.5.0 起,默认值由 `true` 改为 `false`。(非必选) |
| `check_gc_safe_point` | `BOOLEAN` 类型,是否检查同步任务的开始时间早于 GC 时间,默认值为 `true`。(非必选) |
| `consistent` | Redo log 配置。(非必选) |
| `enable_sync_point` | `BOOLEAN` 类型,是否开启 `sync point` 功能。(非必选) |
| `filter` | filter 配置。(非必选) |
| `force_replicate` | `BOOLEAN` 类型,该值默认为 `false`,当指定为 `true` 时,同步任务会尝试强制同步没有唯一索引的表。(非必选) |
| `ignore_ineligible_table` | `BOOLEAN` 类型,该值默认为 `false`,当指定为 `true` 时,同步任务会忽略无法进行同步的表。(非必选) |
| `memory_quota` | `UINT64` 类型,同步任务的内存 quota。(非必选) |
| `mounter` | 同步任务 `mounter` 配置。(非必选) |
| `sink` | 同步任务的`sink`配置。(非必选) |
| `sync_point_interval` | `STRING` 类型,注意返回值为 `UINT64` 类型的纳秒级时间,`sync point` 功能开启时,对齐上下游 snapshot 的时间间隔。默认值为 `10m`,最小值为 `30s`。(非必选) |
| `sync_point_retention` | `STRING` 类型,注意返回值为 `UINT64` 类型的纳秒级时间,`sync point` 功能开启时,在下游表中保存的数据的时长,超过这个时间的数据会被清理。默认值为 `24h`。(非必选) |
| `sync_point_retention` | `STRING` 类型,注意返回值为 `UINT64` 类型的纳秒级时间,`sync point` 功能开启时,在下游表中保存的数据的时长,超过这个时间的数据会被清理。默认值为 `24h`。(非必选) |

`consistent` 参数说明如下:

Expand Down Expand Up @@ -381,7 +381,7 @@ curl -X POST -H "'Content-type':'application/json'" http://127.0.0.1:8300/api/v2
"checkpoint_ts": 0,
"config": {
"bdr_mode": true,
"case_sensitive": true,
"case_sensitive": false,
"check_gc_safe_point": true,
"consistent": {
"flush_interval": 0,
Expand Down Expand Up @@ -585,7 +585,7 @@ curl -X DELETE http://127.0.0.1:8300/api/v2/changefeeds/test1
{
"replica_config": {
"bdr_mode": true,
"case_sensitive": true,
"case_sensitive": false,
"check_gc_safe_point": true,
"consistent": {
"flush_interval": 0,
Expand Down
2 changes: 1 addition & 1 deletion ticdc/ticdc-sink-to-cloud-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ cdc cli changefeed create \
输出结果如下:

```shell
Info: {"upstream_id":7171388873935111376,"namespace":"default","id":"simple-replication-task","sink_uri":"s3://logbucket/storage_test?protocol=canal-json","create_time":"2022-11-29T18:52:05.566016967+08:00","start_ts":437706850431664129,"engine":"unified","config":{"case_sensitive":true,"enable_old_value":true,"force_replicate":false,"ignore_ineligible_table":false,"check_gc_safe_point":true,"enable_sync_point":false,"sync_point_interval":600000000000,"sync_point_retention":86400000000000,"filter":{"rules":["*.*"],"event_filters":null},"mounter":{"worker_num":16},"sink":{"protocol":"canal-json","schema_registry":"","csv":{"delimiter":",","quote":"\"","null":"\\N","include_commit_ts":false},"column_selectors":null,"transaction_atomicity":"none","encoder_concurrency":16,"terminator":"\r\n","date_separator":"none","enable_partition_separator":false},"consistent":{"level":"none","max_log_size":64,"flush_interval":2000,"storage":""}},"state":"normal","creator_version":"v6.5.0-master-dirty"}
Info: {"upstream_id":7171388873935111376,"namespace":"default","id":"simple-replication-task","sink_uri":"s3://logbucket/storage_test?protocol=canal-json","create_time":"2023-11-28T18:52:05.566016967+08:00","start_ts":437706850431664129,"engine":"unified","config":{"case_sensitive":false,"enable_old_value":true,"force_replicate":false,"ignore_ineligible_table":false,"check_gc_safe_point":true,"enable_sync_point":false,"sync_point_interval":600000000000,"sync_point_retention":86400000000000,"filter":{"rules":["*.*"],"event_filters":null},"mounter":{"worker_num":16},"sink":{"protocol":"canal-json","schema_registry":"","csv":{"delimiter":",","quote":"\"","null":"\\N","include_commit_ts":false},"column_selectors":null,"transaction_atomicity":"none","encoder_concurrency":16,"terminator":"\r\n","date_separator":"none","enable_partition_separator":false},"consistent":{"level":"none","max_log_size":64,"flush_interval":2000,"storage":""}},"state":"normal","creator_version":"v7.5.0"}
```

- `--server`:TiCDC 集群中任意一个 TiCDC 服务器的地址。
Expand Down
2 changes: 1 addition & 1 deletion ticdc/ticdc-sink-to-kafka.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ cdc cli changefeed create \
```shell
Create changefeed successfully!
ID: simple-replication-task
Info: {"sink-uri":"kafka://127.0.0.1:9092/topic-name?protocol=canal-json&kafka-version=2.4.0&partition-num=6&max-message-bytes=67108864&replication-factor=1","opts":{},"create-time":"2020-03-12T22:04:08.103600025+08:00","start-ts":415241823337054209,"target-ts":0,"admin-job-type":0,"sort-engine":"unified","sort-dir":".","config":{"case-sensitive":true,"filter":{"rules":["*.*"],"ignore-txn-start-ts":null,"ddl-allow-list":null},"mounter":{"worker-num":16},"sink":{"dispatchers":null},"scheduler":{"type":"table-number","polling-time":-1}},"state":"normal","history":null,"error":null}
Info: {"sink-uri":"kafka://127.0.0.1:9092/topic-name?protocol=canal-json&kafka-version=2.4.0&partition-num=6&max-message-bytes=67108864&replication-factor=1","opts":{},"create-time":"2023-11-28T22:04:08.103600025+08:00","start-ts":415241823337054209,"target-ts":0,"admin-job-type":0,"sort-engine":"unified","sort-dir":".","config":{"case-sensitive":false,"filter":{"rules":["*.*"],"ignore-txn-start-ts":null,"ddl-allow-list":null},"mounter":{"worker-num":16},"sink":{"dispatchers":null},"scheduler":{"type":"table-number","polling-time":-1}},"state":"normal","history":null,"error":null}
```

- `--server`:TiCDC 集群中任意一个 TiCDC 服务器的地址。
Expand Down
2 changes: 1 addition & 1 deletion ticdc/ticdc-sink-to-mysql.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ cdc cli changefeed create \
```shell
Create changefeed successfully!
ID: simple-replication-task
Info: {"sink-uri":"mysql://root:123456@127.0.0.1:3306/","opts":{},"create-time":"2020-03-12T22:04:08.103600025+08:00","start-ts":415241823337054209,"target-ts":0,"admin-job-type":0,"sort-engine":"unified","sort-dir":".","config":{"case-sensitive":true,"filter":{"rules":["*.*"],"ignore-txn-start-ts":null,"ddl-allow-list":null},"mounter":{"worker-num":16},"sink":{"dispatchers":null},"scheduler":{"type":"table-number","polling-time":-1}},"state":"normal","history":null,"error":null}
Info: {"sink-uri":"mysql://root:123456@127.0.0.1:3306/","opts":{},"create-time":"2023-11-28T22:04:08.103600025+08:00","start-ts":415241823337054209,"target-ts":0,"admin-job-type":0,"sort-engine":"unified","sort-dir":".","config":{"case-sensitive":false,"filter":{"rules":["*.*"],"ignore-txn-start-ts":null,"ddl-allow-list":null},"mounter":{"worker-num":16},"sink":{"dispatchers":null},"scheduler":{"type":"table-number","polling-time":-1}},"state":"normal","history":null,"error":null}
```

- `--server`:TiCDC 集群中任意一个 TiCDC 服务器的地址。
Expand Down
2 changes: 1 addition & 1 deletion ticdc/ticdc-sink-to-pulsar.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ cdc cli changefeed create \

Create changefeed successfully!
ID: simple-replication-task
Info: {"upstream_id":7277814241002263370,"namespace":"default","id":"simple-replication-task","sink_uri":"pulsar://127.0.0.1:6650/consumer-test?protocol=canal-json","create_time":"2023-09-12T14:42:32.000904+08:00","start_ts":444203257406423044,"config":{"memory_quota":1073741824,"case_sensitive":true,"force_replicate":false,"ignore_ineligible_table":false,"check_gc_safe_point":true,"enable_sync_point":false,"bdr_mode":false,"sync_point_interval":600000000000,"sync_point_retention":86400000000000,"filter":{"rules":["pulsar_test.*"]},"mounter":{"worker_num":16},"sink":{"protocol":"canal-json","csv":{"delimiter":",","quote":"\"","null":"\\N","include_commit_ts":false,"binary_encoding_method":"base64"},"dispatchers":[{"matcher":["pulsar_test.*"],"partition":"","topic":"test_{schema}_{table}"}],"encoder_concurrency":16,"terminator":"\r\n","date_separator":"day","enable_partition_separator":true,"enable_kafka_sink_v2":false,"only_output_updated_columns":false,"delete_only_output_handle_key_columns":false,"pulsar_config":{"connection-timeout":30,"operation-timeout":30,"batching-max-messages":1000,"batching-max-publish-delay":10,"send-timeout":30},"advance_timeout":150},"consistent":{"level":"none","max_log_size":64,"flush_interval":2000,"use_file_backend":false},"scheduler":{"enable_table_across_nodes":false,"region_threshold":100000,"write_key_threshold":0},"integrity":{"integrity_check_level":"none","corruption_handle_level":"warn"}},"state":"normal","creator_version":"v7.4.0-master-dirty","resolved_ts":444203257406423044,"checkpoint_ts":444203257406423044,"checkpoint_time":"2023-09-12 14:42:31.410"}
Info: {"upstream_id":7277814241002263370,"namespace":"default","id":"simple-replication-task","sink_uri":"pulsar://127.0.0.1:6650/consumer-test?protocol=canal-json","create_time":"2023-11-28T14:42:32.000904+08:00","start_ts":444203257406423044,"config":{"memory_quota":1073741824,"case_sensitive":false,"force_replicate":false,"ignore_ineligible_table":false,"check_gc_safe_point":true,"enable_sync_point":false,"bdr_mode":false,"sync_point_interval":600000000000,"sync_point_retention":86400000000000,"filter":{"rules":["pulsar_test.*"]},"mounter":{"worker_num":16},"sink":{"protocol":"canal-json","csv":{"delimiter":",","quote":"\"","null":"\\N","include_commit_ts":false,"binary_encoding_method":"base64"},"dispatchers":[{"matcher":["pulsar_test.*"],"partition":"","topic":"test_{schema}_{table}"}],"encoder_concurrency":16,"terminator":"\r\n","date_separator":"day","enable_partition_separator":true,"enable_kafka_sink_v2":false,"only_output_updated_columns":false,"delete_only_output_handle_key_columns":false,"pulsar_config":{"connection-timeout":30,"operation-timeout":30,"batching-max-messages":1000,"batching-max-publish-delay":10,"send-timeout":30},"advance_timeout":150},"consistent":{"level":"none","max_log_size":64,"flush_interval":2000,"use_file_backend":false},"scheduler":{"enable_table_across_nodes":false,"region_threshold":100000,"write_key_threshold":0},"integrity":{"integrity_check_level":"none","corruption_handle_level":"warn"}},"state":"normal","creator_version":"v7.5.0","resolved_ts":444203257406423044,"checkpoint_ts":444203257406423044,"checkpoint_time":"2023-09-12 14:42:31.410"}
```

各参数的含义如下:
Expand Down

0 comments on commit 9460251

Please sign in to comment.