Expand description
The resolve-enrolments phase: which enrolment the attainment belongs to, and what we will send.
Ends with the payload frozen and the row queued for import in checking_enrolment, never
submitting: that state means a request may be in flight, and is the import phase’s to write.
The row spends the Suotar round trip itself in resolving_enrolment, not checking_enrolment:
import’s claim query reads the latter, and the row’s own claim lock is gone as soon as the
preflight transaction commits. Landing in a state import does not claim keeps a second tick of
import from sending a request before the enrolment this one resolves is known.
A row parked in no_usable_enrolment is checked where it stands instead, under
claim_enrolment_checks, so a check that finds nothing leaves it there with only its schedule
and last check time moved.
Each iteration first looks up the Sisu person for links that lack one; see persons.
Modules§
- enrolments 🔒
- The second half of a
resolve-enrolmentsiteration: the enrolment lookup, and freezing the payload the import will send. - persons 🔒
- The first half of a
resolve-enrolmentsiteration: the Sisu person behind a registrar-reported link, which arrives with a student number only.
Enums§
- Lookup 🔒
- Which kind of lookup a claimed row is on, read from the state it was claimed in.
Functions§
- claim_
for_ 🔒lookup - Claims
rowfor its lookup, expecting the in-flight statehold_in_flightwrites in the claim’s transaction. - hold_
in_ 🔒flight - Keeps the claimed rows from being claimed again, or imported, while their lookups are out. In the claim’s transaction, whose lock makes each move’s guard a confirmation of the state it read.
- keep_
lookups_ 🔒in_ flight - Restarts the recovery grace of the rows a split still holds before each resent half, so a split that outlasts it does not see them recovered, and their answers discarded, meanwhile.
- run 🔒
- split_
by_ 🔒lookup - First resolves, which wait in
resolving_enrolment, apart from parked checks, which stay where they are under a check claim.