Skip to main content

Module handle_rebuild_index

Module handle_rebuild_index 

Source
Expand description

Handles index build requests.

Structs§

IndexBuildSnapshot 🔒
Parts of a region version that index build tasks need.

Functions§

index_needs_rebuild 🔒
needs_background_indexes 🔒
Returns whether a background build may replace the index of file: a file that already has an extension index was indexed whole by its writer, and a replacement would erase those blobs.
select_whole_region_builds 🔒
Selects the files that a build of build_type for every file of a region builds, from the region’s files that its manifest records (candidates, each with the manifest’s file meta). A flush build, which the end of a wait for the Leader lease asks for, builds no extension index, so it leaves the files that have one. Of the others it builds those whose index in the version is not current for the plan of build_type: a publication committed to the manifest but not yet applied is still invisible to queries, and its build still holds the file, so a manual build waits for it.
validate_rebuild_plan 🔒
Rejects invalid current options before selecting files or scheduling any task.