v.21.11Improvements
Add shutdown_wait_unfinished_queries Setting for Query Wait Time Management
Addshutdown_wait_unfinished_queriesserver setting to allowing waiting for running queries up toshutdown_wait_unfinishedtime. This is for #24451. #29914 (Amos Bird).
Why it matters
This feature addresses the need to gracefully handle running queries when the ClickHouse server is shutting down, preventing abrupt termination of queries and allowing them to complete within a specified timeout period, improving data consistency and user experience.How to use it
To enable this feature, set theshutdown_wait_unfinished_queries server setting to true and configure the shutdown_wait_unfinished timeout value. During server shutdown, ClickHouse will then wait up to the specified timeout for running queries to finish before terminating.