Commit Graph
1846 Commits
Author SHA1 Message Date
Alexey Milovidov ee08129f75 Merge remote-tracking branch 'origin/master' into add-executable-udf-drivers 2026-06-10 13:44:46 +00:00
Miсhael StetsyukandGitHub 4e2a34fe26 Merge pull request #106727 from ClickHouse/fix-startup-scripts-reload
Fix logical error in startup scripts in SYSTEM RELOAD CONFIG
2026-06-10 12:39:10 +00:00
Michael Stetsyuk 80bf58fa66 do not rename os thread in loadStartupScripts 2026-06-09 18:25:56 +00:00
Michael Stetsyuk 607c541231 Fix logical error in startup scripts in SYSTEM RELOAD CONFIG 2026-06-08 14:58:01 +00:00
Alexey Milovidov 20b1a2928e Merge remote-tracking branch 'origin/master' into add-executable-udf-drivers 2026-06-07 02:55:28 +00:00
Alexander Gololobov 1740db5ef3 Merge branch 'master' of github.com:ClickHouse/ClickHouse into multistage_distributed_queries 2026-06-06 09:35:45 +02:00
Miсhael StetsyukandGitHub eb3f7f5fe8 Merge pull request #105617 from ClickHouse/system-keeper-changelogs
Add system.keeper_changelogs table
2026-06-05 11:10:40 +00:00
Alexey Milovidov 5aa4384131 Merge remote-tracking branch 'origin/master' into add-executable-udf-drivers 2026-06-04 22:29:12 +00:00
Alexander GololobovandClaude Opus 4.8 482675907a Require explicit listen host to enable the streaming exchange server
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-04 17:01:51 +02:00
Michael Stetsyuk 3cb79ab57c Gate system.keeper_changelogs behind USE_NURAFT
Fixes FreeBSD build: tryGetKeeperDispatcher is only declared when
USE_NURAFT is set, and the storage's transitive includes pull in NuRaft
headers.
2026-06-04 13:28:35 +00:00
Michael StetsyukandClaude Opus 4.7 c44734622f Add system.keeper_changelogs table
New keeper-only system table with one row per on-disk Raft log file
(changelog_<from>_<to>.bin[.zstd]) tracked by the in-process Keeper.
Mirrors the plumbing of system.keeper_snapshots.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
2026-06-04 13:28:35 +00:00
Alexander GololobovandClaude Opus 4.8 6ee7ca2b55 Remove the configured stateless worker endpoint name on shutdown
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-04 09:43:22 +02:00
murphy-4oandGitHub 31874f78ed Merge branch 'master' into uk-pr-7-dense-index-cache 2026-06-04 12:13:20 +08:00
Alexander GololobovandClaude Opus 4.7 26286be55c Validate distributed-plan config and settings
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
2026-06-03 16:02:09 +02:00
Alexey MilovidovandGitHub b7e8361a28 Merge branch 'master' into multistage_distributed_queries 2026-06-03 00:39:00 -07:00
Alexander Gololobov e4bca96054 Match private master indentation for OS_LINUX block in Server.cpp 2026-06-03 04:42:15 +02:00
Alexey MilovidovandGitHub 842b133f8d Merge pull request #100399 from ClickHouse/clang-tidy-init-variables
Enable clang-tidy check for uninitialized variables
2026-05-31 21:56:29 -07:00
Alexander Gololobov 12a1e63d3a Merge branch 'master' of github.com:ClickHouse/ClickHouse into multistage_distributed_queries 2026-05-31 19:40:55 -07:00
Alexey Milovidov 1e4a7a281f Merge remote-tracking branch 'origin/master' into clang-tidy-init-variables 2026-05-30 05:15:32 +00:00
Alexey Milovidov ab6cd89b58 Merge remote-tracking branch 'origin/master' into fix-compiler-warnings
# Conflicts:
#	src/AggregateFunctions/fuzzers/aggregate_function_state_deserialization_fuzzer.cpp
#	src/Client/BuzzHouse/AST/SQLProtoStr.cpp
#	src/Functions/UserDefined/UserDefinedWebAssembly.cpp
#	src/IO/examples/parse_int_perf.cpp
#	src/Processors/QueryPlan/Optimizations/removeUnusedColumns.cpp
#	src/TableFunctions/TableFunctionMergeTreeAnalyzeIndexes.cpp
2026-05-29 02:17:22 +00:00
Alexey Milovidov 5199ee1a3d Merge remote-tracking branch 'origin/master' into add-executable-udf-drivers 2026-05-29 00:12:39 +00:00
Alexander Gololobov 980c435a06 Merge branch 'master' of github.com:ClickHouse/ClickHouse into multistage_distributed_queries 2026-05-28 11:13:06 -07:00
Alexander Gololobov 4fe6f8d12e Address review nits 2026-05-28 09:47:10 -07:00
Nikita TaranovandGitHub bd6d798801 Merge pull request #100242 from ClickHouse/enable_query_profiler_under_sanitizers
Enable query profiler under sanitizers
2026-05-28 13:29:19 +00:00
Alexander GololobovandGitHub 9896ad302e Merge branch 'master' into multistage_distributed_queries 2026-05-27 17:25:11 -07:00
Alexey Milovidov d5538f7d5d Merge remote-tracking branch 'origin/master' into clang-tidy-init-variables
# Conflicts:
#	src/Compression/CompressionCodecALP.cpp
#	src/Functions/UserDefined/UserDefinedWebAssembly.cpp
#	src/IO/AzureBlobStorage/copyAzureBlobStorageFile.cpp
#	src/Interpreters/WasmModuleManager.h
#	src/Parsers/CreateQueryUUIDs.cpp
#	src/Storages/StorageTimeSeries.h
#	src/Storages/TimeSeries/PrometheusRemoteWriteProtocol.cpp
2026-05-27 22:00:22 +00:00
Azat KhuzhinandGitHub cf3ab8d0f5 Merge pull request #105265 from azat/memory-tracker-min-alloc-throw-size
RFC: Add a server setting to allow any allocation to throw MEMORY_LIMIT_EXCEEDED
2026-05-27 18:31:23 +00:00
“JiaQi 1d8300c8d1 Merge branch 'master' into kafka-disable-streaming 2026-05-25 09:13:43 +08:00
Alexey Milovidov bfa9d69564 Merge remote-tracking branch 'origin/master' into add-executable-udf-drivers
# Conflicts:
#	src/Functions/UserDefined/ExternalUserDefinedExecutableFunctionsLoader.cpp
#	src/Functions/UserDefined/UserDefinedExecutableFunction.h
#	src/Functions/UserDefined/UserDefinedSQLFunctionFactory.cpp
2026-05-23 08:09:06 +00:00
Alexey Milovidov 21b4081888 Merge remote-tracking branch 'origin/master' into clang-tidy-init-variables
# Conflicts:
#	src/Functions/FunctionsStringHash.cpp
#	src/Functions/h3PolygonToCells.cpp
#	src/Parsers/ASTIndexDeclaration.h
2026-05-23 07:39:04 +00:00
Alexey Milovidov 724a4d6428 Merge remote-tracking branch 'origin/master' into fix-compiler-warnings
# Conflicts:
#	src/Functions/seriesPeriodDetectFFT.cpp
#	src/Functions/stl.hpp
#	src/Functions/tests/gtest_string_similarity.cpp
2026-05-23 07:21:41 +00:00
Nikolai KochetovandGitHub a97f6d5bc1 Merge pull request #98884 from ClickHouse/mutations-analyzer
Enable new analyzer for `MutationsInterpreter` (coded version 3)
2026-05-22 21:06:59 +00:00
Nikolai Kochetov 85937b3981 Add use_analyzer_for_mutations config to override analyzer choice for mutations
When set in the server config, this option overrides the session setting
`allow_experimental_analyzer` for `MutationsInterpreter`. Absent (default)
means the session setting is used.

