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
This commit is contained in:
Peter Dillinger 2022-05-25 13:35:08 -07:00 committed by Facebook GitHub Bot
parent 356f8c5d81
commit bd170dda03
1 changed files with 2 additions and 0 deletions

View File

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