This is an automated email from the ASF dual-hosted git repository.

jark pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fluss.git


The following commit(s) were added to refs/heads/main by this push:
     new 649e11f93 [server] Set the waiting time of executing server shutdown 
hook to 120s to avoid an unclean server shutdown (#2026)
649e11f93 is described below

commit 649e11f93273f9df731fc350f4d3c956de4a5275
Author: yunhong <[email protected]>
AuthorDate: Wed Nov 26 15:55:19 2025 +0800

    [server] Set the waiting time of executing server shutdown hook to 120s to 
avoid an unclean server shutdown (#2026)
---
 fluss-dist/src/main/resources/bin/fluss-daemon.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/fluss-dist/src/main/resources/bin/fluss-daemon.sh 
b/fluss-dist/src/main/resources/bin/fluss-daemon.sh
index 17c7a19ee..8a10dda61 100755
--- a/fluss-dist/src/main/resources/bin/fluss-daemon.sh
+++ b/fluss-dist/src/main/resources/bin/fluss-daemon.sh
@@ -89,8 +89,10 @@ function guaranteed_kill {
   kill $to_stop_pid
   # if timeout exists, use it
   if command -v timeout &> /dev/null ; then
-    # wait 10 seconds for process to stop. By default, Fluss kills the JVM 5 
seconds after sigterm.
-    timeout 10 tail --pid=$to_stop_pid -f /dev/null &> /dev/null
+    # wait 120 seconds for process to stop.This timeout shouldn't be set too 
small; if it is, the server close
+    # logic within the shutdown hook won't have enough time to complete 
properly, which would cause the server to
+    # enter an unclean shutdown state.
+    timeout 120 tail --pid=$to_stop_pid -f /dev/null &> /dev/null
     if [ "$?" -eq 124 ]; then
       echo "Daemon $daemon didn't stop within 10 seconds. Killing it."
       # send sigkill

Reply via email to