384 Commits
Author SHA1 Message Date
zeekayandHanzo Dev 64c8e40f76 the face is Zen, and it ships from @hanzo/font
One family. Font stacks name Zen and fall back to the native faces, tokens
name the role rather than a face, and the packages that used to supply a
face now point at @hanzo/font.

Self-hosted @font-face blocks are removed rather than renamed: rewriting the
family in one would leave a src pointing at a file this repo no longer ships.
@hanzo/font carries the binaries and declares the faces, so the local copies
go with the declaration that used them.

Comments naming a face we no longer use are deleted, not reworded.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-08 10:25:22 -07:00
zeekayandHanzo Dev a7786758f8 Restore upstream citations broken by a global rename
A prior ClickHouse to Datastore rename rewrote `github.com/ClickHouse/ClickHouse`
to `github.com/Datastore/Datastore`, a repository that does not exist. That
turned 162 references across 131 files into dead links, and turned captured
stack traces and historical changelogs into false statements.

A citation of upstream is a fact, not branding. Product surfaces keep the Hanzo
Datastore name; references to the upstream project point at the upstream project.
Also untracks `.claude/`, agent scratch that was never meant to be committed.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-26 19:24:23 -07:00
zeekay 9a90943b8f merge: ClickHouse 26.7.1.1315-stable into datastore — preserve debrand
13,838 upstream commits, forward from the 26.6.1.1 fork point. 129 conflicts:
37 resolved mechanically (take upstream's file, re-apply the brand sweep) and
92 by hand where our fork and upstream had both changed the same code.

The rule throughout: upstream owns the engine, we own the naming and a small set
of deliberate deviations. Never resolve by discarding an upstream change — a
dropped rename or a missed new parameter becomes a compile error a thousand
files away.

Deviations verified intact after the merge:
  ENABLE_XRAY still defaults OFF        (CMakeLists.txt:105)
  X-Datastore-User read by the server   (authenticateUserByHTTP.cpp)
  X-ClickHouse-* in src/                0
  hanzo/research                        present
  system.*_log retention bound          present
  ArrowFlight rip                       held against upstream re-adding it

Two things worth naming, because neither shows up as a conflict:

  src/CMakeLists.txt gained an UNGUARDED
  `add_object_library(datastore_storages_arrowflight Storages/ArrowFlight)` from
  upstream, for a directory our gRPC rip deleted. It sat outside every conflict
  hunk, so a resolver reading only the markers would sail straight past it into
  a CMake configure error. Removed; the Server/ArrowFlight sibling at line 474
  stays because it is inside `if (TARGET ch_contrib::arrow_flight)`.

  The brand sweep had rewritten github.com/ClickHouse/ClickHouse issue links to
  github.com/Datastore/Datastore — a dead host. Those point at upstream's own
  tracker and are restored, alongside the contributors list, sql.clickhouse.com
  and the ClickHouse Inc copyright: attribution is theirs, not ours to rename.

base/glibc-compatibility/memcpy/memcpy.h is deleted, not kept: upstream dropped
it for LLVM-libc's, and our only change to it was a comment rebrand.
2026-07-26 14:47:43 -07:00
zooqueen 0f1e1b5143 merge: ClickHouse 26.6.1.1 into datastore — preserve debrand + ZAP + gRPC/gcloud removal
Merge upstream/changelog-26.6 (9593 commits) into our debranded fork.
- 190 conflicts resolved: 24 delete-side kept-removed (grpc/arrowflight/gcloud), submodules+version→26.6,
  contrib/CMakeLists keeps zap + new libpng, drops capnproto (zap provides kj), Server.cpp/CMakeLists
  re-apply the ZAP wiring + gRPC/arrowflight/gcloud removal.
- Full-tree debrand re-swept over the new 26.6 code (uniform Datastore naming; Azure fork Clickhouse*
  symbols preserved). 0 clickhouse in product src/programs/CMakeLists.
- Version now 26.6.1.1. gRPC/google-cloud/chdig stay removed; ZAP remains the transport.
2026-06-23 12:23:48 -07:00
zooqueen 12ee47043b datastore: eliminate ALL clickhouse references from the product (no clickhouse, period)
Comprehensive removal across the compiled-product surface (src/programs/base/cmake/configs,
excl contrib third-party + unit tests): URLs clickhouse.com/.tech/.cloud -> hanzo.ai and
github.com/ClickHouse/ClickHouse -> github.com/hanzoai/datastore; fs/zk paths /var/lib/clickhouse
-> /var/lib/datastore, /clickhouse/tables -> /datastore/tables; SQL dict-source keyword
"clickhouse" -> "datastore" (SOURCE(DATASTORE(...)), forwards-only); .clickhouse.hash ELF section
-> .datastore.hash (main.cpp + CMake); hasClickhouse/Clickhouse symbols -> Datastore; all remaining
lowercase clickhouse -> datastore. 175 files. contrib/ (upstream deps) untouched. Build-verify since
this changes the SQL keyword, default paths and the binary-hash section.
2026-06-22 16:33:18 -07:00
zooqueen fce0ee72e1 datastore: fix XML config tag mismatch (</clickhouse> closing tags)
Runtime regression from the final lowercase pass: it renamed <clickhouse> opening tags to
<datastore> but the / exclusion (protecting /clickhouse paths) left </clickhouse> closing tags,
so embedded + shipped configs became <datastore>...</clickhouse> -> SAXParseException 'Tag
mismatch' at runtime (compile was fine; XML is data). Renamed all <clickhouse/</clickhouse XML
tags -> datastore (101 closes across configs, embedded strings, keeper configs). Path strings
(/var/lib/clickhouse) have no angle bracket and are untouched. Build compiled; this fixes runtime
config parsing.
2026-06-22 00:25:01 -07:00
zooqueen ca73c44faa datastore rebrand: final lowercase pass — quote-adjacent display strings + install defaults
The prior sweep kept " in the exclusion set to guard the SQL keyword "clickhouse", which
over-protected ALL quoted display strings ("clickhouse " << app in --help, install-tool defaults
like DEFAULT_..._SERVER_USER="clickhouse"/getpwnam("clickhouse")/binary-name fallbacks). Redid the
pass dropping " from the exclusion while still skipping the 4 SQL dict-source keyword lines, URLs,
and /clickhouse + .clickhouse.hash paths (kept . / - in the boundary). Renamed the 2 fuzzer files
clickhouse_fuzzer.cpp / clickhouse-template.g (not built; completeness).

Remaining lowercase clickhouse (526) = URLs, SQL SOURCE(CLICKHOUSE) keyword, and ZK/fs path
conventions (/var/lib/clickhouse, /clickhouse/tables) + internal .clickhouse.hash ELF section —
all protocol/external/convention, intentionally kept.
2026-06-22 00:21:07 -07:00
zooqueen 0357c7e3ff datastore rebrand: lowercase clickhouse -> datastore in commands/prose/help
Completes the user-facing branding: lowercase `clickhouse` command/symlink names
(clickhouse-server/-client/-local/...), `clickhouse <subcommand>` usage strings, and bare-word
prose in messages/comments -> datastore (~238 occurrences across 227 files).

Intentionally KEPT (not branding):
- SQL dict-source keyword "clickhouse" (SOURCE(CLICKHOUSE(...)) compat) - 4 sites
- external URLs (clickhouse.com / github.com/ClickHouse)
- filesystem / ZooKeeper path conventions (/var/lib/clickhouse fallback default, /clickhouse/tables/
  ReplicatedMergeTree ZK path) - deployment convention, overridden by our datastore-* config

String/comment-literal changes only; no identifiers touched (verified no bare lowercase clickhouse
C++ symbol exists). Build was already green; verifying this is still green.
2026-06-21 23:46:30 -07:00
zooqueen 06f45b6529 datastore rebrand: compound symbols + CMake targets/macros (clickhouse -> datastore)
The deep internal rebrand (user: "rename all compound symbols", "datastore_ good", "DB:: fine"):
- CamelCase symbols ClickHouse* -> Datastore* (358 distinct): mainEntryDatastoreServer,
  DatastoreDictionarySource, DatastoreRevision, DatastoreVersion, etc. URL/repo lines skipped.
- snake targets + macros clickhouse_* -> datastore_* (850 occ): datastore_common_io,
  datastore_add_executable, datastore_program_install, datastore_functions, etc. — uniform
  across src + cmake + all CMakeLists, and the contrib wrappers that link/use them
  (croaring, nuraft, corrosion, chdig, delta-kernel-rs, mongo-cxx).
- CLICKHOUSE_* macros -> DATASTORE_* (DATASTORE_OFFICIAL_BUILD, ENABLE_DATASTORE_*, etc.).
- project(ClickHouse) -> project(Datastore) so ${Datastore_SOURCE_DIR}/${Datastore_BINARY_DIR}
  (45 refs) resolve.

Replace (not drop) -> collision-free. DB:: namespace kept (per direction). lowercase SQL
`clickhouse` dictionary-source keyword + clickhouse.com / github.com/ClickHouse URLs kept.
NEEDS BUILD VERIFICATION on spark/CI — uniform + inspected-consistent but uncompiled here.
2026-06-21 20:38:05 -07:00
zooqueen 332335ddb4 datastore rebrand: standalone "ClickHouse" word -> "Datastore" (prose, strings, comments)
The correct, safe broad rebrand: renames "ClickHouse" only as a whole word (boundary on
BOTH sides), so it rewrites display strings/messages/comments but leaves every compound
C++ symbol intact — `ClickHouseDictionarySource`, `getInfoIfClickHouseDictionarySource`,
`mainEntryClickHouseServer`, `ClickHouseRevision`, `ClickHouse_SOURCE_DIR` are untouched
(an earlier one-sided heuristic mangled suffix symbols like `manageClickHouse`; reverted).
1677 occurrences across 482 files. Compile-safe (string/comment content; symbols preserved).

Still NOT renamed (would be a build-coupled symbol rename, needs build-host iteration): the
199 compound identifiers containing ClickHouse, the `DB::` namespace, the `clickhouse_*`
CMake targets/macros, the lowercase `clickhouse` SQL dictionary-source keyword. Needs build
verification.
2026-06-21 20:10:25 -07:00
Alexey Milovidov be9f56a9f9 Merge remote-tracking branch 'origin/master' into memory-worker-rss-speculative-reserve
Branch was 1157 commits behind master and the only CI red was the chronic
master-wide `Hung check failed, possible deadlock found` flake (13-70/day on
master itself; this PR is a compile-time no-op under `SANITIZER` so it cannot
affect the `arm_asan_ubsan` stress run). Re-merge to refresh CI on the current
master and to re-run the AI review against the already-updated PR description.

The merge conflicted only in `src/Common/MemoryWorker.cpp`: master evolved the
`memory_worker_dynamic_hard_limit` apply block to skip adjustments smaller than
`min_change_ratio` (1%) of the current limit, still naming the local
`current_hard_limit`. The branch had renamed that local to `installed_hard_limit`
to avoid shadowing the `current_hard_limit` the speculative-reserve block reads
earlier in `updateResidentMemoryThread` (`-Wshadow`/`-Werror`). Kept master's new
threshold logic verbatim and renamed its local to `installed_hard_limit`; the
`LOG_TRACE` already references `installed_hard_limit`. No behavior change.

Verified the resolved `MemoryWorker.cpp` compiles cleanly (`-fsyntax-only`,
`-Werror -Wall -Wextra`) against the merged tree.
2026-06-19 15:40:51 +00:00
Miсhael StetsyukandGitHub e78aeb970e Merge pull request #107291 from ClickHouse/static-thread-pool-shutdownall
Fix stuck shutdown in server and local and join all global pool threads in all binaries
2026-06-17 13:44:41 +00:00
Antonio AndelicandGitHub 47f6c3116b Merge pull request #106822 from linjiayu1025-collab/keeper_server_secure
Fix keeper_server.http_control.secure_port serves plaintext HTTP instead of HTTPS
2026-06-17 12:14:22 +00:00
linjiayuandhaozelong 5f759fbcbe Fix keeper_server.http_control.secure_port serves plaintext HTTP instead of HTTPS 2026-06-16 13:50:33 +08:00
Alexey Milovidov 6fd07a4a21 Merge remote-tracking branch 'origin/master' into memory-worker-rss-speculative-reserve
# Conflicts:
#	programs/local/LocalServer.cpp
#	programs/server/Server.cpp
#	src/Common/MemoryWorker.cpp
#	src/Common/MemoryWorker.h
#	src/Core/ServerSettings.cpp
2026-06-14 02:44:28 +00:00
Michael Stetsyuk 3a9c7df8d2 Join threads from global thread pool before exiting from main 2026-06-11 21:45:31 +00:00
Azat KhuzhinandClaude Opus 4.8 ff6d8d23f8 Fix clang 23 -Wlifetime-safety errors
Fix:
- -Wlifetime-safety-dangling-global-moved in `ReplicasReconnector`,
- -Wlifetime-safety-dangling-field-moved in `MergeTreeReaderStream` and `TTLTransform`
- -Wlifetime-safety-return-stack-addr-moved in `BackupsWorker` (move first, alias later)
- -Wunused-but-set-variable for `inside_main` in keeper.
- -Wlifetime-safety-use-after-scope-moved in ProfileEvents

Disable -Wlifetime-safety-invalidation: too many false positives, it treats
mutation of a container captured by reference in a lambda as invalidating the
reference to the container variable itself.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-09 09:57:59 +02:00
Alexey MilovidovandClaude Opus 4.8 9488bc4fe2 Address review: cap speculative RSS reservation before addition; drop dead Keeper wiring
Cap the speculative reservation at `current_hard_limit - resident` *before*
adding it to `resident`, and skip speculation entirely once
`resident >= current_hard_limit`. This removes any chance of the signed
`Int64` addition overflowing (the previous code added a hard-limit-sized
`reserve` to `resident` and only capped afterwards), as flagged in review,
while preserving full early-throw power: once the published RSS reaches the
hard limit, the next positive allocation already trips the
`will_be_rss > current_hard_limit` branch in `MemoryTracker::allocImpl`.

Stop wiring `memory_worker_rss_speculative_reserve_ratio` into
`clickhouse-keeper`: it never sets the global hard limit (it enforces
`keeper_server.max_memory_usage_soft_limit` separately), so the speculation
gate `current_hard_limit > 0` makes the setting a no-op there. Leaving it
disabled (`ratio = 0`) avoids exposing a setting that cannot take effect.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-05 11:04:45 +00:00
Alexey Milovidov a0d58e52cb Merge remote-tracking branch 'origin/master' into memory-worker-rss-speculative-reserve 2026-06-02 21:41:44 +00:00
Alexey MilovidovandGitHub 2b385b9bf1 Merge pull request #100976 from ClickHouse/fix-compiler-warnings
More warnings
2026-05-31 16:52:22 -07:00
Alexey Milovidov 9ab9e9bcd3 Merge remote-tracking branch 'origin/master' into memory-worker-rss-speculative-reserve 2026-05-30 04:07:26 +00:00
János Benjamin AntalandGitHub d763f9c59a Merge branch 'master' into convert-asserts-to-chasserts 2026-05-28 10:25:28 +02:00
robot-clickhouse d894e6b011 Backport #101757 to 26.5: KeeperDispatcher overhaul 2026-05-25 07:54:57 +00:00
Alexey Milovidov 9e63f74d40 Merge remote-tracking branch 'origin/master' into memory-worker-rss-speculative-reserve 2026-05-23 23:51:18 +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
János Benjamin Antal 5b7f911f0c Merge remote-tracking branch 'origin/master' into convert-asserts-to-chasserts 2026-05-21 12:05:22 +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
Michael Kolupaev c7dc789329 Merge remote-tracking branch 'origin/master' into fwd 2026-05-20 12:16:13 -07:00
Alexey Milovidov a957e4ceeb Merge remote-tracking branch 'origin/master' into memory-worker-rss-speculative-reserve 2026-05-20 16:01:55 +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
János Benjamin Antal dbaaf36920 Even more finds 2026-05-20 10:04:07 +00:00
nauu 4e34c94fae fix max_memory_usage_soft_limit hot reload 2026-05-19 23:26:04 +08:00
Alexey MilovidovandClaude Opus 4.7 8cfe465fd7 Wire memory_worker_rss_speculative_reserve_ratio into Keeper
`programs/server/Server.cpp` and `programs/local/LocalServer.cpp` were
passing the new server setting `memory_worker_rss_speculative_reserve_ratio`
into `MemoryWorkerConfig`, but `programs/keeper/Keeper.cpp` was building
its `MemoryWorkerConfig` without it, so the configured value was silently
ignored by `clickhouse-keeper`. Add the missing `ServerSetting`
declaration and the corresponding field initialiser. Spotted by AI review
on https://github.com/ClickHouse/ClickHouse/pull/104976.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
2026-05-15 00:21:35 +00:00
Michael Kolupaev 60e30e91b4 Merge remote-tracking branch 'origin/master' into fwd 2026-05-14 12:45:22 -07:00
Alexey Milovidov 7d54e33c7c Merge remote-tracking branch 'origin/master' into fix-compiler-warnings
# Conflicts:
#	programs/main.cpp
2026-05-06 03:18:15 +00:00
Alexey Milovidov 44482a322f Merge remote-tracking branch 'origin/master' into fix-compiler-warnings
# Conflicts:
#	src/AggregateFunctions/AggregateFunctionTheilsU.cpp
#	src/Interpreters/ProcessList.cpp
#	src/Interpreters/ThreadStatusExt.cpp
2026-04-24 14:12:17 +00:00
Alexey Milovidov cf4ef53d84 Merge remote-tracking branch 'origin/master' into revert-98038-revert-96025-clickhouse-help 2026-04-24 01:49:47 +00:00
Sema ChecherindaandClaude Opus 4.6 f07d3c0ac7 Reduce default HTTP header limits to prevent pre-auth memory exhaustion
The defaults for `http_max_fields` (1,000,000) and
`http_max_field_name_size` (128 KB) allowed unauthenticated HTTP
clients to trigger large memory allocations before any authentication
check, since HTTP headers are fully parsed before authentication occurs.

This reduces:
- `http_max_fields`: 1,000,000 -> 1,000
- `http_max_field_name_size`: 128 KB -> 4 KB

Also adds `http_max_request_header_size` to cap the total size of all
HTTP headers combined, and `http_headers_read_timeout` to enforce a
wall-clock deadline on header parsing (via `DeadlineReadBuffer`).

Applied to both ClickHouse server and Keeper.

Backport of ClickHouse/clickhouse-private#53097.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
2026-04-21 20:00:59 +02:00
Alexey Milovidov 673ddb52b1 Merge remote-tracking branch 'origin/master' into revert-98038-revert-96025-clickhouse-help 2026-04-20 02:08:29 +00:00
Alexey Milovidov c8be129a5b Merge remote-tracking branch 'origin/master' into fix-compiler-warnings
# Conflicts:
#	src/Common/WKB.cpp
#	src/Functions/array/arrayDotProduct.cpp
#	src/Interpreters/InterpreterSelectIntersectExceptQuery.cpp
#	src/Interpreters/InterpreterSelectQueryAnalyzer.cpp
#	src/Interpreters/InterpreterSelectWithUnionQuery.cpp
#	src/Server/KeeperHTTPHandlerFactory.cpp
#	src/Storages/MergeTree/MergeTreeReaderTextIndex.cpp
2026-04-19 11:57:10 +00:00
Michael Kolupaev f70ee23075 Merge remote-tracking branch 'origin/master' into fwd 2026-04-15 20:26:02 -07:00
Pervakov GrigoriiandGitHub c72691eedd Merge branch 'master' into raft_reload_certs 2026-04-13 17:33:48 +02:00
Michael KolupaevandClaude Opus 4.6 1dc0dc0829 Extract KeeperRequestDispatcher from KeeperDispatcher
Split request processing (batching, session management, request/response
threads) into a separate `KeeperRequestDispatcher` class, leaving
`KeeperDispatcher` as a thin shell for snapshots, session ID assignment,
session cleanup, and cluster configuration management.

Key interface changes:
- `KeeperStateMachine` now takes a `KeeperResponseCallback` instead of
  a `ResponsesQueue &`, decoupling the state machine from the queue type.
- `KeeperServer` constructor takes `KeeperResponseCallback` instead of
  `ResponsesQueue &`.
- `KeeperServer::KeeperRaftServer` moved from .cpp anonymous definition
  to the header for visibility.
- `ZooKeeperResponseCallback` moved to `KeeperCommon.h`, returns `bool`
  for future flow control.
- `shutdown` now takes a `closed_all_connections` parameter.
- Consolidated `finishSession` calls into a single `SCOPE_EXIT` in
  `KeeperTCPHandler`.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
2026-04-07 15:45:25 -07:00
Alexey MilovidovandClaude Opus 4.6 9e8156c228 Merge origin/master into fix-compiler-warnings
Resolve merge conflicts:
- `base/base/coverage.cpp`: take master's version which removed the old
  sanitizer coverage guard/trace functions (replaced by LLVM profile-based
  coverage)
- `src/Client/BuzzHouse/AST/SQLProtoStr.cpp`: take master's unified
  `CONV_FN(SQLIdentifier, ident)` replacing the individual per-type
  converter functions

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
2026-04-07 02:59:51 +02:00
Alexey MilovidovandGitHub f515491416 Merge branch 'master' into revert-98038-revert-96025-clickhouse-help 2026-04-06 17:48:15 -07:00
Alexey Milovidov 2e15ae037c Merge remote-tracking branch 'origin/master' into revert-98038-revert-96025-clickhouse-help 2026-03-30 07:43:50 +00:00
Alexey Milovidov 01d5c6a84c Merge remote-tracking branch 'origin/master' into fix-compiler-warnings 2026-03-29 23:20:54 +00:00
Nikita Fomichev 19fa7af12f Merge remote-tracking branch 'origin/master' into fix-coverage-symbol-quality
# Conflicts:
#	ci/jobs/build_clickhouse.py
2026-03-29 22:32:03 +02:00
Alexey MilovidovandGitHub 8b819651a9 Merge branch 'master' into revert-98038-revert-96025-clickhouse-help 2026-03-28 23:50:35 +01:00
Alexey MilovidovandClaude Opus 4.6 8b47d200d5 Enable -Wmissing-prototypes compiler warning
Add `static` to file-local functions and forward declarations
for cross-TU functions to satisfy `-Wmissing-prototypes`.

This ensures all functions have visible prototypes before their
definitions, improving code quality and catching accidental
linkage issues.

Reference: https://github.com/ClickHouse/ClickHouse/issues/76944

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
2026-03-27 20:11:07 +00:00