v.23.7Improvement
Properly check limit for sleepEachRow function and add function_sleep_max_microseconds_per_block setting
Properly check the limit for thesleepEachRowfunction. Add a settingfunction_sleep_max_microseconds_per_block. This is needed for generic query fuzzer. #49343 (Alexey Milovidov).
Why it matters
This feature addresses the need to control the maximum amount of time thesleepEachRow function can delay execution per data block, preventing excessive query runtimes and improving robustness. It is particularly useful for generic query fuzzers that simulate query execution delays without risking long-running queries.How to use it
Users can enable this control by setting thefunction_sleep_max_microseconds_per_block parameter to a desired microsecond value, which limits the total sleep duration the sleepEachRow function can induce per block processed in a query.