Skip to content

Commit

Permalink
--wip-- [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
lance6716 committed May 7, 2022
1 parent 3e8e246 commit bfe4269
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
3 changes: 2 additions & 1 deletion dm/tests/many_tables/conf/source1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ from:
password: /Q7B9DizNLLTTfiZHv9WoEAKamfpIUs=
port: 3306
checker:
check-enable: false
check-enable: true
backoff-max: 1s
28 changes: 27 additions & 1 deletion dm/tests/many_tables/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ function incremental_data() {
done
}

function incremental_data_2() {
j=6
for i in $(seq $TABLE_NUM); do
run_sql "INSERT INTO many_tables_db.t$i VALUES ($j,${j}000$j);" $MYSQL_PORT1 $MYSQL_PASSWORD1
done
}

function run() {
echo "start prepare_data"
prepare_data
Expand Down Expand Up @@ -72,8 +79,27 @@ function run() {
echo "start incremental_data"
incremental_data
echo "finish incremental_data"

check_sync_diff $WORK_DIR $cur/conf/diff_config.toml

# test https://github.com/pingcap/tiflow/issues/5344
kill_dm_worker
# let some binlog event save table checkpoint before meet downstream error
export GO_FAILPOINTS='github.com/pingcap/tiflow/dm/syncer/BlockExecuteSQLs=return(1)'
run_dm_worker $WORK_DIR/worker1 $WORKER1_PORT $cur/conf/dm-worker1.toml
check_rpc_alive $cur/../bin/check_worker_online 127.0.0.1:$WORKER1_PORT
run_sql_source1 "CREATE TABLE many_tables_db.flush (c INT PRIMARY KEY);"
run_dm_ctl_with_retry $WORK_DIR "127.0.0.1:$MASTER_PORT" \
"query-status test" \
'"synced": true' 1

pkill -hup tidb-server 2>/dev/null || true
wait_process_exit tidb-server

incremental_data_2
sleep 20
[ 1 == 0]

export GO_FAILPOINTS=''
}

cleanup_data many_tables_db
Expand Down

0 comments on commit bfe4269

Please sign in to comment.