note_data_transid() registers the tempfile's transid in
BeesContext::m_temp_transid so the extent crawler cannot advance into
the range where the tempfile's extents are still acquiring refs.
reset() erases the entry at the start of each mutation cycle, but the
destructor did not: a BeesTempFile destroyed while holding data (a
worker thread torn down, or an exception unwinding past the dedupe
that would have reset it) left its entry in the map forever. The
dead entry pins temp_transid_min() at that transid, and the crawler
stalls permanently behind a file that no longer exists
(crawl_temp_transid_hold counts the held polls).
Erase the entry in the destructor alongside the fd-cache and
blacklist cleanup.
Assisted-by: Claude-Code:claude-fable-5
// Remove from blacklist
m_ctx->blacklist_erase(BeesFileId(m_fd));
+
+ // Drop the crawler hold. reset() erases it on every mutation
+ // cycle, but a tempfile destroyed while holding data (worker
+ // teardown, unwound exception) would otherwise pin
+ // temp_transid_min() at its transid forever and stall the extent
+ // crawler behind a file that no longer exists.
+ m_ctx->temp_transid_erase(BeesFileId(m_fd));
}
static