Repository navigation
v4.3.1
Nuthatch 4.3.1 fixes a wrong answer in 4.3.0. Under a memory budget, a join between a window's
output and an aggregate could silently drop most of its matches. On the Lodestar allocations nest,
4.3.0 returned no URL or geohash for 71 of 97 indexers, and no creation details for most provisions.
Take it if you run 4.3.0. Running 4.2.1 is also safe, and that is where the allocations nest was
rolled back to.
The wrong answer
Since 4.3.0, Burrmill under a budget hashes a repartition's keys over plain text rather than string
views. A key that was an expression, such as LOWER(x), was still hashed as a view, while a bare
column was hashed as text. Arrow hashes the two differently. So when a window partitioned by
LOWER(a), LOWER(b) met an aggregate grouped by the same values, the partitioned hash join matched
a row only when both hashes happened to send it to the same partition. With 8 partitions that is
about one row in eight.
Every key of a repartition now hashes the type it was planned with. A view selecting one row per key
with ROW_NUMBER() ... WHERE rn = 1 and then LEFT JOINing it was the shape that broke. The test that
caught it compares answers, not only memory.
Also from Burrmill
TRY_CAST(text AS HUGEINT)of a value from 10^38 to 2^127 - 1 answers inIS NULLand inSUM,
as DuckDB does, where 4.3.0 returned NULL. Reading such a value directly refuses by name, because
nuthatch'sHUGEINTisDECIMAL(38,0)and cannot hold it.- A sort with
LIMITskips row groups that cannot hold the answer. On one segment,
ORDER BY block_number LIMIT 3read 28 KB instead of 1.81 MB.
Ingestion
A seal-direct window that grew over an empty stretch could take in dense history all at once,
several gigabytes on a busy contract. A window now stops at 20,000 logs, plus at most one block, and
fetches the rest in order. The sealed bytes are the same.
Operations
/metricsexports the analytics memory pool's reserved and peak bytes. On Linux it also exports
jemalloc's allocated, active, resident and retained bytes. The Grafana dashboard splits RSS by them.- The release gate compares every statement's answer with production's, and refreshes its copy of the
allocations nest from Helsinki before each run. It was this comparison that found the wrong answer. - A daily parity timer compares the allocations nest with the subgraph, at the sealed pin and at head.
Measured
On a copy of the allocations nest under production's settings, on Linux: 74 of 74 statements answered.
Of the comparable answers, 72 matched 4.2.1, and the two tie-paged statements matched on row count.
p99 was 2.9 s against 4.2.1's 4.3 s. Peak RSS was 1,572 to 1,692 MiB over four runs. 4.2.1 peaked at
2,945 MiB on the same copy.
Compatibility and upgrade
Replace the binary and restart. There is no storage migration, configuration change or re-index.