From 334017a7d7821ce16d8eb211ac9678b9ac1ceaa2 Mon Sep 17 00:00:00 2001 From: Ketor Date: Fri, 24 May 2024 21:27:57 +0800 Subject: [PATCH] [fix][chores] Fix capacity conf change. Signed-off-by: Ketor --- conf/document-gflags.conf | 2 -- conf/index-gflags.conf | 2 -- conf/store-gflags.conf | 2 -- scripts/deploy_func.sh | 12 ++++++++++-- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/conf/document-gflags.conf b/conf/document-gflags.conf index d02b55247..9684708d5 100644 --- a/conf/document-gflags.conf +++ b/conf/document-gflags.conf @@ -2,8 +2,6 @@ --conf=./conf/document.yaml -coor_url=file://./conf/coor_list -ip2hostname=false --min_system_disk_capacity_free_ratio=$DEFAULT_MIN_SYSTEM_DISK_CAPACITY_FREE_RATIO$ --min_system_memory_capacity_free_ratio=$DEFAULT_MIN_SYSTEM_MEMORY_CAPACITY_FREE_RATIO$ -max_short_value_in_write_cf=8 -document_max_batch_count=1024 -braft_use_align_hearbeat=true diff --git a/conf/index-gflags.conf b/conf/index-gflags.conf index 93490dda6..ce143de12 100644 --- a/conf/index-gflags.conf +++ b/conf/index-gflags.conf @@ -2,8 +2,6 @@ --conf=./conf/index.yaml -coor_url=file://./conf/coor_list -ip2hostname=false --min_system_disk_capacity_free_ratio=$DEFAULT_MIN_SYSTEM_DISK_CAPACITY_FREE_RATIO$ --min_system_memory_capacity_free_ratio=$DEFAULT_MIN_SYSTEM_MEMORY_CAPACITY_FREE_RATIO$ -omp_num_threads=1 -vector_operation_parallel_thread_num=16 -max_hnsw_memory_size_of_region=2147483648 diff --git a/conf/store-gflags.conf b/conf/store-gflags.conf index a07bc4a2a..2f10078e8 100644 --- a/conf/store-gflags.conf +++ b/conf/store-gflags.conf @@ -2,8 +2,6 @@ --conf=./conf/store.yaml -coor_url=file://./conf/coor_list -ip2hostname=false --min_system_disk_capacity_free_ratio=$DEFAULT_MIN_SYSTEM_DISK_CAPACITY_FREE_RATIO$ --min_system_memory_capacity_free_ratio=$DEFAULT_MIN_SYSTEM_MEMORY_CAPACITY_FREE_RATIO$ -max_short_value_in_write_cf=8 -braft_use_align_hearbeat=true -bdb_env_cache_size_gb=8 diff --git a/scripts/deploy_func.sh b/scripts/deploy_func.sh index 198f03630..f1c72d993 100755 --- a/scripts/deploy_func.sh +++ b/scripts/deploy_func.sh @@ -57,8 +57,6 @@ function deploy_store() { echo "cp $srcpath/conf/${role}-gflags.conf $dstpath/conf/gflags.conf" cp $srcpath/conf/${role}-gflags.conf $dstpath/conf/gflags.conf sed -i 's,\$DEFAULT_REPLICA_NUM\$,'"$DEFAULT_REPLICA_NUM"',g' $dstpath/conf/gflags.conf - sed -i 's,\$DEFAULT_MIN_SYSTEM_DISK_CAPACITY_FREE_RATIO\$,'"$DEFAULT_MIN_SYSTEM_DISK_CAPACITY_FREE_RATIO"',g' $dstpath/conf/gflags.conf - sed -i 's,\$DEFAULT_MIN_SYSTEM_MEMORY_CAPACITY_FREE_RATIO\$,'"$DEFAULT_MIN_SYSTEM_MEMORY_CAPACITY_FREE_RATIO"',g' $dstpath/conf/gflags.conf if [ ${DINGODB_ENABLE_LITE} = "1" ];then echo "" >> $dstpath/conf/gflags.conf echo "-enable_lite=true" >> $dstpath/conf/gflags.conf @@ -66,6 +64,16 @@ function deploy_store() { else echo "enable-lite is not set" fi + if [ ${DEFAULT_MIN_SYSTEM_DISK_CAPACITY_FREE_RATIO} ];then + echo "" >> $dstpath/conf/gflags.conf + echo "-min_system_disk_capacity_free_ratio=${DEFAULT_MIN_SYSTEM_DISK_CAPACITY_FREE_RATIO}" >> $dstpath/conf/gflags.conf + echo "-min_system_disk_capacity_free_ratio=${DEFAULT_MIN_SYSTEM_DISK_CAPACITY_FREE_RATIO}" + fi + if [ ${DEFAULT_MIN_SYSTEM_MEMORY_CAPACITY_FREE_RATIO} ];then + echo "" >> $dstpath/conf/gflags.conf + echo "-min_system_memory_capacity_free_ratio=${DEFAULT_MIN_SYSTEM_MEMORY_CAPACITY_FREE_RATIO}" >> $dstpath/conf/gflags.conf + echo "-min_system_memory_capacity_free_ratio=${DEFAULT_MIN_SYSTEM_MEMORY_CAPACITY_FREE_RATIO}" + fi fi fi