Skip to content

Commit 0584290

Browse files
committed
refactor(run-engine): share one copy of the remaining ck lua
Finishes what the ack, nack and dead-letter commit started. The two enqueue commands, the TTL sweep and the dequeue are each written once now, with named slots the two builds fill differently. Most slots are insertion points the virtual-time build adds to and the flag-off build leaves empty. Two builders are not like that, and the comment above them says so: the flag-off enqueue fills one slot and the flag-off dequeue fills four, so neither renders from an empty object. In the dequeue some slots open Lua blocks that the shared text below them closes, which means a slot's block depth is part of its contract and neither build renders valid Lua on its own. That is the price of sharing 120-odd lines of a script whose two builds really do diverge; a later commit adds a SCRIPT LOAD test so an unbalanced render fails in CI rather than at the first EVAL. Both builds of all seven pairs render byte-identical to the scripts they replace, checked against the commits before this refactor rather than by reading. Flag-off is unchanged, which is the property the dark launch rests on.
1 parent 838896a commit 0584290

1 file changed

Lines changed: 3874 additions & 4308 deletions

File tree

  • internal-packages/run-engine/src/run-queue

0 commit comments

Comments
 (0)