Promotion lock at 100k files: stop re-stamping carried rows (13.9 s, 89.9% is the carry) #307

Open
opened 2026-09-26 22:26:37 +02:00 by buildagent · 0 comments
Member

Found during Phase 1 of the pluggable-languages work (lane R, 2026-09-26). This must be resolved before a language flips to a package, because every package extraction then goes through generation promotion.

State: at 100k files, generation promotion holds the write lock for about 13.94 s (bench_promotion_lock, nightly). The existing record attributes 89.9% of that to "the carry": the UPDATE that re-stamps generation_id on every carried row, which cascades by trigger into symbols, refs and imports.

Direction: do not re-stamp carried rows. For example, keep the active generation's id and move only the dirty rows. This is a schema and read-path redesign across the ~58 places that filter on the active generation.

Gates:

  • bench_promotion_lock before and after, run on a quiet machine.
  • Corpus suites green, with no baseline moved.
  • Every read path that filters on the active generation is covered by a test that fails if it reads a stale generation.
Found during Phase 1 of the pluggable-languages work (lane R, 2026-09-26). This must be resolved before a language flips to a package, because every package extraction then goes through generation promotion. **State:** at 100k files, generation promotion holds the write lock for about 13.94 s (`bench_promotion_lock`, nightly). The existing record attributes 89.9% of that to "the carry": the UPDATE that re-stamps `generation_id` on every carried row, which cascades by trigger into symbols, refs and imports. **Direction:** do not re-stamp carried rows. For example, keep the active generation's id and move only the dirty rows. This is a schema and read-path redesign across the ~58 places that filter on the active generation. **Gates:** - `bench_promotion_lock` before and after, run on a quiet machine. - Corpus suites green, with no baseline moved. - Every read path that filters on the active generation is covered by a test that fails if it reads a stale generation.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
h-dv/code-index#307
No description provided.