[Commits] f49f210: Added support for running the benchmark without secondary index
revision-id: f49f210a200b07195e9280d7866c2c73d3a51e71 () parent(s): 878952d1488d7646d870bd6e6e0752cb69ada1b1 author: Sergei Petrunia committer: Sergei Petrunia timestamp: 2020-04-01 20:12:10 +0300 message: Added support for running the benchmark without secondary index --- run-all-one-index.sh | 12 ++++++++++++ run-test.sh | 22 ++++++++++++++++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/run-all-one-index.sh b/run-all-one-index.sh new file mode 100755 index 0000000..7cc1d42 --- /dev/null +++ b/run-all-one-index.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +#./setup.sh + +echo "rocksdb_use_range_locking=1" >> my-fbmysql-range-locking.cnf + +./run-test.sh -e -m orig 01-orig +./run-test.sh -e -m range-locking 02-range-locking + +./summarize-result.sh 01-orig +./summarize-result.sh 02-range-locking + diff --git a/run-test.sh b/run-test.sh index ef68cb1..248db6b 100755 --- a/run-test.sh +++ b/run-test.sh @@ -1,18 +1,19 @@ #!/bin/bash usage () { -echo "Usage: $0 [-p] [-m] [-c] [-d] server_name test_run_name" +echo "Usage: $0 [-p] [-m] [-c] [-d] [-e] server_name test_run_name" echo " -p - Use perf for profiling" echo " -m - Put datadir on /dev/shm" echo " -c - Assume sysbench uses 4 tables and move them to different CFs." echo " -d - Same but use 2 CFs" +echo " -e - Remove the secondary index" } ### ### Parse options ### -while getopts ":pmcd" opt; do +while getopts ":pmcde" opt; do case ${opt} in p ) USE_PERF=1 ;; @@ -22,6 +23,8 @@ while getopts ":pmcd" opt; do ;; d ) USE_2_CFS=1 ;; + e ) DROP_SECONDARY_INDEX=1 + ;; \? ) usage; exit 1 @@ -178,6 +181,21 @@ if [[ $USE_2_CFS ]] ; then $MYSQL_CMD < make-2-cfs.sql fi +if [[ $DROP_SECONDARY_INDEX ]]; then + if [[ $USE_4_CFS ]]; then + echo "DROP_SECONDARY_INDEX and USE_4_CFS are not supported" + exit 1 + fi + if [[ $USE_2_CFS ]]; then + echo "DROP_SECONDARY_INDEX and USE_2_CFS are not supported" + exit 1 + fi + + echo "Dropping the secondary index" + echo "alter table sbtest.sbtest1 drop key k_1" | $MYSQL_CMD + echo "show create table sbtest.sbtest1" | $MYSQL_CMD +fi + sleep 3 $MYSQL_CMD -e "show variables like 'rocksdb%'" > $RESULT_DIR/variables-rocksdb.txt
participants (1)
-
psergey