Skip to main content

Module lease

Expand description

Leasing the rows a verify iteration asks about, so no concurrent iteration asks about them too.

Structs§

VerifyAttempt 🔒
The verify attempt a lease counted for its row, which sets the backoff an uncertain row’s answer is scheduled by. Only claim_and_lease makes one, so it is always the count the lease wrote.

Functions§

attempt_facts 🔒
The row’s facts under the attempt the lease counted, not the count the row was claimed with, so the backoff advances once per attempt.
claim_and_lease 🔒
Claims up to limit of flow’s due rows, counts an attempt on each and leases it until its next poll would be due, or the iteration’s registry calls run out, so a concurrent iteration cannot poll the same row. Each answer overwrites its own row’s schedule.

Type Aliases§

Leased 🔒
A claimed row, leased where it stands, with the verify attempt the lease counted for it.