From 4d24b2ad5263ea5ba98c3b4bc9113f45a9a5dd81 Mon Sep 17 00:00:00 2001 From: hujiatao0 Date: Mon, 8 Dec 2025 12:20:05 +0800 Subject: [PATCH 1/3] add config for graceful shutdown Signed-off-by: hujiatao0 --- tikv-configuration-file.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index 84a578de8c166..e49f689e1b8d1 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -198,6 +198,11 @@ This document only describes the parameters that are not included in command-lin + Default value: `"3s"` + Minimum value: `"1s"` +### `graceful-shutdown-timeout` ++ The timeout duration for graceful shutdown. If the timeout is reached and the leader transfer has not completed, the transfer will be skipped and the node will proceed directly to the shutdown process. A value of 0s disables graceful shutdown. ++ Default value: `"20s"` ++ Minimum value: `"0s"` + ### `concurrent-send-snap-limit` + The maximum number of snapshots sent at the same time From 3a8a6bc422310345e39f1d3d7b247ce04395171b Mon Sep 17 00:00:00 2001 From: hujiatao0 Date: Mon, 8 Dec 2025 14:11:23 +0800 Subject: [PATCH 2/3] format Signed-off-by: hujiatao0 --- tikv-configuration-file.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index e49f689e1b8d1..7c660294b15ea 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -199,7 +199,8 @@ This document only describes the parameters that are not included in command-lin + Minimum value: `"1s"` ### `graceful-shutdown-timeout` -+ The timeout duration for graceful shutdown. If the timeout is reached and the leader transfer has not completed, the transfer will be skipped and the node will proceed directly to the shutdown process. A value of 0s disables graceful shutdown. + ++ Specifies the timeout for graceful shutdown. If the timeout is reached before the leader transfer completes, TiKV skips the transfer and proceeds directly to the shutdown process. To disable graceful shutdown, set the value to `0s`. + Default value: `"20s"` + Minimum value: `"0s"` From 5059e1dd987f83c5b9cd67d3462284e062961e20 Mon Sep 17 00:00:00 2001 From: hujiatao0 Date: Wed, 10 Dec 2025 16:20:36 +0800 Subject: [PATCH 3/3] add explain for graceful shutdown Signed-off-by: hujiatao0 --- tikv-configuration-file.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index 7c660294b15ea..be814d701cd6c 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -200,7 +200,7 @@ This document only describes the parameters that are not included in command-lin ### `graceful-shutdown-timeout` -+ Specifies the timeout for graceful shutdown. If the timeout is reached before the leader transfer completes, TiKV skips the transfer and proceeds directly to the shutdown process. To disable graceful shutdown, set the value to `0s`. ++ Specifies the timeout for graceful shutdown, during which TiKV transfers leaders to other nodes upon receiving a SIGTERM signal before shutting down. If the timeout is reached before the leader transfer is complete, TiKV skips the transfer and proceeds directly to the shutdown process. A value of `0s` disables graceful shutdown. + Default value: `"20s"` + Minimum value: `"0s"`