brimdata / super

A novel data lake based on super-structured data
https://zed.brimdata.io/
BSD 3-Clause "New" or "Revised" License
1.38k stars 64 forks source link

Revert "Introduce zed.Arena (#5118)" and "sort: Fix spill garbage collection bug (#5239)" #5278

Closed nwt closed 4 weeks ago

nwt commented 1 month ago

This reverts commits ce9626eb3c418f429de6e589af100ef5b2aa56e0 and 1ffe14f6161bd0609fe8f5ec22255de7dafeb62f.

A zed.Value allocated by a zed.Arena holds an untyped pointer to the arena in zed.Value.a, hiding the arena from the garbage collector and requiring maintenance elsewhere of a typed pointer that lives as long as the zed.Value. Failure to do so reliably has so far led to three distinct panics not caught by automated tests, and more are likely to appear.

At the same time, arenas haven't produced the anticipated performance benefit, in part because they introduce new bottlenecks without obvious fixes.

In this light and given current priorities, time spent fixing arena bugs isn't well spent, so this change removes zed.Arena.

Closes #5150, #5154, #5259