v.22.1Improvement
Added Timeout and Execute Settings for Executable Components in Storage
Added settingscommand_read_timeout,command_write_timeoutforStorageExecutable,StorageExecutablePool,ExecutableDictionary,ExecutablePoolDictionary,ExecutableUserDefinedFunctions. Settingcommand_read_timeoutcontrols timeout for reading data from command stdout in milliseconds. Settingcommand_write_timeouttimeout for writing data to command stdin in milliseconds. Added settingscommand_termination_timeoutforExecutableUserDefinedFunction,ExecutableDictionary,StorageExecutable. Added settingexecute_directforExecutableUserDefinedFunction, by default true. Added settingexecute_directforExecutableDictionary,ExecutablePoolDictionary, by default false. #30957 (Maksim Kita).
Why it matters
These new settings allow users to control read and write timeouts when interacting with external commands, improving reliability and preventing hangs due to unresponsive subprocesses. Thecommand_termination_timeout setting enables graceful termination control, while the execute_direct setting provides flexibility in execution modes suited to the specific external integration, enhancing robustness and configurability.How to use it
Users can enable and configure these features by setting the following parameters in their ClickHouse configuration or query settings:-
command_read_timeout: specifies the timeout in milliseconds for reading from the external command's stdout.-
command_write_timeout: specifies the timeout in milliseconds for writing to the external command's stdin.-
command_termination_timeout: defines the timeout for gracefully terminating external commands.-
execute_direct: toggles direct execution mode (defaults differ by component; true for ExecutableUserDefinedFunction, false for dictionaries).Example configuration snippet:
command_read_timeout: 5000
command_write_timeout: 5000
command_termination_timeout: 2000
execute_direct: true