Expand description
DAG discovery on the master: reported hashes, parse jobs, uploaded parses and the DAG list.
A worker reports each root’s content hash (at registration and on every change); a hash with no stored parse for the worker’s schedr version gets a parse job. Workers can report different hashes for a root (git-sync not everywhere yet): its current parse is that of the newest code an alive worker reports, newest meaning the hash workers switched to most recently (recorded in the database, so a master restart decides the same). A switch is a worker moving to new code (a hash not recorded yet) or reverting (to a hash recorded before the one it left), judged by its own move, not by the current hash (decision 113): a lagging worker catching up to a hash recorded later isn’t one, and changes nothing. A hash never seen before is newest when first reported. Workers on a hash newer than the current one (its parse on its way) may run the root’s tasks too: they have newer code still. Of that hash’s parses, the one of the newest schedr version an alive worker reporting it has is used (so after an upgrade the new parse takes over once stored). A root no alive worker reports keeps its current parse.
Each time a root’s current parse changes, the DAG list is worked out again from every
root’s current parse (catalog::plan) and the changes are stored. Only the newest code
runs (tasks go to workers on the current hash), so a worker on older code can’t put a DAG
in conflict (see archive/PROJECT.md, DAG ID conflicts).
Structs§
- Discovery
- The master’s view of DAG discovery.
- Memory
- What discovery keeps in memory, copied by
Discovery::memoryto put back when the transaction its changes were part of rolls back (B91). - Parse
Upload - A parse result uploaded by a worker.
Type Aliases§
- Script
Uses - The script roots each DAG root uses (decision 304), by DAG root.