Skip to content
Opensource internals
  • Posts

Clickhouse

How Ctrl-C Reaches a Running Query: The Client's Cancel Packet

Oct 24, 2026 15 min read Jay Hubbert

Ctrl-C only flips an atomic counter in the client; the receive loop notices, writes a Cancel packet, and keeps draining packets so the connection stays in sync.

ClickhouseNetworkingProtocolInternalsCLI

Read more →

How the ClickHouse Client Splits a Script into Queries

Oct 24, 2026 17 min read Jay Hubbert

The client parses a script statement by statement, ends inline INSERT data at a blank line, and pulls the trailing comment (and its test hint) into the statement it belongs to.

ClickhouseCLIInternalsParsing

Read more →

ClickHouse Builds an Actions DAG Once and Runs It on Every Block

Oct 23, 2026 16 min read Jay Hubbert

ClickHouse compiles a SELECT into an ActionsDAG and reuses the sorted plan for every block.

ClickhouseInternalsQuery planPerformance

Read more →

ClickHouse Coordinates a Cluster-Wide Backup with ZooKeeper

Oct 23, 2026 22 min read Jay Hubbert

A cluster-wide backup is a ZooKeeper-coordinated election: one owner per data file, a stage barrier between phases, and a consensus loop over metadata.

ClickhouseBackupsZookeeperDistributedInternals

Read more →

ClickHouse Deletes Expired TTL Rows Only When Parts Merge

Oct 23, 2026 17 min read Jay Hubbert

ClickHouse stores a per-part TTL expiry bound and removes expired rows during a merge, using a bit mask rather than a rewrite.

ClickhouseInternalsMergetreeTtlPerformance

Read more →

← Newer Page 7 of 21 Older →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·