Skip to content

v4.1.0

Choose a tag to compare

@github-actions github-actions released this 02 Oct 10:42
· 3026 commits to main since this release
79d3180

Nuthatch 4.1.0 changes the SQL engine. Analytical queries run on
Burrmill, our engine on DataFusion, and DuckDB is no
longer in the binary. A nest's files are untouched and nothing is re-indexed, but /sql, the views
and the entity checks are answered by a different planner, and this note lists where its answers, its
refusals and its costs differ. It is 4.0.2 plus #1612, #1613, #1615, #1616, #1619, #1620 and #1626.

The 4.x promise covers config, data directories and the tables and columns nuthatch generates. It
has never covered the SQL dialect behind /sql, and docs/operators.md says an engine change ships
in a minor with notes that say so. These are those notes.

Compatibility and upgrade

Replace the binary and restart. There is no storage migration, NID change or re-index, and sealed
segments are read as they are. Copy the data directory first, as for any 4.x upgrade: there is no
engine to switch back to, only the previous binary.

Check three things before the restart.

  • NUTHATCH_ENGINE. Unset or burrmill starts. duckdb, shadow and checked are refused at
    startup, by name, rather than served by an engine the unit did not ask for.
  • Memory. Each analytics session has analytics.memory_limit (512 MB) as before. DuckDB spilled
    a hash join to disk when it ran out; Burrmill's hash joins and final aggregates cannot, so a
    statement that needs more is refused with an out-of-memory error. A nest whose views join a
    great deal needs the limit raised, and NUTHATCH_MAX_RSS raised to admit it (#1619). The largest
    nest we run needed 2 GB and eight analytics threads where DuckDB had 256 MB: at 1 GB it refused
    12 or 13 of the 103 statements its dashboard sends. Measured on a copy of that nest, 2026-10-01.
  • Units that name the spill directory. It is nuthatch-spill-{pid}-{seq} under
    analytics.temp_directory, where it was nuthatch-duckdb-{pid}-{seq}. Directories left by an
    earlier release are swept as before.

The Linux binary no longer links libstdc++. It needs glibc and nothing else.

What /sql answers differently

4.0 4.1
SUM, MIN or MAX over a _dec column holding a value that did not fit 38 digits answered from the rows that fit refused, naming the aggregate
a named query DuckDB could not bound, because its plan rescanned refused as unboundable admitted, with a bound from Burrmill's plan
a function DuckDB refused without ICU refused answered
typeof of a maintained count HUGEINT DECIMAL(38,0); the JSON value is the same
a whole-number literal INTEGER BIGINT
range of more than ten million rows answered refused
a correlated subquery that is not flattened, as a named query refused, naming a delim join refused, naming a nested loop join

The first row is the one to read twice. A total that silently leaves out the values too large to
hold is a wrong total, and 4.1 declines to produce it. A statement that sums such a column fails
after the upgrade and has to say what it means: cast the source column, or guard the value with
_overflow.

In entity and fold SQL, eight spellings DuckDB's parser accepted are refused at load (#1613): 1_000,
E'x', postfix ISNULL, **, GROUP BY #1, GLOB, TABLE t and ASOF JOIN. The last was
lowered as an inner join before, which was wrong.

Where it is slower

  • Each statement. About 2.5 times DuckDB's time on our largest nest, through /sql, with eight
    times the memory allowed to each session (2026-10-01).
  • A date range that arrives through a join. DuckDB read the one day asked for; Burrmill reads
    every segment. Eight dashboard statements over one day took about 4.5 s where DuckDB took 0.7 s.
    Not fixed in this release.
  • Planning very deep views. Queries that compose about thirty views plan at roughly one second
    each against 0.3 s. Part of that is a quadratic walk in DataFusion 55, fixed upstream for 56.
  • The binary. 112 MB against 41 MB, measured on the release artifacts on 2026-09-26.

Removed

  • nuthatch emit dune and its view translation (RFC-0055, withdrawn). It depended on DuckDB's
    parser, and Dune support is deprecated.
  • nuthatch bench authored-entity, which measured the RFC-0041 spike against DuckDB.
  • The shadow-burrmill cargo feature and the shadow and checked modes. They existed only in builds
    from main between 4.0 and 4.1, to run the two engines side by side.

Also in this release

  • A transfer between 10^38 and 2^127 no longer enters balances, exposure or velocity, and is
    counted in dropped_over_i128 (#1613). The restart path and the live path now agree on it.
  • A cursor waiting at the tip quarantines a nest whose entity circuit has died (#1613).
  • An entity relation keeps the types its plan declares and exists before it has a row, and a pooled
    session stops answering for an entity that has since faulted (#1626).
  • NUTHATCH_BURRMILL_MEMORY_LIMIT takes the place of analytics.memory_limit where it is set, and
    NUTHATCH_MAX_RSS raises the wall the memory split is held to. It can only be raised (#1619).
  • A statement stopped for spilling past analytics.max_temp_size is still answered 507 (#1626).

What we have not measured

The glibc floor in the README (2.34) was measured on the 4.0 artifact. The footprint job's 256 MB
and 2 GiB ceilings were set against DuckDB. Both are re-measured on this release's artifacts before
it is tagged, and this section is replaced by the figures.