Skip to content

v3.13.0

Choose a tag to compare

@github-actions github-actions released this 29 Sep 20:26
· 3229 commits to main since this release
1104c15

Nuthatch 3.13.0 lets a runtime run its own nests' lifecycle. A caller hands it a NID, and the runtime
fetches the nest from a registry, verifies it, indexes it and serves it, then suspends, moves or
reclaims it on request, all over the admin API. It also reports storage per nest, and corrects the
runtime-wide sealed-storage total.

Compatibility and upgrade

Replace the binary and restart. There is no storage migration, NID change or re-index required, and
existing sealed segments remain readable. Three things change for an operator.

  • POST /_admin/nests now answers 202 with a job as soon as the mount is accepted, rather than
    200 once it has finished. A script that relies on the old answer adds ?wait=true, which
    returns the same statuses as before (200, 404, 409, 507).
  • nuthatch_sealed_segments_bytes counted a runtime's shared segment store once per nest, so a
    runtime of N nests reported N times its disk. It now counts each store once. An alert threshold
    set against the old figure will need lowering.
  • A runtime directory may now hold mount-jobs.json, which the runtime writes and reads, and
    mounts.toml may carry a suspended list under [runtime].

The complete admin API is described in docs/admin-api.md.

A mount fetches what the runtime does not hold (#1543, #1551)

nest publish now also records a bundle under its NID, and nest load <nid> --registry <path> pulls
it back, refusing a bundle whose recomputed NID differs from the one asked for. A runtime started
with --registry does the same for a live mount: a NID it does not hold is fetched, verified as
nest load verifies it, and installed at data/<nid>/. A mount that is refused after the fetch
removes what it fetched, so a refusal leaves nothing on disk. Without --registry the refusal names
the flag.

A mount is a job (#1544)

A mount that fetches can take minutes, longer than an HTTP client waits. It now answers 202 with a
job, readable at GET /_admin/mounts/<name> as it moves from accepted through fetching and
joining to live, or to failed with the reason, and reads suspended while it is paused.
Reading it never waits on a mount in progress.
Unfinished jobs resume after a restart, and a second request for the same name and NID is
idempotent.

Suspend and resume (#1548)

POST /_admin/suspend/<name> takes a mount off its cursor, releases its store and answers 503 in
place of its routes, keeping its data and its record across a restart. Its job reads suspended.
POST /_admin/resume/<name> catches it up from where it stopped. Resuming a quarantined mount
releases the quarantine.

Move a name without a gap (#1549)

POST /_admin/move/<name> with a new nid mounts the new nest beside the old one, lets it catch
up, then switches the name in one step. A reader polling the name through the move sees the old
nest, then the new, and never an error between.

Dry run a mount (#1550)

?dry_run=true on a mount reports its chain, start block, the backfill ahead, the extraction that
costs RPC calls per block, and its projected memory against the cursor's ceiling, together with the
refusal a real mount would give. It runs the same admission checks a mount does and mounts nothing.

Reclaim over the admin API (#1547)

DELETE /_admin/nests/<name>?reclaim=true removes the dataset once no mount references it, and
DELETE /_admin/datasets/<nid> reclaims one unmounted earlier. A dataset another mount still uses
is kept, and the answer names the mounts holding it. Inside a running runtime only the segments that
dataset alone references are removed; segments a live fold left behind stay for an offline
nuthatch prune.

Storage per nest (#1557)

/metrics now carries nuthatch_nest_hot_store_bytes and nuthatch_nest_sealed_segments_bytes
for each nest: its own hot store, and the segments its own manifest names. A segment two datasets
share counts under both, so for disk used read the unlabelled total.