How Ctrl-C Reaches a Running Query: The Client's Cancel Packet
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.
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.
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.
ClickHouse compiles a SELECT into an ActionsDAG and reuses the sorted plan for every block.
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.
ClickHouse stores a per-part TTL expiry bound and removes expired rows during a merge, using a bit mask rather than a rewrite.