Abort RocksDB performance regression test on failure in test setup (#10053)

Summary:
Pull Request resolved: https://github.com/facebook/rocksdb/pull/10053

Need to exit if ldb command fails, to avoid running db_bench on
empty/bad DB and considering the results valid.

Reviewed By: jay-zhuang

Differential Revision: D36673200

fbshipit-source-id: e0d78a0d397e0e335d82d9349bfd612d38ffb552
main
Peter Dillinger 3 years ago committed by Facebook GitHub Bot
parent 356f8c5d81
commit bd170dda03
  1. 2
      tools/regression_test.sh

@ -297,6 +297,7 @@ function build_checkpoint {
echo "Building checkpoints: $ORIGIN_PATH/$db_index -> $DB_PATH/$db_index ..." echo "Building checkpoints: $ORIGIN_PATH/$db_index -> $DB_PATH/$db_index ..."
$cmd_prefix $DB_BENCH_DIR/ldb checkpoint --checkpoint_dir=$DB_PATH/$db_index \ $cmd_prefix $DB_BENCH_DIR/ldb checkpoint --checkpoint_dir=$DB_PATH/$db_index \
--db=$ORIGIN_PATH/$db_index --try_load_options 2>&1 --db=$ORIGIN_PATH/$db_index --try_load_options 2>&1
exit_on_error $?
done done
else else
# checkpoint cannot build in directory already exists # checkpoint cannot build in directory already exists
@ -304,6 +305,7 @@ function build_checkpoint {
echo "Building checkpoint: $ORIGIN_PATH -> $DB_PATH ..." echo "Building checkpoint: $ORIGIN_PATH -> $DB_PATH ..."
$cmd_prefix $DB_BENCH_DIR/ldb checkpoint --checkpoint_dir=$DB_PATH \ $cmd_prefix $DB_BENCH_DIR/ldb checkpoint --checkpoint_dir=$DB_PATH \
--db=$ORIGIN_PATH --try_load_options 2>&1 --db=$ORIGIN_PATH --try_load_options 2>&1
exit_on_error $?
fi fi
} }

Loading…
Cancel
Save