Skip to content

v3.13.1

Choose a tag to compare

@github-actions github-actions released this 30 Sep 11:34
· 3211 commits to main since this release
bdb294b

Nuthatch 3.13.1 fixes what an end-to-end run of 3.13.0's runtime admin API found against a real chain:
three ways a runtime could be left unable to restart, a move that broke a dataset two tenants shared,
identical mounts sent together that reported a live nest as failed, and a runtime whose metrics were
reachable only through one of its mounts. Anyone driving a runtime over the admin API should take it.

Compatibility and upgrade

Replace the binary and restart. There is no storage migration, NID change or re-index required. Two
things change for an operator.

  • A mount's route now depends on its own tenant alone: the default tenant's mounts serve by alias,
    every other tenant's as tenant/alias. A runtime whose mounts all belong to the default tenant sees
    no change. One whose mounts belong to a single other tenant moves from /<alias>/ to
    /<tenant>/<alias>/, which is the name those mounts were given; one with several tenants keeps them
    all, except that its default-tenant mounts move from /default/<alias>/ to /<alias>/.
  • The admin API refuses, with 400, a mount name the runtime could not boot with: anything but
    letters, digits, _ and -, more than 64 characters a part, more than one /, an alias ending in
    __moving, or the default tenant spelled out (default/usdc, or acme/usdc when
    [runtime] default_tenant = "acme"), which is served by alias alone.

A restart can no longer be refused by the admin API's own writes

  • A mount name the runtime would refuse at boot, such as ../escape or an empty name, was accepted
    and written to mounts.toml, and the next start failed on it. The API now refuses such names before
    anything is recorded.
  • A restart in the middle of a move wrote the staging mount, <name>.moving, whose . boot refuses.
    The staging mount is no longer written at all, and the move, interrupted, resumes as a move.
  • A suspended tenant/alias mount came back from a restart live, at /<alias>/, and could not be
    resumed by its name, because routes were keyed by how many tenants the table held. Routes are now
    keyed per mount (#1565), so a restart never moves one.

Moving a name off a shared dataset (#1549)

Moving one of two mounts of a dataset left the other on the old dataset without the name the cursor
knew it by. The incoming nest could not take over the name, the move reported success regardless, and
unmounting the moved name afterwards stopped the other mount indexing and never released the new
store. The mount left on the dataset now takes over its name on the cursor first, and a rename the
cursor refuses fails the move. When the incoming nest's rename fails after that handover, the handover
is undone, so a failed move leaves the cursor matching the runtime's own records.

Identical mounts sent at once

Several identical POST /_admin/nests requests arriving together each started a worker. One mounted
the nest and the rest failed on the name it had just taken, so the shared job ended failed over a
nest that was mounted and serving. A job is now claimed atomically: the first request starts it, and
every identical request answers with that same job, which ends live. A second worker that finds the
name already mounted on the NID it was asked for counts that as done.

Metrics at the runtime root

A runtime served /metrics only under a mount, so a runtime with nothing mounted exposed none. It
now serves the whole exposition at /metrics.

The token before the body

An admin request without the token but with a malformed body was answered with the parse error
(422 or 415) rather than 401. The token is now checked first.

What live means

A mount's job reads live once it is indexing and serving. For the first mount onto a chain that
happens while its history is still backfilling; /<name>/ready's lag_blocks gives the distance. The
docs now say so.