Skip to content

Commit

Permalink
Revert "dm/test: swap upstream and downstream of sync_diff in some ca…
Browse files Browse the repository at this point in the history
…ses (pingcap#3413)"

This reverts commit 35102b5.
  • Loading branch information
lance6716 committed Jan 18, 2022
1 parent 4bfa080 commit c540a1a
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 197 deletions.
31 changes: 0 additions & 31 deletions dm/tests/adjust_gtid/conf/diff_config_revert_1.toml

This file was deleted.

31 changes: 0 additions & 31 deletions dm/tests/adjust_gtid/conf/diff_config_revert_2.toml

This file was deleted.

6 changes: 2 additions & 4 deletions dm/tests/adjust_gtid/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ function run() {
"start-task $WORK_DIR/dm-task.yaml --remove-meta"

# use sync_diff_inspector to check full dump loader
check_sync_diff $WORK_DIR $cur/conf/diff_config_revert_1.toml
check_sync_diff $WORK_DIR $cur/conf/diff_config_revert_2.toml
check_sync_diff $WORK_DIR $cur/conf/diff_config.toml

name1=$(grep "Log: " $WORK_DIR/worker1/dumped_data.$TASK_NAME/metadata | awk -F: '{print $2}' | tr -d ' ')
pos1=$(grep "Pos: " $WORK_DIR/worker1/dumped_data.$TASK_NAME/metadata | awk -F: '{print $2}' | tr -d ' ')
Expand Down Expand Up @@ -128,8 +127,7 @@ function run() {
check_rpc_alive $cur/../bin/check_worker_online 127.0.0.1:$WORKER2_PORT

# use sync_diff_inspector to check incremental dump loader
check_sync_diff $WORK_DIR $cur/conf/diff_config_revert_1.toml
check_sync_diff $WORK_DIR $cur/conf/diff_config_revert_2.toml
check_sync_diff $WORK_DIR $cur/conf/diff_config.toml

run_sql_both_source "SET @@GLOBAL.SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'"
run_sql_both_source "SET @@global.time_zone = 'SYSTEM';"
Expand Down
30 changes: 0 additions & 30 deletions dm/tests/full_mode/conf/diff_config_revert_1.toml

This file was deleted.

30 changes: 0 additions & 30 deletions dm/tests/full_mode/conf/diff_config_revert_2.toml

This file was deleted.

10 changes: 3 additions & 7 deletions dm/tests/full_mode/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ function fail_acquire_global_lock() {
"you need (at least one of) the RELOAD privilege(s) for this operation" 2

cleanup_data full_mode
cleanup_data_upstream full_mode
cleanup_process $*
}

Expand Down Expand Up @@ -101,6 +100,7 @@ function escape_schema() {

# start DM task only
dmctl_start_task "$WORK_DIR/dm-task.yaml" "--remove-meta"
check_sync_diff $WORK_DIR $WORK_DIR/diff_config.toml

check_log_contain_with_retry 'clean dump files' $WORK_DIR/worker1/log/dm-worker.log
check_log_contain_with_retry 'clean dump files' $WORK_DIR/worker2/log/dm-worker.log
Expand All @@ -114,7 +114,6 @@ function escape_schema() {
check_metric $WORKER2_PORT 'dumpling_dump_finished_tables' 3 0 3

cleanup_data full/mode
cleanup_data_upstream full/mode
cleanup_process $*
}

Expand All @@ -127,8 +126,7 @@ function empty_data() {
init_cluster

dmctl_start_task "$cur/conf/dm-task.yaml" "--remove-meta"
check_sync_diff $WORK_DIR $cur/conf/diff_config_revert_1.toml
check_sync_diff $WORK_DIR $cur/conf/diff_config_revert_2.toml
check_sync_diff $WORK_DIR $cur/conf/diff_config.toml

sleep 1
run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \
Expand All @@ -141,7 +139,6 @@ function empty_data() {
check_log_contains $WORK_DIR/worker2/log/dm-worker.log "progress=\"100.00 %\""

cleanup_data full_mode
cleanup_data_upstream full_mode
cleanup_process $*
}

Expand Down Expand Up @@ -190,8 +187,7 @@ function run() {
dmctl_start_task "$cur/conf/dm-task.yaml" "--remove-meta"

# use sync_diff_inspector to check full dump loader
check_sync_diff $WORK_DIR $cur/conf/diff_config_revert_1.toml
check_sync_diff $WORK_DIR $cur/conf/diff_config_revert_2.toml
check_sync_diff $WORK_DIR $cur/conf/diff_config.toml

echo "check dump files have been cleaned"
ls $WORK_DIR/worker1/dumped_data.test && exit 1 || echo "worker1 auto removed dump files"
Expand Down
30 changes: 0 additions & 30 deletions dm/tests/incremental_mode/conf/diff_config_revert_1.toml

This file was deleted.

30 changes: 0 additions & 30 deletions dm/tests/incremental_mode/conf/diff_config_revert_2.toml

This file was deleted.

6 changes: 2 additions & 4 deletions dm/tests/incremental_mode/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ function run() {
sed -i "s/binlog-pos-placeholder-2/4/g" $WORK_DIR/dm-task.yaml
dmctl_start_task $WORK_DIR/dm-task.yaml

check_sync_diff $WORK_DIR $cur/conf/diff_config_revert_1.toml
check_sync_diff $WORK_DIR $cur/conf/diff_config_revert_2.toml
check_sync_diff $WORK_DIR $cur/conf/diff_config.toml

dmctl_stop_task $TASK_NAME

Expand Down Expand Up @@ -266,8 +265,7 @@ function run() {
"resume-task test" \
"\"result\": true" 3

check_sync_diff $WORK_DIR $cur/conf/diff_config_revert_1.toml
check_sync_diff $WORK_DIR $cur/conf/diff_config_revert_2.toml
check_sync_diff $WORK_DIR $cur/conf/diff_config.toml

# test rotate binlog, after rotate and ddl, master binlog should be equal to sync binlog
run_sql "flush logs;" $MYSQL_PORT1 $MYSQL_PASSWORD1
Expand Down

0 comments on commit c540a1a

Please sign in to comment.