Adds a page on what the chart lock reaches - #249
Merged
Merged
Conversation
A host running many tenants in one database, or its suite in parallel shards, asked what the chart advisory lock reaches. docs/chart-lock.md states the two modes and what waits on what, the store-scoped key and why its unit is the store and not the tenant, the prefix-free search_path edge, the read-then-retire upgrade hazard with a grep a host runs over its own code, parallel test suites, and that the router and the Oban adapter never choose a host's version. The README's "Retiring a chart" section and docs/retention.md link it. Documentation only: no Elixir file changes, so there is no gate to run (CLAUDE.md, the commit row).
johnnyt
force-pushed
the
sp-0rds-chart-lock-reach-page
branch
from
September 30, 2026 06:15
7830c76 to
c29d914
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
docs/chart-lock.md, a host page on what the per-chart advisory lock reaches, and links it from the README's "Retiring a chart" section and fromdocs/retention.md. Closes sp-0rds.The page covers:
(namespace, hashtext(store <> " " <> content_hash)), what "the store" is (the chart table under its:prefix), why its unit is the store and not the tenant (the charts table's unique index is oncontent_hashalone), the prefix-freesearch_pathedge, and the key before this change;statifier_routerandstatifier_obannever choose a host'sstatifier_persistenceversion, their lockfiles being their own.Review (in-turn, docs tier)
Every claim was checked against
origin/mainatc720da0. The key, both modes and the transaction scope:chart_lock/3,chart_store/1,fetch_retired_info/2andretire_chart/3inlib/statifier_persistence/storage/ecto.ex, and@chart_lock_namespace("SPCH"). The shared read's callers:Storage.check_chart_retired/2fromcreate/4,migrate/4andmigrate_tree/4(recheck_retired/2) inlib/statifier_persistence/executions.ex. The unique index oncontent_hashalone:up/1inlib/statifier_persistence/ecto/migrations/v01.ex.:prefixas the schema's@schema_prefixand the default table prefix:lib/statifier_persistence/ecto/config.exandlib/statifier_persistence/ecto.ex. The in-memory adapter's in-transition check:tombstone_on/2inlib/statifier_persistence/storage/in_memory.ex. The upgrade hazard and its40P01, and the key's unit, the prefix-free edge and the collision caveat: ADR-0012's 2026-09-29 Note and 2026-09-29 Amendment. The per-module suffix:@conformance_hash_suffixinlib/statifier_persistence/testing/storage_conformance.ex.PGDATABASE:config/test.exs. The sibling requirements: the two sibling repos'mix.exs, read only. The grep on the page was run over this repository and returns matches. The whole diff is additive; no ADR line changes.Provenance
docs/retention.mdlink the page by its absolute GitHub URL, the way the README already linksdocs/upgrading.md. A relative link would need the page inmix.exs's docs extras and package files; this change keepsmix.exsuntouched, so the page is on GitHub and not in HexDocs. Adding it to the extras is a small follow-up if it should ship in the package docs.Gate
Documentation only: no Elixir file changes and no gated path is touched, so there is no local gate to run (the repo's CLAUDE.md commit row). CI runs the full
mix quality, including the docs and doc-links stages. No changelog fragment: documentation takes none.