Skip to content

Commit

Permalink
br: fix unstable test br_300_small_tables (#46560)
Browse files Browse the repository at this point in the history
close #46561
  • Loading branch information
purelind authored Aug 31, 2023
1 parent 9c82229 commit dba010d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions br/tests/br_300_small_tables/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ unset BR_LOG_TO_TERM
rm -f $BACKUPMETAV2_LOG
export GO_FAILPOINTS="github.com/pingcap/tidb/br/pkg/task/progress-call-back=return(\"$PROGRESS_FILE\")"
run_br backup db --db "$DB" --log-file $BACKUPMETAV2_LOG -s "local://$TEST_DIR/${DB}v2" --pd $PD_ADDR --use-backupmeta-v2
backupv2_size=`grep "backup-data-size" "${BACKUPMETAV2_LOG}" | grep -oP '\[\K[^\]]+' | grep "backup-data-size" | awk -F '=' '{print $2}' | grep -oP '\d*\.\d+'`
backupv2_size=`grep "backup-data-size" "${BACKUPMETAV2_LOG}" | grep -oP '\[\K[^\]]+' | grep "backup-data-size" | awk -F '=' '{print $2}' | grep -oP '\d*\.?\d+'`
echo "backup meta v2 backup size is ${backupv2_size}"
export GO_FAILPOINTS=""

Expand All @@ -61,7 +61,7 @@ rm -rf $PROGRESS_FILE
echo "backup meta v1 start..."
rm -f $BACKUPMETAV1_LOG
run_br backup db --db "$DB" --log-file $BACKUPMETAV1_LOG -s "local://$TEST_DIR/$DB" --pd $PD_ADDR
backupv1_size=`grep "backup-data-size" "${BACKUPMETAV1_LOG}" | grep -oP '\[\K[^\]]+' | grep "backup-data-size" | awk -F '=' '{print $2}' | grep -oP '\d*\.\d+'`
backupv1_size=`grep "backup-data-size" "${BACKUPMETAV1_LOG}" | grep -oP '\[\K[^\]]+' | grep "backup-data-size" | awk -F '=' '{print $2}' | grep -oP '\d*\.?\d+'`
echo "backup meta v1 backup size is ${backupv1_size}"


Expand All @@ -83,7 +83,7 @@ done
rm -rf $RESTORE_LOG
echo "restore 1/300 of the table start..."
run_br restore table --db $DB --table "sbtest100" --log-file $RESTORE_LOG -s "local://$TEST_DIR/$DB" --pd $PD_ADDR --no-schema
restore_size=`grep "restore-data-size" "${RESTORE_LOG}" | grep -oP '\[\K[^\]]+' | grep "restore-data-size" | awk -F '=' '{print $2}' | grep -oP '\d*\.\d+'`
restore_size=`grep "restore-data-size" "${RESTORE_LOG}" | grep -oP '\[\K[^\]]+' | grep "restore-data-size" | awk -F '=' '{print $2}' | grep -oP '\d*\.?\d+'`
echo "restore data size is ${restore_size}"

diff=$(calc "$backupv2_size-$restore_size*$TABLES_COUNT")
Expand Down

0 comments on commit dba010d

Please sign in to comment.