Skip to main content

validate_tail_lenient

Function validate_tail_lenient 

Source
pub fn validate_tail_lenient(buffer: &[u8]) -> LenientValidationResult
Expand description

Leniently validates a WAL byte stream, reporting trailing corruption without failing.

Reads all complete, decodable records and reports the offset of the last valid record boundary. If trailing bytes cannot be parsed as a valid record, they are reported as trailing_corruption but the function still succeeds.

Mid-stream corruption (corruption followed by valid records) is NOT handled by this function — that would indicate a more serious integrity issue.