Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci](opt) stop grace and check mem leak after regression #45787

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion regression-test/pipeline/cloud_p0/clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if [[ -z "${teamcity_build_checkoutDir}" ]]; then echo "ERROR: env teamcity_buil
source "$(bash "${teamcity_build_checkoutDir}"/regression-test/pipeline/common/get-or-set-tmp-env.sh 'get')"
if ${skip_pipeline:=false}; then echo "INFO: skip build pipline" && exit 0; else echo "INFO: no skip"; fi

echo "#### Run tpcds test on Doris ####"
echo "#### Stop and clean ####"
DORIS_HOME="${teamcity_build_checkoutDir}/output"
export DORIS_HOME
stop_doris
Expand Down
5 changes: 4 additions & 1 deletion regression-test/pipeline/cloud_p0/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,16 @@ if [[ ${exit_flag} != "0" ]] || ${need_collect_log}; then
print_doris_fe_log
print_doris_be_log
fi
stop_doris
stop_doris_grace
check_leak
if log_file_name=$(archive_doris_logs "${pr_num_from_trigger}_${commit_id_from_trigger}_$(date +%Y%m%d%H%M%S)_doris_logs.tar.gz"); then
if log_info="$(upload_doris_log_to_oss "${log_file_name}")"; then
reporting_messages_error "${log_info##*logs.tar.gz to }"
fi
fi
if core_info="$(upload_doris_log_to_oss "${core_file_name}")"; then reporting_messages_error "${core_info##*coredump.tar.gz to }"; fi
else
stop_doris_grace
fi

exit "${exit_flag}"
21 changes: 21 additions & 0 deletions regression-test/pipeline/common/doris-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,17 @@ function stop_doris() {
fi
}

function stop_doris_grace() {
if [[ ! -d "${DORIS_HOME:-}" ]]; then return 1; fi
if [[ -f "${DORIS_HOME}"/ms/bin/stop.sh ]]; then bash "${DORIS_HOME}"/ms/bin/stop.sh --grace; fi
if [[ -f "${DORIS_HOME}"/recycler/bin/stop.sh ]]; then bash "${DORIS_HOME}"/recycler/bin/stop.sh --grace; fi
if "${DORIS_HOME}"/be/bin/stop_be.sh --grace && "${DORIS_HOME}"/fe/bin/stop_fe.sh --grace; then
echo "INFO: grace stoped doris"
else
echo "ERROR: failed to grace stop doris" && return 1
fi
}

function clean_fdb() {
instance_id="$1"
if [[ -z "${instance_id:-}" ]]; then return 1; fi
Expand Down Expand Up @@ -857,3 +868,13 @@ function print_running_pipeline_tasks() {
curl -m 10 "http://127.0.0.1:${webserver_port}/api/running_pipeline_tasks/30" 2>&1 | tee "${DORIS_HOME}"/be/log/running_pipeline_tasks_30
echo "------------------------${FUNCNAME[0]}--------------------------"
}

function check_leak() {
echo "INFO: start to check memory leak from be.out"
if grep -i -c 'leak' "${DORIS_HOME}"/be/log/be.out; then
echo "ERROR: find memory leak in be.out"
return 1
else
echo "INFO: no memory leak found in be.out"
fi
}
Loading