pub struct ValidationReport {
pub block: String,
pub index_version: u8,
pub meta_version: i32,
pub series: u64,
pub chunks: u64,
pub segments: SegmentReport,
pub postings: Option<PostingsStats>,
pub findings: Vec<Finding>,
}Expand description
Everything validation learned about a block.
Fields§
§block: StringBlock ULID.
index_version: u8Index format version read from the index header.
meta_version: i32Version field of meta.json (the meta format, not the index format).
series: u64Series count from scanning the index.
chunks: u64Chunk count from scanning the index.
segments: SegmentReportSegment summary from walking the chunk files.
postings: Option<PostingsStats>Postings section summary, when it could be read.
findings: Vec<Finding>Everything that did not line up.
Implementations§
Source§impl ValidationReport
impl ValidationReport
Sourcepub fn is_ok(&self) -> bool
pub fn is_ok(&self) -> bool
True when no Severity::Error was recorded.
Warnings do not make a block unusable, but see
Self::into_result for a strict interpretation.
Sourcepub fn findings_of(&self, severity: Severity) -> impl Iterator<Item = &Finding>
pub fn findings_of(&self, severity: Severity) -> impl Iterator<Item = &Finding>
Iterates the findings of a given severity.
Sourcepub fn error_count(&self) -> usize
pub fn error_count(&self) -> usize
Number of recorded errors.
Sourcepub fn warning_count(&self) -> usize
pub fn warning_count(&self) -> usize
Number of recorded warnings.
Sourcepub fn into_result(self) -> Result<Self>
pub fn into_result(self) -> Result<Self>
Fails when anything at all was reported.
Use this when a single unexpected field means the block must not be exported, e.g. before a migration run that has to be restartable.