This is an automated email from the ASF dual-hosted git repository. kxiao pushed a commit to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/doris.git
commit a1d8c4eaf37ef7c88abc939ca79a9947d503981a Author: minghong <[email protected]> AuthorDate: Sat Oct 7 23:13:46 2023 +0800 [Fix](replayer) Fix `FE` crash when replaying analysis logs. (#25024) Issue Number: close #25023 The detail of this bug has been described at the above issue. We can check if current FE is a master node to avoid such problems. --- tools/tpcds-tools/bin/create-tpcds-tables.sh | 19 +++++++++++++++++-- ...e-tpcds-tables.sql => create-tpcds-tables-sf1.sql} | 0 tools/tpch-tools/bin/create-tpch-tables.sh | 5 +++-- tools/tpch-tools/conf/doris-cluster.conf | 2 +- ...ate-tpch-tables.sql => create-tpch-tables-sf1.sql} | 0 5 files changed, 21 insertions(+), 5 deletions(-) diff --git a/tools/tpcds-tools/bin/create-tpcds-tables.sh b/tools/tpcds-tools/bin/create-tpcds-tables.sh index a7808023d79..496f71fee7b 100755 --- a/tools/tpcds-tools/bin/create-tpcds-tables.sh +++ b/tools/tpcds-tools/bin/create-tpcds-tables.sh @@ -46,6 +46,7 @@ OPTS=$(getopt \ eval set -- "${OPTS}" HELP=0 +SCALE_FACTOR=100 if [[ $# == 0 ]]; then usage @@ -90,11 +91,25 @@ echo "FE_HOST: ${FE_HOST}" echo "FE_QUERY_PORT: ${FE_QUERY_PORT}" echo "USER: ${USER}" echo "DB: ${DB}" +echo "SF: ${SCALE_FACTOR}" mysql -h"${FE_HOST}" -u"${USER}" -P"${FE_QUERY_PORT}" -e "DROP DATABASE IF EXISTS ${DB}" mysql -h"${FE_HOST}" -u"${USER}" -P"${FE_QUERY_PORT}" -e "CREATE DATABASE ${DB}" -echo "Run SQLs from ${CURDIR}/../ddl/create-tpcds-tables.sql" -mysql -h"${FE_HOST}" -u"${USER}" -P"${FE_QUERY_PORT}" -D"${DB}" <"${CURDIR}"/../ddl/create-tpcds-tables.sql +if [[ ${SCALE_FACTOR} -eq 1 ]]; then + echo "Run SQLs from ${CURDIR}/../ddl/create-tpcds-tables.sql" + mysql -h"${FE_HOST}" -u"${USER}" -P"${FE_QUERY_PORT}" -D"${DB}" <"${CURDIR}"/../ddl/create-tpcds-tables-sf1.sql +elif [[ ${SCALE_FACTOR} -eq 100 ]]; then + echo "Run SQLs from ${CURDIR}/../ddl/create-tpcds-tables-sf100.sql" + mysql -h"${FE_HOST}" -u"${USER}" -P"${FE_QUERY_PORT}" -D"${DB}" <"${CURDIR}"/../ddl/create-tpcds-tables-sf100.sql +elif [[ ${SCALE_FACTOR} -eq 1000 ]]; then + echo "Run SQLs from ${CURDIR}/../ddl/create-tpcds-tables-sf1000.sql" + mysql -h"${FE_HOST}" -u"${USER}" -P"${FE_QUERY_PORT}" -D"${DB}" <"${CURDIR}"/../ddl/create-tpcds-tables-sf1000.sql +elif [[ ${SCALE_FACTOR} -eq 10000 ]]; then + echo "Run SQLs from ${CURDIR}/../ddl/create-tpcds-tables-sf10000.sql" + mysql -h"${FE_HOST}" -u"${USER}" -P"${FE_QUERY_PORT}" -D"${DB}" <"${CURDIR}"/../ddl/create-tpcds-tables-sf10000.sql +else + echo "${SCALE_FACTOR} scale is NOT supported currently" +fi echo "tpcds tables has been created" diff --git a/tools/tpcds-tools/ddl/create-tpcds-tables.sql b/tools/tpcds-tools/ddl/create-tpcds-tables-sf1.sql similarity index 100% rename from tools/tpcds-tools/ddl/create-tpcds-tables.sql rename to tools/tpcds-tools/ddl/create-tpcds-tables-sf1.sql diff --git a/tools/tpch-tools/bin/create-tpch-tables.sh b/tools/tpch-tools/bin/create-tpch-tables.sh index 9c494a87cc8..8b9635a4cee 100755 --- a/tools/tpch-tools/bin/create-tpch-tables.sh +++ b/tools/tpch-tools/bin/create-tpch-tables.sh @@ -47,7 +47,7 @@ OPTS=$(getopt \ eval set -- "${OPTS}" HELP=0 -SCALE_FACTOR=1 +SCALE_FACTOR=100 if [[ $# == 0 ]]; then usage @@ -101,12 +101,13 @@ echo "FE_HOST: ${FE_HOST}" echo "FE_QUERY_PORT: ${FE_QUERY_PORT}" echo "USER: ${USER}" echo "DB: ${DB}" +echo "SF: ${SCALE_FACTOR}" mysql -h"${FE_HOST}" -u"${USER}" -P"${FE_QUERY_PORT}" -e "CREATE DATABASE IF NOT EXISTS ${DB}" if [[ ${SCALE_FACTOR} -eq 1 ]]; then echo "Run SQLs from ${CURDIR}/../ddl/create-tpch-tables.sql" - mysql -h"${FE_HOST}" -u"${USER}" -P"${FE_QUERY_PORT}" -D"${DB}" <"${CURDIR}"/../ddl/create-tpch-tables.sql + mysql -h"${FE_HOST}" -u"${USER}" -P"${FE_QUERY_PORT}" -D"${DB}" <"${CURDIR}"/../ddl/create-tpch-tables-sf1.sql elif [[ ${SCALE_FACTOR} -eq 100 ]]; then echo "Run SQLs from ${CURDIR}/../ddl/create-tpch-tables-sf100.sql" mysql -h"${FE_HOST}" -u"${USER}" -P"${FE_QUERY_PORT}" -D"${DB}" <"${CURDIR}"/../ddl/create-tpch-tables-sf100.sql diff --git a/tools/tpch-tools/conf/doris-cluster.conf b/tools/tpch-tools/conf/doris-cluster.conf index b2f6d411254..9417bcb9e0a 100644 --- a/tools/tpch-tools/conf/doris-cluster.conf +++ b/tools/tpch-tools/conf/doris-cluster.conf @@ -26,4 +26,4 @@ export USER='root' # Doris password export PASSWORD='' # The database where TPC-H tables located -export DB='tpch1G' +export DB='tpch' diff --git a/tools/tpch-tools/ddl/create-tpch-tables.sql b/tools/tpch-tools/ddl/create-tpch-tables-sf1.sql similarity index 100% rename from tools/tpch-tools/ddl/create-tpch-tables.sql rename to tools/tpch-tools/ddl/create-tpch-tables-sf1.sql --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
