~<owner> crashed-writer memtables foreverdog/DOG.h:775 (DOG-046) leaves a crashed writer's memtable as
<dir>/~<10-RON64-owner><ext> and says its owner, bee's sweep, reaps it.
index/index.js:387:Wt hasExt matches the suffix and therefore KEEPS it. Every
killed or ^C'd bee index leaves one per open handle: five in
/src/linux/.git/be (4 KB default-page ones), two in /src/git, and a tri
handle opened at TRI_MEM_ROWS = 1<<20 leaves a 4 MB one. Readers ignore them
(count 0), so this is a pure, unbounded leak. Found in the 2026-09-18 index
review.
sweep unlinks any entry whose basename starts with ~. Unlinking a live one
is harmless: the owner keeps its mapping and still seals a real run.
~ test lives in sweep, not in hasExt: the suffix
says "live format" for a sealed run and for a memtable
alike, and only the sweep has to tell the two apart.~ entry goes, whatever its extension — the dir is
bee's own derived state and dog names nothing else so.~ entriesfresh (index/index.js:397:Wt) still counts an orphan
~<owner>.lite3.idx as an index, and it is read BEFORE
the sweep unlinks it: a dir holding orphans alone makes a
from-scratch derive take the small memtable, and
door.js:385 reads such a repo as already indexed. One run
now heals it; widening fresh is gritzko's call.