Expand description
Handling catchup request and the end of a region’s wait for its Leader lease.
Structs§
- Catchup
Finish 🔒 - What ends a successful catchup: it finalizes the leadership of a promoted region, ends the catchup and replies.
Functions§
- check_
takeover 🔒 - Returns what the engine prepared for the takeover of
region_id.Nonemeans the engine prepared nothing, as for a catchup sent to the worker directly, and fails withInvalidRequest;Some(Err(e))fails with the error of the preparation. - notify_
leader_ 🔒lease_ wait_ ended - Tells the worker that a lease ended the wait of
regionfor its Leader lease, without waiting. - persist_
backfilled_ 🔒metadata_ and_ notify_ if_ fenced - Persists the metadata the opener filled in for
regionand, if the commit fenced the region, asks its worker throughsenderfor the reload. A save that finds the region not a writable leader with its Leader lease, such as in a change the worker started after it spawned the save, has the worker defer it. - spawn_
persist_ 🔒backfilled_ metadata - Persists the metadata the opener filled in, which the catchup of a region that waits does not, without blocking the worker. The commit runs outside the worker, so it asks for the reload of a region it fences.