diff --git a/deploy/k8s/build/functionsystem/entrypoints/entrypoint-runtime-manager b/deploy/k8s/build/functionsystem/entrypoints/entrypoint-runtime-manager index 7893a1242eeb3800e44f590e3461db51ada8b954..650ffa9918df5fdae4e9ea798ebaa1ecdce723f0 100644 --- a/deploy/k8s/build/functionsystem/entrypoints/entrypoint-runtime-manager +++ b/deploy/k8s/build/functionsystem/entrypoints/entrypoint-runtime-manager @@ -135,4 +135,5 @@ exec "${RUNTIMEMANAGER}" --runtime_dir="${HOME}/runtime" --runtime_logs_dir="${R --runtime_home_dir="${RUNTIME_HOME_DIR}" --nodejs_entry="${NODEJS_ENTRY}" --resource_label_path="${RESOURCE_LABEL_PATH}" --npu_device_info_path="${NPU_DEVICE_INFO_PATH}" \ --runtime_ds_connect_timeout="${RUNTIME_DS_CONNECT_TIMEOUT}" --kill_process_timeout_seconds="${KILL_PROCESS_TIMEOUT_SECONDS}" \ --enable_clean_stream_producer="${ENABLE_CLEAN_STREAM_PRODUCER}" \ ---runtime_instance_debug_enable="${RUNTIME_INSTANCE_DEBUG_ENABLE}" --user_log_export_mode="${USER_LOG_EXPORT_MODE}" +--runtime_instance_debug_enable="${RUNTIME_INSTANCE_DEBUG_ENABLE}" --user_log_export_mode="${USER_LOG_EXPORT_MODE}" \ +--enable_dis_conv_call_stack="${ENABLE_DISTRIBUTED_CONVERGENT_CALL_STACK}" diff --git a/deploy/k8s/charts/templates/master/function-agent-deployment.tpl b/deploy/k8s/charts/templates/master/function-agent-deployment.tpl index 126b11f2b7b3016ce469ccb4ded235996c059dd9..ce1491d81f5a0ec4c882a3978c74c87662bc4373 100644 --- a/deploy/k8s/charts/templates/master/function-agent-deployment.tpl +++ b/deploy/k8s/charts/templates/master/function-agent-deployment.tpl @@ -295,6 +295,8 @@ spec: value: {{ quote .Values.global.runtime.isProtoMsgToRuntime }} - name: MASSIF_ENABLE value: {{ quote .Values.global.runtime.massifEnable }} + - name: ENABLE_DISTRIBUTED_CONVERGENT_CALL_STACK + value: {{ quote .Values.global.runtime.disConvCallStack.enable }} - name: RESOURCE_PATH value: /home/sn/resource - name: RUNTIME_HOME_DIR diff --git a/deploy/k8s/charts/values.yaml b/deploy/k8s/charts/values.yaml index 5982e8ad622aeb749cb6503b1978bd8396362ce5..e01541364196b065f979419009c7985f2fbbf132 100644 --- a/deploy/k8s/charts/values.yaml +++ b/deploy/k8s/charts/values.yaml @@ -312,6 +312,12 @@ global: # jvm prestart custom args # example '["-XX:+UseG1GC","-XX:+TieredCompilation"]' jvmCustomArgs: '[]' + # If true, enables distributed convergent call stack, exception thrown by user code will be accurately located, + # user can locate remote exceptions and errors occurred in the distributed call chain in a simpler way + # using distributed convergent call stack like in a single process + # otherwise disable + disConvCallStack: + enable: false # default args for runtime defaultArgs: java8: '["-XX:InitialRAMPercentage=35.0", "-XX:+UseConcMarkSweepGC", "-XX:+CMSClassUnloadingEnabled", "-XX:+CMSIncrementalMode", "-XX:+CMSScavengeBeforeRemark", "-XX:+UseCMSInitiatingOccupancyOnly", "-XX:CMSInitiatingOccupancyFraction=70", "-XX:CMSFullGCsBeforeCompaction=5", "-XX:MaxGCPauseMillis=200", "-XX:+ExplicitGCInvokesConcurrent", "-XX:+ExplicitGCInvokesConcurrentAndUnloadsClasses"]' diff --git a/deploy/process/config.sh b/deploy/process/config.sh index 2b996e9e2145f5c7f908f5e91fd76289fc83eba0..c0d393325a7b0ff002d3a2148146e94ceae284c4 100644 --- a/deploy/process/config.sh +++ b/deploy/process/config.sh @@ -35,7 +35,7 @@ ds_worker_unique_enable,log_level:,\ enable_distributed_master,\ log_root:,fs_log_path:,fs_log_level:,fs_log_compress_enable:,fs_log_rolling_max_size:,fs_log_rolling_max_files:,fs_log_rolling_retention_days:,\ fs_log_async_log_buf_secs:,fs_log_async_log_max_queue_size:,fs_log_async_log_thread_count:,fs_also_log_to_stderr:,\ -runtime_log_level:,runtime_log_path:,runtime_log_rolling_max_size:,runtime_log_rolling_max_files:,runtime_default_config:,etcd_log_path:,\ +runtime_log_level:,runtime_log_path:,runtime_log_rolling_max_size:,runtime_log_rolling_max_files:,runtime_default_config:,etcd_log_path:,enable_dis_conv_call_stack:,\ runtime_std_rolling_enable:,\ ds_log_level:,ds_log_path:,ds_log_rolling_max_size:,ds_log_rolling_max_files:,\ is_schedule_tolerate_abnormal:,max_instance_cpu_size:,max_instance_memory_size:,\ @@ -129,6 +129,7 @@ METRICS_CONFIG_FILE=$(readlink -m '${BASE_DIR}/../../../functionsystem/config/me RUNTIME_METRICS_CONFIG="" STATE_STORAGE_TYPE="datasystem" PULL_RESOURCE_INTERVAL=1000 +ENABLE_DIS_CONV_CALL_STACK=false BLOCK=false ENABLE_MULTI_MASTER="false" ELECTION_MODE="standalone" @@ -359,6 +360,7 @@ function usage() { echo -e " --cpu_reserved cpu reserved for data system worker(default 0)" echo -e " --state_storage_type state storage type, options: disable/datasystem (default disable)" echo -e " --pull_resource_interval set the interval of pull resource, unit ms(default 1000)" + echo -e " --enable_dis_conv_call_stack enable distributed convergent call stack, options:true/false(default true)" echo -e " --block deploy by the blocking way or run in background(default false for master and true for agent)" echo -e " --custom_resources will pass to function agent as custom resources" echo -e " --labels will pass to function agent as init labels" @@ -555,6 +557,7 @@ function parse_opt() { --pull_resource_interval) PULL_RESOURCE_INTERVAL=$2 && shift 2 ;; --only_check_param) ONLY_CHECK_PARAM="true" && shift ;; --enable_trace) ENABLE_TRACE=$2 && shift 2 ;; + --enable_dis_conv_call_stack) ENABLE_DIS_CONV_CALL_STACK=$2 && shift 2 ;; --enable_metrics) ENABLE_METRICS=$2 && shift 2 ;; --metrics_config) METRICS_CONFIG=$2 && shift 2 ;; --metrics_config_file) METRICS_CONFIG_FILE=$2 && shift 2 ;; @@ -1042,6 +1045,10 @@ function check_input() { log_error "enable_trace can only be 'true' or 'false'" return 1 fi + if [ "X${ENABLE_DIS_CONV_CALL_STACK}" != "Xtrue" ] && [ "X${ENABLE_DIS_CONV_CALL_STACK}" != "Xfalse" ]; then + log_error "enable_dis_conv_call_stack can only be 'true' or 'false'" + return 1 + fi if [ "X${ENABLE_METRICS}" != "Xtrue" ] && [ "X${ENABLE_METRICS}" != "Xfalse" ]; then log_error "enable_metrics can only be 'true' or 'false'" return 1 @@ -1407,7 +1414,7 @@ function export_config() { # etcd export ETCD_IP ETCD_PORT ETCD_PEER_PORT ETCD_PROXY_NUMS ETCD_PROXY_NUMS ETCD_PROXY_PORT ETCD_NO_FSYNC # trace and metrics - export ENABLE_TRACE ENABLE_METRICS METRICS_CONFIG METRICS_CONFIG_FILE STATUS_COLLECT_ENABLE STATUS_COLLECT_INTERVAL + export ENABLE_TRACE ENABLE_METRICS METRICS_CONFIG METRICS_CONFIG_FILE STATUS_COLLECT_ENABLE STATUS_COLLECT_INTERVAL ENABLE_DIS_CONV_CALL_STACK export FUNCTION_AGENT_LITEBUS_THREAD FUNCTION_PROXY_LITEBUS_THREAD FUNCTION_MASTER_LITEBUS_THREAD export SYSTEM_TIMEOUT FUNCTION_PROXY_UNIQUE_ENABLE export ENABLE_META_STORE ENABLE_PERSISTENCE META_STORE_MODE META_STORE_EXCLUDED_KEYS