Skip to main content

Module verify

Module verify 

Source
Expand description

Read-only end-to-end store verification. Read-only end-to-end store verification.

verify_store walks one store directory with the decoders the engine already uses to open it: the manifest frame, every referenced segment’s header, region checksums, file trailer and region decoders, and the WAL prefix through the same replay that recovery runs. It reports every damaged artifact it finds instead of stopping at the first, and it never writes: the walk calls only the read half of Vfs (open, read, open_for_map and list).

A finding is damage, never a notice. Recovery refuses a WAL that does not end cleanly, so a torn WAL tail is reported like any other WAL corruption. Unreferenced segment files and leftover temporary files are not findings, because a writable open removes them without losing data.

The walk reads a point-in-time view of the directory. Verifying a store while another process writes to it can report a write that is in flight.

Structs§

Finding
One damaged artifact.
VerifyReport
Result of one verification walk.

Enums§

FindingKind
What is damaged. Values are stable; new kinds are only appended.
VerifyError
Why a walk could not start. Damage inside the store is never an error; it is a Finding.

Functions§

verify_store
Verifies the store directory at path on the platform filesystem.
verify_store_on_vfs
Verifies the store directory at path through vfs, using only its read operations.