v.23.7New Feature
Added SYSTEM FLUSH ASYNC INSERT QUEUE Query and Server-Side Settings
Added querySYSTEM FLUSH ASYNC INSERT QUEUEwhich flushes all pending asynchronous inserts to the destination tables. Added a server-side settingasync_insert_queue_flush_on_shutdown(trueby default) which determines whether to flush queue of asynchronous inserts on graceful shutdown. Settingasync_insert_threadsis now a server-side setting. #49160 (Anton Popov).
Why it matters
This feature enables users to control the flushing of pending asynchronous insert operations, ensuring data consistency and allowing graceful shutdowns by flushing queued inserts automatically. It improves reliability and manageability of asynchronous data insertion in ClickHouse.How to use it
Use the querySYSTEM FLUSH ASYNC INSERT QUEUE to manually flush all pending asynchronous inserts. Control automatic flushing on graceful shutdown via the async_insert_queue_flush_on_shutdown server setting (enabled by default). Configure the async_insert_threads setting on the server side to manage the number of async insert threads.