This is an automated email from the ASF dual-hosted git repository.
hellostephen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new a139679ce0b [opt](ci) debug "Reach limit of connections" (#45173)
a139679ce0b is described below
commit a139679ce0bec52ca4175af2929df96528b24f65
Author: Dongyang Li <[email protected]>
AuthorDate: Thu Dec 12 15:05:17 2024 +0800
[opt](ci) debug "Reach limit of connections" (#45173)
---
regression-test/pipeline/cloud_p0/run.sh | 6 +++--
regression-test/pipeline/common/doris-utils.sh | 37 ++++++++++++++++++++++++++
2 files changed, 41 insertions(+), 2 deletions(-)
diff --git a/regression-test/pipeline/cloud_p0/run.sh
b/regression-test/pipeline/cloud_p0/run.sh
index 43847f86980..c1e25700476 100644
--- a/regression-test/pipeline/cloud_p0/run.sh
+++ b/regression-test/pipeline/cloud_p0/run.sh
@@ -13,7 +13,7 @@ fi
EOF
############################# run.sh content
########################################
# shellcheck source=/dev/null
-# check_tpcds_table_rows, restart_doris, set_session_variable,
check_tpcds_result
+# check_tpcds_table_rows, restart_doris, set_session_variable,
check_tpcds_result, _monitor_connection
source
"${teamcity_build_checkoutDir}"/regression-test/pipeline/common/doris-utils.sh
# shellcheck source=/dev/null
# create_an_issue_comment
@@ -47,6 +47,9 @@ export DORIS_HOME
exit_flag=0
need_collect_log=false
+# monitoring the log files in "${DORIS_HOME}"/regression-test/log/ for keyword
'Reach limit of connections'
+_monitor_regression_log &
+
# shellcheck disable=SC2317
run() {
set -e
@@ -72,7 +75,6 @@ run() {
export JAVA_HOME
if "${teamcity_build_checkoutDir}"/run-regression-test.sh \
--teamcity \
- --clean \
--run \
--times "${repeat_times_from_trigger:-1}" \
-parallel 18 \
diff --git a/regression-test/pipeline/common/doris-utils.sh
b/regression-test/pipeline/common/doris-utils.sh
index 51bc0bece7a..5f549db3c80 100644
--- a/regression-test/pipeline/common/doris-utils.sh
+++ b/regression-test/pipeline/common/doris-utils.sh
@@ -510,6 +510,43 @@ function set_doris_session_variables_from_file() {
fi
}
+_monitor_regression_log() {
+ if ! command -v inotifywait >/dev/null; then
+ apt install inotify-tools -y
+ fi
+
+ # Path to the log directory
+ local LOG_DIR="${DORIS_HOME}"/regression-test/log
+
+ # keyword to search for in the log files
+ local KEYWORD="Reach limit of connections"
+
+ local query_port
+ query_port=$(get_doris_conf_value "${DORIS_HOME}"/fe/conf/fe.conf
query_port)
+
+ echo "INFO: start monitoring the log files in ${LOG_DIR} for the keyword
'${KEYWORD}'"
+
+ local start_row=1
+ # Monitor the log directory for new files and changes, only one file
+ # shellcheck disable=SC2034
+ inotifywait -m -e modify "${LOG_DIR}" | while read -r directory events
filename; do
+ total_rows=$(wc -l "${directory}${filename}" | awk '{print $1}')
+ if [[ ${start_row} -ge ${total_rows} ]]; then
+ start_row=${total_rows}
+ fi
+ # shellcheck disable=SC2250
+ if sed -n "${start_row},\$p" "${directory}${filename}" | grep -a -q
"${KEYWORD}"; then
+ matched=$(grep -a -n "${KEYWORD}" "${directory}${filename}")
+ start_row=$(echo "${matched}" | tail -n1 | cut -d: -f1)
+ echo "WARNING: find '${matched}' in ${directory}${filename}, run
'show processlist;' to check the connections" | tee -a
"${DORIS_HOME}"/fe/log/monitor_regression_log.out
+ mysql -h127.0.0.1 -P"${query_port}" -uroot -e'show processlist;' |
tee -a "${DORIS_HOME}"/fe/log/monitor_regression_log.out
+ fi
+ start_row=$((start_row + 1))
+ # echo "start_row ${start_row}" | tee -a
"${DORIS_HOME}"/fe/log/monitor_regression_log.out
+ done
+
+}
+
archive_doris_logs() {
if [[ ! -d "${DORIS_HOME:-}" ]]; then return 1; fi
local archive_name="$1"
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]