Files
datastore/programs/server/user_defined_executable_function_drivers
Alexey Milovidov 05b2da9c62 Make DockerC pool startup robust under concurrency
Keep each pooled `DockerC` process on its own FIFO directory created by the runner at process startup, and keep Docker CLI output out of the UDF result stream by redirecting it to a per-process log.

The runner now waits for the per-process `docker exec` first. If Docker cannot start the container-side function, the runner forwards the captured Docker error to stderr and terminates the FIFO proxy processes instead of letting Docker messages corrupt `Buffers` output.

Also size Docker's `pids-limit` from `pool_size` with enough headroom for concurrent `docker exec` startup. The previous limit was too close to the number of pooled functions and could fail under `max_threads = 64` with `OCI runtime exec failed`.

Tests:
- `python3 -m py_compile programs/server/user_defined_executable_function_drivers/c_driver_common.py`
- `CLICKHOUSE_BINARY=./build/programs/clickhouse tests/queries/0_stateless/04241_executable_udf_driver.sh`
- `CLICKHOUSE_BINARY=./build/programs/clickhouse tests/queries/0_stateless/04242_executable_udf_driver_errors.sh`
- real `DockerC` `clickhouse-local` query with `numbers_mt(5000000)` and `max_threads = 64`
2026-05-17 02:10:21 +02:00
..