Skip to main content

Module handle_catchup

Module handle_catchup 

Source
Expand description

Handling catchup request and the end of a region’s wait for its Leader lease.

Structs§

CatchupFinish 🔒
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. None means the engine prepared nothing, as for a catchup sent to the worker directly, and fails with InvalidRequest; 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 region for its Leader lease, without waiting.
persist_backfilled_metadata_and_notify_if_fenced 🔒
Persists the metadata the opener filled in for region and, if the commit fenced the region, asks its worker through sender for 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.