From 18038d163408856dd0ae4f9852e8c228d1ebf8d0 Mon Sep 17 00:00:00 2001 From: fengou1 Date: Fri, 9 Jul 2021 09:40:11 +0800 Subject: [PATCH 1/5] remove br test cases br speed --- tests/br_backup_empty/run.sh | 6 +++--- tests/br_backup_version/run.sh | 4 ++-- tests/br_case_sensitive/run.sh | 2 +- tests/br_clustered_index/run.sh | 2 +- tests/br_db/run.sh | 2 +- tests/br_db_online/run.sh | 2 +- tests/br_db_online_newkv/run.sh | 2 +- tests/br_db_skip/run.sh | 2 +- tests/br_debug_meta/run.sh | 2 +- tests/br_full_ddl/run.sh | 2 +- tests/br_full_index/run.sh | 2 +- tests/br_history/run.sh | 2 +- tests/br_incremental/run.sh | 4 ++-- tests/br_incremental_ddl/run.sh | 4 ++-- tests/br_incremental_index/run.sh | 4 ++-- tests/br_incremental_only_ddl/run.sh | 4 ++-- tests/br_incremental_same_table/run.sh | 4 ++-- tests/br_insert_after_restore/run.sh | 2 +- tests/br_key_locked/run.sh | 2 +- tests/br_move_backup/run.sh | 2 +- tests/br_other/run.sh | 2 +- tests/br_s3/run.sh | 2 -- tests/br_shuffle_leader/run.sh | 2 +- tests/br_shuffle_region/run.sh | 2 +- tests/br_single_table/run.sh | 2 +- tests/br_skip_checksum/run.sh | 2 +- tests/br_split_region_fail/run.sh | 2 +- tests/br_table_partition/run.sh | 2 +- 28 files changed, 35 insertions(+), 37 deletions(-) diff --git a/tests/br_backup_empty/run.sh b/tests/br_backup_empty/run.sh index 25e9480e7..0bee08a0e 100644 --- a/tests/br_backup_empty/run.sh +++ b/tests/br_backup_empty/run.sh @@ -18,7 +18,7 @@ DB="$TEST_NAME" # backup empty. echo "backup start..." -run_br --pd $PD_ADDR backup full -s "local://$TEST_DIR/empty_db" --ratelimit 5 --concurrency 4 +run_br --pd $PD_ADDR backup full -s "local://$TEST_DIR/empty_db" if [ $? -ne 0 ]; then echo "TEST: [$TEST_NAME] failed on backup empty cluster!" exit 1 @@ -41,11 +41,11 @@ run_sql "CREATE TABLE $DB.usertable1 ( \ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;" echo "backup start..." -run_br --pd $PD_ADDR backup full -s "local://$TEST_DIR/empty_table" --ratelimit 5 --concurrency 4 +run_br --pd $PD_ADDR backup full -s "local://$TEST_DIR/empty_table" run_sql "DROP DATABASE $DB;" echo "restore start..." -run_br --pd $PD_ADDR restore full -s "local://$TEST_DIR/empty_table" --ratelimit 5 --concurrency 4 +run_br --pd $PD_ADDR restore full -s "local://$TEST_DIR/empty_table" # insert one row to make sure table is restored. run_sql "INSERT INTO $DB.usertable1 VALUES (\"a\", \"b\");" diff --git a/tests/br_backup_version/run.sh b/tests/br_backup_version/run.sh index c8cbb679a..1c9cb79e7 100644 --- a/tests/br_backup_version/run.sh +++ b/tests/br_backup_version/run.sh @@ -39,7 +39,7 @@ function check_version() { # backup empty using BR echo "backup start..." -run_br --pd $PD_ADDR backup full -s "local://$TEST_DIR/br_version_1" --ratelimit 5 --concurrency 4 +run_br --pd $PD_ADDR backup full -s "local://$TEST_DIR/br_version_1" if [ $? -ne 0 ]; then echo "TEST: [$TEST_NAME] failed on backup empty cluster version!" exit 1 @@ -66,7 +66,7 @@ run_sql "INSERT INTO $DB.usertable1 VALUES (\"a\", \"b\");" # backup tables using BR echo "backup start..." -run_br --pd $PD_ADDR backup full -s "local://$TEST_DIR/br_version_3" --ratelimit 5 --concurrency 4 +run_br --pd $PD_ADDR backup full -s "local://$TEST_DIR/br_version_3" if [ $? -ne 0 ]; then echo "TEST: [$TEST_NAME] failed on backup empty cluster version!" exit 1 diff --git a/tests/br_case_sensitive/run.sh b/tests/br_case_sensitive/run.sh index a02e5865c..c598bc765 100644 --- a/tests/br_case_sensitive/run.sh +++ b/tests/br_case_sensitive/run.sh @@ -29,7 +29,7 @@ run_sql "INSERT INTO $DB.USERTABLE1 VALUES (\"aa\", \"b\");" # backup table with upper name echo "backup start..." -run_br --pd $PD_ADDR backup table --db "$DB" --table "USERTABLE1" -s "local://$TEST_DIR/$DB" --ratelimit 5 --concurrency 4 +run_br --pd $PD_ADDR backup table --db "$DB" --table "USERTABLE1" -s "local://$TEST_DIR/$DB" run_sql "DROP DATABASE $DB;" diff --git a/tests/br_clustered_index/run.sh b/tests/br_clustered_index/run.sh index 86e5ce263..6f47ffc72 100755 --- a/tests/br_clustered_index/run.sh +++ b/tests/br_clustered_index/run.sh @@ -165,7 +165,7 @@ clustered_table_count=$(run_sql "\ # backup table echo "backup start..." -run_br --pd $PD_ADDR backup db -s "local://$TEST_DIR/$DB" --db $DB --ratelimit 5 --concurrency 4 +run_br --pd $PD_ADDR backup db -s "local://$TEST_DIR/$DB" --db $DB # count echo "count rows..." diff --git a/tests/br_db/run.sh b/tests/br_db/run.sh index 54acbea4e..baf5eb5a5 100755 --- a/tests/br_db/run.sh +++ b/tests/br_db/run.sh @@ -40,7 +40,7 @@ run_sql "INSERT INTO $DB.usertable2 VALUES (\"c\", \"d\");" # backup db echo "backup start..." export GO_FAILPOINTS="github.com/pingcap/br/pkg/task/progress-call-back=return(\"$PROGRESS_FILE\")" -run_br --pd $PD_ADDR backup db --db "$DB" -s "local://$TEST_DIR/$DB" --ratelimit 5 --concurrency 4 +run_br --pd $PD_ADDR backup db --db "$DB" -s "local://$TEST_DIR/$DB" export GO_FAILPOINTS="" # check if we use the region unit diff --git a/tests/br_db_online/run.sh b/tests/br_db_online/run.sh index 95c3121d4..17595edea 100755 --- a/tests/br_db_online/run.sh +++ b/tests/br_db_online/run.sh @@ -37,7 +37,7 @@ run_sql "INSERT INTO $DB.usertable2 VALUES (\"c\", \"d\");" # backup db echo "backup start..." -run_br --pd $PD_ADDR backup db --db "$DB" -s "local://$TEST_DIR/$DB" --ratelimit 5 --concurrency 4 +run_br --pd $PD_ADDR backup db --db "$DB" -s "local://$TEST_DIR/$DB" run_sql "DROP DATABASE $DB;" diff --git a/tests/br_db_online_newkv/run.sh b/tests/br_db_online_newkv/run.sh index 107f0655e..c768aaa04 100755 --- a/tests/br_db_online_newkv/run.sh +++ b/tests/br_db_online_newkv/run.sh @@ -37,7 +37,7 @@ run_sql "INSERT INTO $DB.usertable2 VALUES (\"c\", \"d\");" # backup db echo "backup start..." -run_br --pd $PD_ADDR backup db --db "$DB" -s "local://$TEST_DIR/$DB" --ratelimit 5 --concurrency 4 +run_br --pd $PD_ADDR backup db --db "$DB" -s "local://$TEST_DIR/$DB" run_sql "DROP DATABASE $DB;" diff --git a/tests/br_db_skip/run.sh b/tests/br_db_skip/run.sh index e126447c6..20852c4da 100755 --- a/tests/br_db_skip/run.sh +++ b/tests/br_db_skip/run.sh @@ -29,7 +29,7 @@ run_sql "INSERT INTO $DB.usertable1 VALUES (\"aa\", \"b\");" # backup db echo "backup start..." -run_br --pd $PD_ADDR backup db --db "$DB" -s "local://$TEST_DIR/$DB" --ratelimit 5 --concurrency 4 +run_br --pd $PD_ADDR backup db --db "$DB" -s "local://$TEST_DIR/$DB" run_sql "DROP DATABASE $DB;" diff --git a/tests/br_debug_meta/run.sh b/tests/br_debug_meta/run.sh index 181bf3e2d..5274d8298 100644 --- a/tests/br_debug_meta/run.sh +++ b/tests/br_debug_meta/run.sh @@ -32,7 +32,7 @@ row_count_ori=$(run_sql "SELECT COUNT(*) FROM $DB.$TABLE;" | awk '/COUNT/{print # backup table echo "backup start..." -run_br --pd $PD_ADDR backup table --db $DB --table $TABLE -s "local://$TEST_DIR/$DB" --ratelimit 5 --concurrency 4 +run_br --pd $PD_ADDR backup table --db $DB --table $TABLE -s "local://$TEST_DIR/$DB" run_sql "DROP DATABASE $DB;" diff --git a/tests/br_full_ddl/run.sh b/tests/br_full_ddl/run.sh index 4740f7841..bd40ecbaf 100755 --- a/tests/br_full_ddl/run.sh +++ b/tests/br_full_ddl/run.sh @@ -71,7 +71,7 @@ echo "backup start with stats..." unset BR_LOG_TO_TERM cluster_index_before_backup=$(run_sql "show variables like '%cluster%';" | awk '{print $2}') -run_br --pd $PD_ADDR backup full -s "local://$TEST_DIR/$DB" --ratelimit 5 --concurrency 4 --log-file $LOG --ignore-stats=false || cat $LOG +run_br --pd $PD_ADDR backup full -s "local://$TEST_DIR/$DB" --log-file $LOG --ignore-stats=false || cat $LOG checksum_count=$(cat $LOG | grep "checksum success" | wc -l | xargs) if [ "${checksum_count}" -lt "1" ];then diff --git a/tests/br_full_index/run.sh b/tests/br_full_index/run.sh index 6d54f91f6..9b0364f2c 100755 --- a/tests/br_full_index/run.sh +++ b/tests/br_full_index/run.sh @@ -39,7 +39,7 @@ echo "backup start..." # Do not log to terminal unset BR_LOG_TO_TERM # do not backup stats to test whether we can restore without stats. -run_br --pd $PD_ADDR backup full -s "local://$TEST_DIR/$DB" --ignore-stats=true --ratelimit 5 --concurrency 4 --log-file $LOG || cat $LOG +run_br --pd $PD_ADDR backup full -s "local://$TEST_DIR/$DB" --ignore-stats=true --log-file $LOG || cat $LOG BR_LOG_TO_TERM=1 checksum_count=$(cat $LOG | grep "checksum success" | wc -l | xargs) diff --git a/tests/br_history/run.sh b/tests/br_history/run.sh index 8ab4c7057..7021426c7 100755 --- a/tests/br_history/run.sh +++ b/tests/br_history/run.sh @@ -38,7 +38,7 @@ done # We expect above DDLs finish within 10s. # history backup full echo "backup start..." -run_br --pd $PD_ADDR backup full -s "local://$TEST_DIR/$DB" --ratelimit 5 --concurrency 4 --timeago "10s" +run_br --pd $PD_ADDR backup full -s "local://$TEST_DIR/$DB" --timeago "10s" # restore full echo "restore start..." diff --git a/tests/br_incremental/run.sh b/tests/br_incremental/run.sh index f5d77bbc2..e76df13f8 100755 --- a/tests/br_incremental/run.sh +++ b/tests/br_incremental/run.sh @@ -24,14 +24,14 @@ row_count_ori_full=$(run_sql "SELECT COUNT(*) FROM $DB.$TABLE;" | awk '/COUNT/{p # full backup echo "full backup start..." -run_br --pd $PD_ADDR backup table -s "local://$TEST_DIR/$DB/full" --db $DB -t $TABLE --ratelimit 5 --concurrency 4 +run_br --pd $PD_ADDR backup table -s "local://$TEST_DIR/$DB/full" --db $DB -t $TABLE go-ycsb run mysql -P tests/$TEST_NAME/workload -p mysql.host=$TIDB_IP -p mysql.port=$TIDB_PORT -p mysql.user=root -p mysql.db=$DB # incremental backup echo "incremental backup start..." last_backup_ts=$(run_br validate decode --field="end-version" -s "local://$TEST_DIR/$DB/full" | grep -oE "^[0-9]+") -run_br --pd $PD_ADDR backup table -s "local://$TEST_DIR/$DB/inc" --db $DB -t $TABLE --ratelimit 5 --concurrency 4 --lastbackupts $last_backup_ts +run_br --pd $PD_ADDR backup table -s "local://$TEST_DIR/$DB/inc" --db $DB -t $TABLE --lastbackupts $last_backup_ts row_count_ori_inc=$(run_sql "SELECT COUNT(*) FROM $DB.$TABLE;" | awk '/COUNT/{print $2}') run_sql "DROP DATABASE $DB;" diff --git a/tests/br_incremental_ddl/run.sh b/tests/br_incremental_ddl/run.sh index 360d115b0..e9317d7f3 100755 --- a/tests/br_incremental_ddl/run.sh +++ b/tests/br_incremental_ddl/run.sh @@ -31,7 +31,7 @@ done # full backup echo "full backup start..." -run_br --pd $PD_ADDR backup table -s "local://$TEST_DIR/$DB/full" --db $DB -t $TABLE --ratelimit 5 --concurrency 4 +run_br --pd $PD_ADDR backup table -s "local://$TEST_DIR/$DB/full" --db $DB -t $TABLE # run ddls echo "run ddls..." run_sql "RENAME TABLE ${DB}.${TABLE} to ${DB}.${TABLE}1;" @@ -48,7 +48,7 @@ done # incremental backup echo "incremental backup start..." last_backup_ts=$(run_br validate decode --field="end-version" -s "local://$TEST_DIR/$DB/full" | grep -oE "^[0-9]+") -run_br --pd $PD_ADDR backup table -s "local://$TEST_DIR/$DB/inc" --db $DB -t $TABLE --ratelimit 5 --concurrency 4 --lastbackupts $last_backup_ts +run_br --pd $PD_ADDR backup table -s "local://$TEST_DIR/$DB/inc" --db $DB -t $TABLE --lastbackupts $last_backup_ts run_sql "DROP DATABASE $DB;" # full restore diff --git a/tests/br_incremental_index/run.sh b/tests/br_incremental_index/run.sh index 5397e6262..c0943531f 100755 --- a/tests/br_incremental_index/run.sh +++ b/tests/br_incremental_index/run.sh @@ -32,7 +32,7 @@ done # full backup echo "backup full start..." run_sql "CREATE INDEX idx_c1 ON ${DB}.${TABLE}(c1)" -run_br --pd $PD_ADDR backup full -s "local://$TEST_DIR/$DB/full" --ratelimit 5 --concurrency 4 +run_br --pd $PD_ADDR backup full -s "local://$TEST_DIR/$DB/full" wait # run ddls echo "run ddls..." @@ -42,7 +42,7 @@ run_sql "ALTER TABLE ${DB}.${TABLE} DROP COLUMN c3;"; # incremental backup echo "incremental backup start..." last_backup_ts=$(run_br validate decode --field="end-version" -s "local://$TEST_DIR/$DB/full" | grep -oE "^[0-9]+") -run_br --pd $PD_ADDR backup table -s "local://$TEST_DIR/$DB/inc" --db $DB -t $TABLE --ratelimit 5 --concurrency 4 --lastbackupts $last_backup_ts +run_br --pd $PD_ADDR backup table -s "local://$TEST_DIR/$DB/inc" --db $DB -t $TABLE ---lastbackupts $last_backup_ts run_sql "DROP DATABASE $DB;" # full restore diff --git a/tests/br_incremental_only_ddl/run.sh b/tests/br_incremental_only_ddl/run.sh index 7d553291f..645a402af 100755 --- a/tests/br_incremental_only_ddl/run.sh +++ b/tests/br_incremental_only_ddl/run.sh @@ -31,7 +31,7 @@ done # full backup echo "full backup start..." -run_br --pd $PD_ADDR backup table -s "local://$TEST_DIR/$DB/full" --db $DB -t $TABLE --ratelimit 5 --concurrency 4 +run_br --pd $PD_ADDR backup table -s "local://$TEST_DIR/$DB/full" --db $DB -t $TABLE # run ddls echo "run ddls..." run_sql "RENAME TABLE ${DB}.${TABLE} to ${DB}.${TABLE}1;" @@ -45,7 +45,7 @@ run_sql "TRUNCATE TABLE ${DB}.${TABLE};" # incremental backup echo "incremental backup start..." last_backup_ts=$(run_br validate decode --field="end-version" -s "local://$TEST_DIR/$DB/full" | grep -oE "^[0-9]+") -run_br --pd $PD_ADDR backup table -s "local://$TEST_DIR/$DB/inc" --db $DB -t $TABLE --ratelimit 5 --concurrency 4 --lastbackupts $last_backup_ts +run_br --pd $PD_ADDR backup table -s "local://$TEST_DIR/$DB/inc" --db $DB -t $TABLE --lastbackupts $last_backup_ts run_sql "DROP DATABASE $DB;" diff --git a/tests/br_incremental_same_table/run.sh b/tests/br_incremental_same_table/run.sh index 27ecd5976..d7850838c 100755 --- a/tests/br_incremental_same_table/run.sh +++ b/tests/br_incremental_same_table/run.sh @@ -33,7 +33,7 @@ done # full backup echo "full backup start..." -run_br --pd $PD_ADDR backup full -s "local://$TEST_DIR/$DB/full" --ratelimit 5 --concurrency 4 +run_br --pd $PD_ADDR backup full -s "local://$TEST_DIR/$DB/full" # run ddls # create 3 databases, each db has one table with same name @@ -51,7 +51,7 @@ done # incremental backup echo "incremental backup start..." last_backup_ts=$(run_br validate decode --field="end-version" -s "local://$TEST_DIR/$DB/full" | grep -oE "^[0-9]+") -run_br --pd $PD_ADDR backup full -s "local://$TEST_DIR/$DB/inc" --ratelimit 5 --concurrency 4 --lastbackupts $last_backup_ts +run_br --pd $PD_ADDR backup full -s "local://$TEST_DIR/$DB/inc" --lastbackupts $last_backup_ts # cleanup env run_sql "DROP DATABASE $DB;" diff --git a/tests/br_insert_after_restore/run.sh b/tests/br_insert_after_restore/run.sh index 3cfaef229..d6c0632b4 100755 --- a/tests/br_insert_after_restore/run.sh +++ b/tests/br_insert_after_restore/run.sh @@ -41,7 +41,7 @@ row_count_ori=$(run_sql "SELECT COUNT(*) FROM $DB.$TABLE;" | awk '/COUNT/{print # backup full echo "backup start..." -run_br --pd $PD_ADDR backup full -s "local://$TEST_DIR/$DB" --ratelimit 5 --concurrency 4 +run_br --pd $PD_ADDR backup full -s "local://$TEST_DIR/$DB" run_sql "DROP DATABASE $DB;" diff --git a/tests/br_key_locked/run.sh b/tests/br_key_locked/run.sh index 374b277c3..f0608f14e 100755 --- a/tests/br_key_locked/run.sh +++ b/tests/br_key_locked/run.sh @@ -35,7 +35,7 @@ bin/locker \ # backup table echo "backup start..." -run_br --pd $PD_ADDR backup table -s "local://$TEST_DIR/$DB" --db $DB -t $TABLE --ratelimit 5 --concurrency 4 +run_br --pd $PD_ADDR backup table -s "local://$TEST_DIR/$DB" --db $DB -t $TABLE run_sql "DROP TABLE $DB.$TABLE;" diff --git a/tests/br_move_backup/run.sh b/tests/br_move_backup/run.sh index d71b05dd0..c426a62e7 100755 --- a/tests/br_move_backup/run.sh +++ b/tests/br_move_backup/run.sh @@ -25,7 +25,7 @@ row_count_ori=$(run_sql "SELECT COUNT(*) FROM $DB.$TABLE;" | awk '/COUNT/{print # backup table echo "backup start..." -run_br --pd $PD_ADDR backup table -s "local://$TEST_DIR/$DB" --db $DB -t $TABLE --ratelimit 5 --concurrency 4 +run_br --pd $PD_ADDR backup table -s "local://$TEST_DIR/$DB" --db $DB -t $TABLE run_sql "DROP TABLE $DB.$TABLE;" diff --git a/tests/br_other/run.sh b/tests/br_other/run.sh index 8eaa5b40e..c4d75eaa5 100644 --- a/tests/br_other/run.sh +++ b/tests/br_other/run.sh @@ -31,7 +31,7 @@ done # backup full echo "backup start..." -run_br --pd $PD_ADDR backup full -s "local://$TEST_DIR/$DB" --ratelimit 5 --concurrency 4 +run_br --pd $PD_ADDR backup full -s "local://$TEST_DIR/$DB" # Test debug decode run_br -s "local://$TEST_DIR/$DB" debug decode --field "Schemas" diff --git a/tests/br_s3/run.sh b/tests/br_s3/run.sh index f2772a62e..959aa83f4 100755 --- a/tests/br_s3/run.sh +++ b/tests/br_s3/run.sh @@ -78,7 +78,6 @@ for p in $(seq 2); do unset BR_LOG_TO_TERM ( GO_FAILPOINTS="github.com/pingcap/br/pkg/task/s3-outage-during-writing-file=1*return(\"$sig_file\")" \ run_br --pd $PD_ADDR backup full -s "s3://mybucket/$DB?endpoint=http://$S3_ENDPOINT$S3_KEY" \ - --ratelimit 1 \ --log-file $BACKUP_LOG || \ ( cat $BACKUP_LOG && BR_LOG_TO_TERM=1 && exit 1 ) ) & br_pid=$! @@ -111,7 +110,6 @@ for p in $(seq 2); do rm -f $RESTORE_LOG unset BR_LOG_TO_TERM ( run_br restore full -s "s3://mybucket/$DB?$S3_KEY" --pd $PD_ADDR --s3.endpoint="http://$S3_ENDPOINT" \ - --ratelimit 1 \ --log-file $RESTORE_LOG || \ ( cat $RESTORE_LOG && BR_LOG_TO_TERM=1 && exit 1 ) ) & br_pid=$! diff --git a/tests/br_shuffle_leader/run.sh b/tests/br_shuffle_leader/run.sh index 2ed4ffa80..156f9c394 100755 --- a/tests/br_shuffle_leader/run.sh +++ b/tests/br_shuffle_leader/run.sh @@ -28,7 +28,7 @@ run_pd_ctl -u https://$PD_ADDR sched add shuffle-leader-scheduler # backup with shuffle leader echo "backup start..." -run_br --pd $PD_ADDR backup table -s "local://$TEST_DIR/$DB" --db $DB -t $TABLE --ratelimit 1 --concurrency 4 +run_br --pd $PD_ADDR backup table -s "local://$TEST_DIR/$DB" --db $DB -t $TABLE run_sql "DROP TABLE $DB.$TABLE;" diff --git a/tests/br_shuffle_region/run.sh b/tests/br_shuffle_region/run.sh index 3bf10420a..42dc7132f 100755 --- a/tests/br_shuffle_region/run.sh +++ b/tests/br_shuffle_region/run.sh @@ -29,7 +29,7 @@ run_pd_ctl -u https://$PD_ADDR sched add shuffle-region-scheduler # backup with shuffle region echo "backup start..." -run_br --pd $PD_ADDR backup table -s "local://$TEST_DIR/$DB" --db $DB -t $TABLE --ratelimit 1 --concurrency 4 +run_br --pd $PD_ADDR backup table -s "local://$TEST_DIR/$DB" --db $DB -t $TABLE run_sql "DROP TABLE $DB.$TABLE;" diff --git a/tests/br_single_table/run.sh b/tests/br_single_table/run.sh index c51799b0a..92c5f91fd 100755 --- a/tests/br_single_table/run.sh +++ b/tests/br_single_table/run.sh @@ -25,7 +25,7 @@ row_count_ori=$(run_sql "SELECT COUNT(*) FROM $DB.$TABLE;" | awk '/COUNT/{print # backup table echo "backup start..." -run_br --pd $PD_ADDR backup table -s "local://$TEST_DIR/$DB" --db $DB -t $TABLE --ratelimit 5 --concurrency 4 +run_br --pd $PD_ADDR backup table -s "local://$TEST_DIR/$DB" --db $DB -t $TABLE run_sql "DROP TABLE $DB.$TABLE;" diff --git a/tests/br_skip_checksum/run.sh b/tests/br_skip_checksum/run.sh index a22ac3498..2e66f6765 100755 --- a/tests/br_skip_checksum/run.sh +++ b/tests/br_skip_checksum/run.sh @@ -29,7 +29,7 @@ done # backup full, skipping generate checksum. echo "backup start..." -run_br --pd $PD_ADDR backup full -s "local://$TEST_DIR/$DB" --ratelimit 5 --concurrency 4 --checksum=false +run_br --pd $PD_ADDR backup full -s "local://$TEST_DIR/$DB" --checksum=false for i in $(seq $DB_COUNT); do run_sql "DROP DATABASE $DB${i};" diff --git a/tests/br_split_region_fail/run.sh b/tests/br_split_region_fail/run.sh index 84126eb98..77fac52a7 100644 --- a/tests/br_split_region_fail/run.sh +++ b/tests/br_split_region_fail/run.sh @@ -31,7 +31,7 @@ done # backup full echo "backup start..." -run_br --pd $PD_ADDR backup full -s "local://$TEST_DIR/$DB" --ratelimit 5 --concurrency 4 +run_br --pd $PD_ADDR backup full -s "local://$TEST_DIR/$DB" rm -f $LOG diff --git a/tests/br_table_partition/run.sh b/tests/br_table_partition/run.sh index f29726f63..a89968aaf 100755 --- a/tests/br_table_partition/run.sh +++ b/tests/br_table_partition/run.sh @@ -31,7 +31,7 @@ done # backup full echo "backup start..." -run_br --pd $PD_ADDR backup full -s "local://$TEST_DIR/$DB" --ratelimit 5 --concurrency 4 +run_br --pd $PD_ADDR backup full -s "local://$TEST_DIR/$DB" run_sql "DROP DATABASE $DB;" From ef84dcbcb748bba9f76fce4bc33d66ffaad58e0c Mon Sep 17 00:00:00 2001 From: 3pointer Date: Mon, 12 Jul 2021 17:40:01 +0800 Subject: [PATCH 2/5] fix typo --- tests/br_incremental_index/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/br_incremental_index/run.sh b/tests/br_incremental_index/run.sh index c0943531f..19380a7d4 100755 --- a/tests/br_incremental_index/run.sh +++ b/tests/br_incremental_index/run.sh @@ -42,7 +42,7 @@ run_sql "ALTER TABLE ${DB}.${TABLE} DROP COLUMN c3;"; # incremental backup echo "incremental backup start..." last_backup_ts=$(run_br validate decode --field="end-version" -s "local://$TEST_DIR/$DB/full" | grep -oE "^[0-9]+") -run_br --pd $PD_ADDR backup table -s "local://$TEST_DIR/$DB/inc" --db $DB -t $TABLE ---lastbackupts $last_backup_ts +run_br --pd $PD_ADDR backup table -s "local://$TEST_DIR/$DB/inc" --db $DB -t $TABLE --lastbackupts $last_backup_ts run_sql "DROP DATABASE $DB;" # full restore From 690bc9feedc17eee47e53c00e9c43deffbee5a36 Mon Sep 17 00:00:00 2001 From: 3pointer Date: Tue, 13 Jul 2021 19:39:27 +0800 Subject: [PATCH 3/5] revert br_s3 restore speed limitation since it does matter in the case --- tests/br_s3/run.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/br_s3/run.sh b/tests/br_s3/run.sh index 959aa83f4..d8d4010bc 100755 --- a/tests/br_s3/run.sh +++ b/tests/br_s3/run.sh @@ -111,6 +111,7 @@ for p in $(seq 2); do unset BR_LOG_TO_TERM ( run_br restore full -s "s3://mybucket/$DB?$S3_KEY" --pd $PD_ADDR --s3.endpoint="http://$S3_ENDPOINT" \ --log-file $RESTORE_LOG || \ + --ratelimit 1 \ ( cat $RESTORE_LOG && BR_LOG_TO_TERM=1 && exit 1 ) ) & br_pid=$! # Make a S3 outage. From 8e3a1726d727f1d84926403c7ec710df0f3ead72 Mon Sep 17 00:00:00 2001 From: fengou1 Date: Wed, 14 Jul 2021 13:58:32 +0800 Subject: [PATCH 4/5] fix command grammar issue --- tests/br_s3/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/br_s3/run.sh b/tests/br_s3/run.sh index d8d4010bc..a433b0d10 100755 --- a/tests/br_s3/run.sh +++ b/tests/br_s3/run.sh @@ -110,8 +110,8 @@ for p in $(seq 2); do rm -f $RESTORE_LOG unset BR_LOG_TO_TERM ( run_br restore full -s "s3://mybucket/$DB?$S3_KEY" --pd $PD_ADDR --s3.endpoint="http://$S3_ENDPOINT" \ - --log-file $RESTORE_LOG || \ --ratelimit 1 \ + --log-file $RESTORE_LOG || \ ( cat $RESTORE_LOG && BR_LOG_TO_TERM=1 && exit 1 ) ) & br_pid=$! # Make a S3 outage. From 580a3c7d365b42e2246cfc9e76d908a8a6357a0b Mon Sep 17 00:00:00 2001 From: fengou1 Date: Fri, 16 Jul 2021 11:45:33 +0800 Subject: [PATCH 5/5] print error log int to log file instead of terminal --- pkg/restore/systable_restore.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/restore/systable_restore.go b/pkg/restore/systable_restore.go index 43677c407..8f700ca51 100644 --- a/pkg/restore/systable_restore.go +++ b/pkg/restore/systable_restore.go @@ -91,7 +91,7 @@ func (rc *Client) RestoreSystemSchemas(ctx context.Context, f filter.Filter) { tableName := table.Info.Name if f.MatchTable(sysDB, tableName.O) { if err := rc.replaceTemporaryTableToSystable(ctx, tableName.L, db); err != nil { - logutil.WarnTerm("error during merging temporary tables into system tables", + log.Warn("error during merging temporary tables into system tables", logutil.ShortError(err), zap.Stringer("table", tableName), ) @@ -101,7 +101,7 @@ func (rc *Client) RestoreSystemSchemas(ctx context.Context, f filter.Filter) { } if err := rc.afterSystemTablesReplaced(ctx, tablesRestored); err != nil { for _, e := range multierr.Errors(err) { - logutil.WarnTerm("error during reconfigurating the system tables", zap.String("database", sysDB), logutil.ShortError(e)) + log.Warn("error during reconfigurating the system tables", zap.String("database", sysDB), logutil.ShortError(e)) } } }