Skip to content

The deployment guide lists the ClickHouse codec settings Loom works best with - #143

Merged
zlareb1 merged 50 commits into
mainfrom
docs/clickhouse-codec-settings
Oct 22, 2026
Merged

zlareb1 merged 50 commits into
mainfrom
docs/clickhouse-codec-settings

Conversation

@zlareb1

@zlareb1 zlareb1 commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Related: #115

Changelog category (leave one):

  • Documentation

Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):

The deployment guide explains the ClickHouse codec settings, how to check their constraints, and how to rebuild existing vector tables after enabling them.

Why

Loom can start with plain vectors when a ClickHouse settings profile blocks the codec. Turning the settings on later does not rebuild existing tables. Operators need the setting checks, restart step and table-specific rebuild commands in one place.

Scope and risk

Documentation in the deployment guide and ClickHouse architecture page, cross-links from the maintenance and performance guides, plus corrections to shared test clocks, credentials, buffered inserts, graph flush timers and settings resets. The instructions distinguish a read-only setting already at 1 from a setting held at 0, describe quantization with or without the additional LZ4 chain, and list every coded table with its required rebuild flags.

The rebuild instructions cover empty or placeholder vectors, other vector widths, abandoned twins, rollback and dropping pre-rebuild copies. Rebuilds require a maintenance window with all writers stopped and pending operations drained. Every rebuild and rollback copy must be dropped before traffic resumes because those copies retain content outside normal erasure. Compression and search gains depend on the data; this change claims no fixed ratio or speedup.

Merge order: #144 lands first. This PR then updates the deployment guide's rebuild procedure to the tool as #144 leaves it (the width refusal, no post-swap repair, arrayExists(x -> x != 0, <column>) in the manual checks, the grants and the --drop-pre-rebuild check) and keeps its link from the maintenance guide to that procedure.

Compatibility, rollout and rollback

  • Wire: none.
  • Operator steps: optional codec configuration and table rebuilds, run from a repository clone matching the deployed version. A fresh install uses the settings available during migration; an existing install needs explicit rebuilds during a maintenance window and a restart after cleanup.
  • Rollback: revert the documentation. The guide also describes the rebuild tool's rollback before dropping its old copies.

Tests

  • Settings tests wait for a reset to reach the serving worker before reading the baseline and check the cleanup response. Both stale-read cases fail on the base and pass against three workers after the fix; all three settings tests pass in each order.
  • Graph-write buffers and delayed flushes are cleared between unit tests. A two-test reproduction fails on the base with the provider-transition assertion and passes with the cleanup; the transition assertions are unchanged.
  • Shared fixture checks: two freshness regression cases pass per branch. With the corrected fixture, 23 affected integration tests and 103 auth-on isolation tests pass against a private three-worker server with a configured end-user issuer.
  • SDK fallback credentials are minted per test, so a suite that outlasts the one-hour token does not reuse an expired key. A real pytest regression fails on the base and passes both generated-token and caller-supplied-token cases with the fix. No production token lifetime changes.
  • Checked settings against CodecSettings, the table list against CODED_TABLES, and the rebuild commands against the CLI and its table-specific checks.
  • The shared-flush integration test synchronizes its 21 request ids before flushing and retains all row, column and exactly-once assertions. It passes on the base and feature trees with explicit synchronization.
  • Inherited CI clock fixture: 210 related tests pass; the low-uptime regression passes with the clock scoped to its module. Production code is unchanged by this test correction.
  • Documentation and public-copy tests: 201 passed. Full unit suite with the graph cleanup: 23,886 passed, 68 skipped, one expected failure. make format-check, make lint and make typecheck passed.

AI assistance in the code (leave one; writing this description with AI is fine):

  • AI-generated (Claude Code and Codex): coding agents wrote and reviewed the documentation against the implementation. Independent review checked the settings, table list, rebuild flags and cleanup instructions.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • make format-check, make lint, make typecheck and make test-unit pass.
  • No generated files, migrations, plugins or frontend files change.
  • Documentation names operator steps and makes no wire changes.
  • Repository text passes public-copy checks.
  • Review commits are signed off.

zlareb1 and others added 30 commits October 22, 2026 07:43
…est with

How to turn on enable_quantized_codec and allow_suspicious_codecs on self-managed ClickHouse and ClickHouse Cloud, and how to move an existing install onto them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…ve rebuild commands that run where an operator is

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…and cover a held chain setting

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…build block through uv, and give it the cluster once

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…ors the way the gate does, and link the requirements row

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…unt vectors at the width the gate probes

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…each setting gives without an unmeasured adjective

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…ck its copy

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
… point at CODED_TABLES for the list

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…-setting rules instead of repeating them, and point the vector-storage bullet at the rebuild steps

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…nd drop the repeated settings link

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
… the hand-run SQL uses, and say Cloud holds the chain setting by default

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…it with FINAL as the gate does, and reflow the section

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…d gate-failing namespaces the way the gate reads them

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…do by when they ran, and say how to stop the block

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…old-copy drop, and re-request them with their purge flag

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Copying and post-swap repair can restore erased rows, while rebuild and rollback copies are not fully covered by erasure. Drain pending work and stop writers until checks and cleanup finish.

Signed-off-by: Lareb Zafar <[email protected]>
…r rebuild copies

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
A SQL client can connect to a different default database even when it uses the Loom account. Use the same explicit database name as the other operator queries.

Signed-off-by: Lareb Zafar <[email protected]>
…t its served multiplier, and say the abort file stops only rebuilds

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…ribe coded vector columns as the fresh install makes them

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…ebuild copy, and scope the coded-column sentence to CODED_TABLES

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…s to the deployment's settings, and state the database note once

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…vector tables a second model creates

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
zlareb1 and others added 12 commits October 22, 2026 15:53
…of restating them, and name every place a fetch multiplier can be set

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…-storage bullet

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…y the vector-storage pointer

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Replacing the shared monotonic clock can expire the model-call switch snapshot on a short-uptime runner. Replace only the hold module clock so unrelated caches keep real time.

Signed-off-by: Lareb Zafar <[email protected]>
…ild steps

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…m, and name the partition-key procedure

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…er FINAL, and stop when the common width is not the served one

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
… per-table re-embeds, and run the tool with the deployment's environment

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
zlareb1 and others added 8 commits October 22, 2026 17:42
A long integration run can outlive the session token. Fresh per-test credentials keep the one-hour lifetime and preserve caller-supplied keys.

Signed-off-by: Lareb Zafar <[email protected]>
… buffers on a timeout, and run the credentials child without the parent's addopts

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
An adaptive queue may flush its first request immediately after an idle period. Use a fixed window for the shared-flush assertion and drain tasks even if the cleanup flush fails.

Signed-off-by: Lareb Zafar <[email protected]>
Clear graph-write buffers and timers at teardown so model transitions do not
inherit pending work. Wait for a settings reset before reading the baseline
on another worker, and check that cleanup succeeds.

Signed-off-by: Lareb Zafar <[email protected]>
@zlareb1
zlareb1 merged commit 06860c9 into main Oct 22, 2026
18 checks passed
@pufit pufit mentioned this pull request Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant