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.
- Verify
Report - Result of one verification walk.
Enums§
- Finding
Kind - What is damaged. Values are stable; new kinds are only appended.
- Verify
Error - 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
pathon the platform filesystem. - verify_
store_ on_ vfs - Verifies the store directory at
paththroughvfs, using only its read operations.