skip to content
==> README.md <==
1# @ajax/mesh-jobs-lid
2
3The job table's leadership ids. A lid is the fleet term in its high 24 bits and a count below it.
4`mj_lid_next` picks one above every leadership a member has persisted, so a later leadership's lid
5is always larger, even within one term (a restarted coordinator, a leader that leads again), and
6never comes from a clock (review finding 10). `mj_lease_base` is the first lease id of a leadership,
7so two leaderships' leases never share an id. Header-only and freestanding.
8
9## Ported from
10
11[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) (Richard Safier, MIT):
12`crates/mesh-host/src/jobs.rs`: `lid_term`, `lid_next`, `lease_base`.
13
14## Tests
15
16`tests/lid.c`: the checks in the Rust's `a_restarted_coordinator_with_its_clock_behind`, and the
1724-bit term limit.
18
19## Licence
20
21MIT. See the repository's LICENSE.