The override is parsed once per config reload in `Server.cpp` and stored as
a tri-state atomic on the shared context, so each mutation only pays an
atomic load instead of re-reading the config.
2026-05-22 12:39:29 +00:00
Alexey Milovidov ce33069d64 Merge remote-tracking branch 'origin/master' into fix-compiler-warnings
# Conflicts:
#	programs/local/fuzzers/clickhouse_fuzzer.cpp
2026-05-21 10:55:59 +00:00
Azat KhuzhinandGitHub 6e73f7c47c Merge branch 'master' into memory-tracker-min-alloc-throw-size 2026-05-21 11:16:28 +02:00
Michael Kolupaev c7dc789329 Merge remote-tracking branch 'origin/master' into fwd 2026-05-20 12:16:13 -07:00
Alexey Milovidov 4a67de8969 Merge remote-tracking branch 'origin/master' into add-executable-udf-drivers 2026-05-20 18:47:52 +00:00
Alexey Milovidov aea7d2eb55 Merge remote-tracking branch 'origin/master' into clang-tidy-init-variables
# Conflicts:
#	src/Functions/UserDefined/UserDefinedWebAssembly.cpp
2026-05-20 17:25:06 +00:00
Jimmy Aguilar MenaandGitHub e9d0340750 Merge pull request #104940 from nauu/fix-keeper
Fix max_memory_usage_soft_limit hot reload
2026-05-20 14:59:04 +00:00
nauu 4e34c94fae fix max_memory_usage_soft_limit hot reload 2026-05-19 23:26:04 +08:00
Azat Khuzhin c01e1a55b2 Add a server setting to allow new() throw MEMORY_LIMIT_EXCEEDED
Add a server setting (`min_allocation_size_to_throw_on_memory_limit`) to
allow any allocation to throw `MEMORY_LIMIT_EXCEEDED`, this should help
with preventing OOMs

