The fleet reconciler: makes this member's programs match the committed document (loads, upgrades, migrations with views, the lockstep group's epochs and cycles, placement)
$ sexc add @ajax/mesh-reconcile- total 3
- drwxr-xr-x-../
- drwxr-xr-x-Oct 27 04:12v/# 1 version
- drwxr-xr-x-Oct 27 04:12files/# the files of 0.1.0
- latest
- 0.1.0, published Oct 27 04:12 by ajax
- owners
- ajax
- license
- MIT
- dependencies
- @ajax/mesh-check ^0.1.0, @ajax/mesh-mt ^0.1.0, @ajax/mesh-strmap ^0.1.0, @ajax/mesh-member-list ^0.1.0, @ajax/mesh-fleet-doc ^0.1.0, @ajax/mesh-fleet-plan ^0.1.0, @ajax/mesh-sched-tracker ^0.1.0, @ajax/mesh-peer-codec ^0.1.0, @ajax/mesh-abi-reconcile ^0.1.0, @ajax/mesh-abi-peer-sizes ^0.1.0
- dependents
- none yet
- keywords
- mesh alphaos fleet fleet reconcile lockstep migration
- homepage
- https://github.com/thomasdavis/alpha-c-mesh/tree/main/packages/mesh-reconcile
- repository
- https://github.com/thomasdavis/alpha-c-mesh
1# @ajax/mesh-reconcile 2 3The fleet reconciler: makes this member's programs match the committed desired state, on every commit 4and when the member (re)joins (it is the only thing that changes the program set in a fleet). One pass: 5 61. the plan (`@ajax/mesh-fleet-plan`): unloads, loads, upgrades (or rollbacks), run states and resets. 7 A program this member has no image for is reported *unsupported*, not failed; a failure is skipped 8 at that hash until the 30 s retry or the next document. Programs migrating here are loaded stopped, 9 take their views from the source (producers first) and start (consumers first), and the move's 10 outcome (with its gap) goes out on the beat; 112. the lockstep group: a new epoch quiesces, sets the group words, resets and HELLOs; a cycle within 12 the epoch quiesces with rounds mirrored and HELLOs only with the document's image and the cycle's 13 task done here (review finding 2), never re-running a task that failed; 143. on the leader, the placement requests (one dropped from the document goes back to local). 15 16Everything that touches the driver, the mailbox and the fleet thread goes through `mrc_ops`, which the 17daemon wires. `mrc_thread_start` runs it on its own thread (post documents; failures retried after 1830 s). 19 20## Ported from 21 22[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) `crates/mesh-host/src/reconcile.rs`: 23`run`, `Rec` (`pass`, `act`, `migrate`, `fetch_view`, `quiesce`, `set_group_words`, `ready`, `group`, 24`place`, `status`), `cycle_ready`, `image_ready`. 25 26## Tests 27 28`tests/reconcile.c`: the Rust's `a_cycle_is_hellod_only_with_its_image_and_task`, and passes against a 29fake driver: loads, an upgrade, an unload, an unsupported program, a failure skipped and retried, a 30migration in the right order, a lockstep epoch and a task cycle, a paused group, placement on the leader. 31 32## Licence 33 34MIT. See the repository's LICENSE.