Skip to content

v4.6.0

Choose a tag to compare

@github-actions github-actions released this 05 Oct 00:04
· 2597 commits to main since this release
adf6f4a

Nuthatch 4.6.0 makes floating-point sums reproducible, adds an opt-in table of Arbitrum's L1 block
numbers, and fixes a memory overcharge and a slow walk over long empty ranges. It is a minor because
a float SUM or AVG can move by its last bit, and because of the new setting.

Reproducible float sums

A SUM or AVG over DOUBLE gave different last bits from one server process to the next, because
the engine combined partial sums in whatever order its threads finished (#1849). Float sums are now
accumulated exactly and rounded once, so the answer is the correctly rounded sum of the values
whatever the thread count, batch size or segment layout.

  • An answer can move by one last bit from 4.5.0's, towards the exact sum.
  • An intermediate overflow no longer becomes infinity: 1e308 + 1e308 - 1e308 is 1e308.
  • Empty input is still NULL, -0.0 still sums to 0.0, and NaN and opposing infinities behave as
    before.
  • Integer and decimal sums are unchanged.

Arbitrum's L1 block number

[extract] l1_blocks = true adds a table, l1_blocks, with block_number, block_hash,
l1_block_number and, when the nest records timestamps, block_timestamp, for each block that
carries one of the nest's rows (#1839). It uses the headers nuthatch already fetches for those blocks,
so it does not fetch every block as [extract] blocks does. Off by default; a nest that leaves it off
is unchanged on disk.

  • Refused on a listed chain that does not report the value, and alongside [extract] blocks, which
    already carries it.
  • A header without l1BlockNumber refuses the window rather than storing a zero.
  • Turning it on for a nest that has already indexed is refused at startup; it needs a fresh index.

Fixes

  • Memory. An ordered aggregate over text, such as array_agg(x ORDER BY name), was charged for its
    sort keys' whole shared buffers once per repartitioned piece, about 72 MB booked for 1 MB of rows on
    a busy server, so a query could be refused for memory it did not use.
  • Long empty ranges. After a refused range was split, the window ceiling stayed at the narrowest
    piece on the pipelined seal path, so a long empty tail was walked in small windows: 4,005 calls
    against 50 on the test's 1M-block tail (#1787).
  • Error hints. The closest-column suggestion, the _dec companion hint and the corrupt-segment
    hint had not fired since 4.1; they read the old engine's wording. They now read the current one.

Operations

  • deploy/roll-helsinki-from-mac.sh refuses a release whose release-gate/<nest> status is not
    success for every unit it rolls; --override '<reason>' rolls anyway and says so (#1848).
  • deploy/audit/enable-from-mac.sh checks every endpoint a nest indexes or sealed from, its
    nuthatch.toml included, before editing any unit, and restores a unit that does not come back.

Compatibility and upgrade

Replace the binary and restart. There is no storage migration or re-index.