This is an automated email from the ASF dual-hosted git repository. mpochatkin pushed a commit to branch IGNITE-22423 in repository https://gitbox.apache.org/repos/asf/ignite-3.git
commit e3e5a6bc7e4003335653bc4c14e00a6c465e3aa5 Author: Mikhail Pochatkin <[email protected]> AuthorDate: Fri Jun 7 14:42:59 2024 +0300 IGNITE-22423 Don't use kill -9 for ignite3db --- packaging/db/zip/linux/ignite3db | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/packaging/db/zip/linux/ignite3db b/packaging/db/zip/linux/ignite3db index 49ad11ab6a..6389c79c0e 100644 --- a/packaging/db/zip/linux/ignite3db +++ b/packaging/db/zip/linux/ignite3db @@ -59,7 +59,19 @@ start() { } stop() { - kill -9 "$(cat ${IGNITE_HOME}/pid)" + kill -15 "$(cat ${IGNITE_HOME}/pid)" + + max_attempts=10 + count=0 + while [ps -p "$(cat ${IGNITE_HOME}/pid)" > /dev/null]; do + sleep 10 + count=$((count + 1)) + done + + if [ ps -p "$(cat ${IGNITE_HOME}/pid)" > /dev/null ]; then + kill -9 "$(cat ${IGNITE_HOME}/pid)" + fi + rm ${WORK_DIR}/rest-address }
