This is an automated email from the ASF dual-hosted git repository.
dataroaring 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 da5264840d2 [chore](cloud) Improve cloud start stop script: wait for
quit synchronously (#40218)
da5264840d2 is described below
commit da5264840d2db40bb485956b44e33d22a8ee2da1
Author: Gavin Chou <[email protected]>
AuthorDate: Tue Sep 3 23:22:32 2024 +0800
[chore](cloud) Improve cloud start stop script: wait for quit synchronously
(#40218)
---
cloud/script/start.sh | 4 ++--
cloud/script/stop.sh | 13 +++++++++++++
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/cloud/script/start.sh b/cloud/script/start.sh
index 2e444ac1778..28e986166ae 100644
--- a/cloud/script/start.sh
+++ b/cloud/script/start.sh
@@ -82,7 +82,7 @@ if ldd "${bin}" | grep -Ei 'libfdb_c.*not found' &>/dev/null;
then
exit 1
fi
patchelf --set-rpath "${lib_path}" "${bin}"
- ldd "${bin}"
+ # ldd "${bin}"
fi
chmod 550 "${DORIS_HOME}/lib/doris_cloud"
@@ -91,7 +91,7 @@ if [[ -z "${JAVA_HOME}" ]]; then
echo "The JAVA_HOME environment variable is not defined correctly"
echo "This environment variable is needed to run this program"
echo "NB: JAVA_HOME should point to a JDK not a JRE"
- echo "You can set it in be.conf"
+ echo "You can set it in doris_cloud.conf"
exit 1
fi
diff --git a/cloud/script/stop.sh b/cloud/script/stop.sh
index b40b4061c39..48f01c545ae 100644
--- a/cloud/script/stop.sh
+++ b/cloud/script/stop.sh
@@ -32,4 +32,17 @@ fi
pid=$(cat "${DORIS_HOME}/bin/${process}.pid")
kill -2 "${pid}"
+cnt=0
+while true; do
+ cnt=$((cnt + 1))
+ echo "waiting ${pid} to quit, ${cnt} seconds elapsed"
+ msg=$(ps "${pid}")
+ ret=$?
+ if [[ ${ret} -ne 0 ]]; then
+ echo "${pid} has quit"
+ break
+ fi
+ echo "${msg}"
+ sleep 1
+done
rm -f "${DORIS_HOME}/bin/${process}.pid"
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]