From ff336bd04405d3ecca82a3dba108d8e66746ece0 Mon Sep 17 00:00:00 2001 From: gmhdbjd Date: Wed, 13 Dec 2023 17:58:02 +0800 Subject: [PATCH] update --- dm/tests/lightning_mode/conf/task.json | 87 ++++++++++++++++++++++++++ dm/tests/lightning_mode/run.sh | 2 +- 2 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 dm/tests/lightning_mode/conf/task.json diff --git a/dm/tests/lightning_mode/conf/task.json b/dm/tests/lightning_mode/conf/task.json new file mode 100644 index 00000000000..de284f8fe7a --- /dev/null +++ b/dm/tests/lightning_mode/conf/task.json @@ -0,0 +1,87 @@ +{ + "task": { + "name": "test", + "task_mode": "all", + "shard_mode": "pessimistic", + "meta_schema": "dm-meta", + "enhance_online_schema_change": true, + "on_duplicate": "error", + "ignore_checking_items": [ + "version" + ], + "target_config": { + "host": "127.0.0.1", + "port": 4000, + "user": "root", + "password": "" + }, + "table_migrate_rule": [ + { + "source": { + "source_name": "mysql-replica-01", + "schema": "lightning_mode", + "table": "*" + }, + "target": { + "schema": "lightning_mode", + "table": "*" + }, + "binlog_filter_rule": [ + "rule-1" + ] + }, + { + "source": { + "source_name": "mysql-replica-02", + "schema": "lightning_mode", + "table": "" + }, + "target": { + "schema": "lightning_mode", + "table": "" + }, + "binlog_filter_rule": [ + "rule-1" + ] + } + ], + "source_config": { + "full_migrate_conf": { + "export_threads": 4, + "import_threads": 16, + "data_dir": "./exported_data", + "consistency": "auto", + "import_mode": "physical", + "sorting_dir": "./sort_dir", + "disk_quota": "80G", + "checksum": "required", + "analyze": "optional", + "range_concurrency": 0, + "compress-kv-pairs": "", + "pd_addr": "", + "on_duplicate_logical": "error", + "on_duplicate_physical": "manual" + }, + "incr_migrate_conf": { + "repl_threads": 16, + "repl_batch": 100 + }, + "source_conf": [ + { + "source_name": "mysql-replica-01" + }, + { + "source_name": "mysql-replica-02" + } + ] + }, + "binlog_filter_rule": { + "rule-1": { + "ignore_event": [ + "truncate table", + "drop table" + ] + } + } + } +} \ No newline at end of file diff --git a/dm/tests/lightning_mode/run.sh b/dm/tests/lightning_mode/run.sh index bce55d6ebc4..ad92df72cf8 100755 --- a/dm/tests/lightning_mode/run.sh +++ b/dm/tests/lightning_mode/run.sh @@ -89,7 +89,7 @@ function run() { run_sql_tidb "drop database if exists lightning_mode;" run_sql_tidb "drop database if exists dm_meta;" - task_conf=`cat $cur/conf/task.json` + task_conf=$(cat $cur/conf/task.json) curl -X POST http://127.0.0.1:8261/api/v1/tasks -H "Content-Type: application/json" -d "$task_conf" # use sync_diff_inspector to check full dump loader