From 921f388077c47bc18d3900cfdbd36f95c2bd6857 Mon Sep 17 00:00:00 2001 From: BaoLiang <29528966+lenboo@users.noreply.github.com> Date: Sun, 12 Dec 2021 00:55:31 +0800 Subject: [PATCH] [FIX-7338] set h2 for default DATABASE_TYPE for standalone-server (#7339) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [Bug] [dolphinscheduler-api] The pages of project management, workflow instance and task instance are accessed slowly #7061 (#7139) 1、I found that the SQL behind this interface is very slow. The main table is large, but there is no index to use. By add the index, the all mode in the query plan can be changed into a more efficient ref mode. If this optimization still fails to meet the requirements, please contact me and I will continue to optimize。 2、modify index start_time_index in init script and upgrade scripts. * [BUG][SQL] fix the process list page load slowly. (#7166) * fix #7601 move ddl to 2.0.1 * fix #7601 move ddl to 2.0.1 * [2.0.1] remove unused foreign_key * [2.0.1] add version in sql * [2.0.1] change serial for postgre * [2.0.1] set h2 for default DATABASE_TYPE for standalone-server Co-authored-by: GaoTianDuo --- .../src/main/resources/config/install_config.conf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dolphinscheduler-server/src/main/resources/config/install_config.conf b/dolphinscheduler-server/src/main/resources/config/install_config.conf index 29b38fe8d..88248ea6f 100755 --- a/dolphinscheduler-server/src/main/resources/config/install_config.conf +++ b/dolphinscheduler-server/src/main/resources/config/install_config.conf @@ -75,18 +75,18 @@ apiServerPort="12345" # NOTICE: If database value has special characters, such as `.*[]^${}\+?|()@#&`, Please add prefix `\` for escaping. # --------------------------------------------------------- # The type for the metadata database -# Supported values: ``postgresql``, ``mysql``. -DATABASE_TYPE=${DATABASE_TYPE:-"postgresql"} +# Supported values: ``postgresql``, ``mysql`, `h2``. +DATABASE_TYPE=${DATABASE_TYPE:-"h2"} # Spring datasource url, following :/? format, If you using mysql, you could use jdbc # string jdbc:mysql://127.0.0.1:3306/dolphinscheduler?useUnicode=true&characterEncoding=UTF-8 as example -SPRING_DATASOURCE_URL=${SPRING_DATASOURCE_URL:-"jdbc:postgresql://127.0.0.1:5432/dolphinscheduler"} +SPRING_DATASOURCE_URL=${SPRING_DATASOURCE_URL:-"jdbc:h2:mem:dolphinscheduler;MODE=MySQL;DB_CLOSE_DELAY=-1;DATABASE_TO_LOWER=true;INIT=runscript from 'classpath:sql/dolphinscheduler_h2.sql'"} # Spring datasource username -SPRING_DATASOURCE_USERNAME=${SPRING_DATASOURCE_USERNAME:-"ds_user"} +SPRING_DATASOURCE_USERNAME=${SPRING_DATASOURCE_USERNAME:-"sa"} # Spring datasource password -SPRING_DATASOURCE_PASSWORD=${SPRING_DATASOURCE_PASSWORD:-"dolphinscheduler"} +SPRING_DATASOURCE_PASSWORD=${SPRING_DATASOURCE_PASSWORD:-""} # --------------------------------------------------------- # Registry Server -- GitLab