Right now, any `new` cannot throw, this is due exception safety issues,
and only explicitly marked can throw `MEMORY_LIMIT_EXCEEDED`.

But this can lead to real OOMs, i.e. when kernel will kill
clickhouse-server, even though we are trying hard to track memory
properly.

Add a server setting `min_allocation_size_to_throw_on_memory_limit`
(UInt64 bytes, default 0). When non-zero, the throwing `operator new`
variants are allowed to raise `MEMORY_LIMIT_EXCEEDED`. _The assumption
is that code with big enough allocations does not exception safety
issues._

Note, places that allows (Allocator)/never allows (malloc)
`MEMORY_LIMIT_EXCEEDED` before are not affected.
2026-05-18 21:07:37 +02:00
Alexey Milovidov b22cf29766 Load executable UDF drivers during server startup
Call `loadUserDefinedExecutableFunctionDrivers` during initial
`clickhouse-server` startup before persisted user-defined functions are loaded.
This makes source-tree driver configs such as `c_function_body` available
without waiting for a later config reload.

Resolve driver config directories to absolute paths before applying relative
`create_command` and `drop_command` entries. Driver commands run from a
per-function work directory, so a relative config directory would otherwise make
source-tree example commands relative to the wrong directory.

Improve the unknown-driver exception so it distinguishes an empty driver
registry from a typo in the requested driver name.

Tests:
`ninja -C build programs/clickhouse`
`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`
`clickhouse-server` default-config smoke with `c_function_body`

Refs: https://github.com/ClickHouse/ClickHouse/pull/105131
2026-05-16 21:19:42 +02:00
Alexey MilovidovandClaude Opus 4.7 e2e1dc4c4a Add executable UDF drivers
Introduce "drivers" for executable user-defined functions. A driver is a
small adapter program declared in a server config under
`<user_defined_executable_function_drivers_config>` that knows how to take a
user-supplied code snippet and produce a runnable executable user-defined
function configuration.

New CREATE FUNCTION syntax:

    CREATE [OR REPLACE] FUNCTION [IF NOT EXISTS] name [ON CLUSTER c]
        ARGUMENTS (a UInt8, b String) RETURNS UInt64
        ENGINE = DriverName(key1 = 'value1', key2 = 42)
        AS '...code body...'

On CREATE FUNCTION, the corresponding `create_command` of the driver is
invoked: arguments are passed via `--name`, `--return`, `--args` and the
declared engine arguments; the body is sent on stdin; the driver writes the
resulting executable UDF configuration (XML or YAML) to stdout, which is
saved into the new `<dynamic_user_defined_executable_functions_path>` and
picked up by the existing executable UDF loader. The corresponding SQL is
persisted as `ATTACH FUNCTION ...` in `<user_defined>` and re-evaluated on
restart: if the dynamic configuration is still present, the driver is not
invoked; otherwise the driver is re-run to materialize it.

On DROP FUNCTION, the `drop_command` (if any) is invoked, then the dynamic
configuration file and per-function working directory are removed.

Includes a proof-of-concept driver `c_function_body`, which compiles a user
C body into a binary (inside Docker by default for build-time isolation) and
runs it inside Docker at query time with strict sandboxing (`--network=none`,
`--read-only`, dropped capabilities, no-new-privileges, unprivileged user,
resource limits) in `executable_pool` mode for batched per-row evaluation.

See https://github.com/ClickHouse/ClickHouse/issues/71172

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
2026-05-16 17:24:08 +00:00
“JiaQi 9b97e9dcde Merge branch 'master' into kafka-disable-streaming 2026-05-16 17:07:46 +08:00
Michael Kolupaev 1eb5502983 Merge remote-tracking branch 'origin/master' into fwd 2026-05-15 22:48:52 -07:00
Alexey Milovidov 19127dec50 Merge remote-tracking branch 'origin/master' into clang-tidy-init-variables
# Conflicts:
#	src/IO/S3RequestSettings.cpp
#	src/Processors/Formats/Impl/ArrowFieldIndexUtil.h
2026-05-15 17:49:34 +00:00
Alexey Milovidov 4ed57d0565 Merge remote-tracking branch 'origin/master' into fix-compiler-warnings
# Conflicts:
#	src/Interpreters/ServerAsynchronousMetrics.cpp
2026-05-15 17:03:06 +00:00
Alexey MilovidovandGitHub bc91918852 Merge pull request #100277 from ClickHouse/webterminal
Add web terminal interface to clickhouse-server
2026-05-15 17:54:21 +02:00
Michael Kolupaev 60e30e91b4 Merge remote-tracking branch 'origin/master' into fwd 2026-05-14 12:45:22 -07:00
“JiaQi 56f366a0ea fix tests 2026-05-14 17:53:10 +08:00