Expand description
Storage integrity checking logic for the Shardline server ecosystem.
This crate provides pure fsck functions that operate on explicit store parameters rather than server configuration.
§Quick start
The issue and report types are pure data, so you can build and inspect them without touching any storage:
use shardline_fsck::{
FsckIssue, FsckIssueDetail, FsckIssueKind, FsckReport,
};
let issue = FsckIssue {
kind: FsckIssueKind::MissingChunk,
location: "protocols/xet/global/chunks/abcd".to_owned(),
detail: FsckIssueDetail::HashMismatch {
expected_hash: "expected...".to_owned(),
observed_hash: "observed...".to_owned(),
},
};
assert_eq!(issue.kind.as_str(), "missing_chunk");
let report = FsckReport {
latest_records: 10,
version_records: 10,
inspected_chunk_references: 20,
inspected_dedupe_shard_mappings: 0,
inspected_reconstructions: 0,
inspected_webhook_deliveries: 0,
inspected_provider_repository_states: 0,
issues: vec![issue],
};
assert!(!report.is_clean());
assert_eq!(report.issue_count(), 1);To run a real check, use run_fsck_with_stores with explicit record,
index, and object-store adapters, or run_local_fsck for the
local-filesystem layout.
Structs§
- Fsck
Issue - One integrity issue reported by the checker.
- Fsck
Report - Integrity-check report.
Enums§
- Fsck
Error - Fsck operation failure.
- Fsck
Issue Detail - Integrity issue detail.
- Fsck
Issue Kind - Integrity issue kinds for the checker.
- Fsck
Reconstruction Plan Detail - Reconstruction-plan detail for fsck issues.
- Provider
Repository State Timestamp Field - Provider repository state timestamp field.
Constants§
Functions§
- run_
fsck_ with_ stores - Runs local filesystem integrity checks over Shardline metadata and chunk storage using explicit store parameters.
- run_
local_ fsck - Runs local filesystem integrity checks over Shardline metadata and chunk storage.
Type Aliases§
- Local
Fsck Issue - Backward-compatible local fsck issue alias.
- Local
Fsck Issue Kind - Backward-compatible local fsck issue-kind alias.
- Local
Fsck Report - Backward-compatible local fsck report alias.