Skip to main content

PoolStoreReader

Struct PoolStoreReader 

Source
pub struct PoolStoreReader { /* private fields */ }
Expand description

Strictly read-only view of a PoolStore for exhaustive validation.

Unlike super::PoolStore, this type opens both the catalog and member environments with MDB_RDONLY. It never finalizes Pending locations, updates access temperature, repairs locations, or records adaptive state. A validator can therefore inspect an online or copied Pool without changing any catalog or member bytes.

Implementations§

Source§

impl PoolStoreReader

Source

pub fn open<P: AsRef<Path>>( path: P, config: PoolStoreConfig, ) -> Result<Self, StoreError>

Source

pub fn open_sequential<P: AsRef<Path>>( path: P, config: PoolStoreConfig, ) -> Result<Self, StoreError>

Open a strict reader for an exhaustive, key-ordered catalog and payload audit with kernel read-ahead enabled on the catalog and every member LMDB.

Source

pub fn open_sequential_with_read_concurrency<P: AsRef<Path>>( path: P, config: PoolStoreConfig, read_concurrency: usize, ) -> Result<Self, StoreError>

Open an exhaustive reader with bounded parallel reads for distinct loose external member files.

Source

pub fn open_with_unavailable_members_for_audit<P: AsRef<Path>>( path: P, config: PoolStoreConfig, ) -> Result<Self, StoreError>

Open a strict read-only validator while retaining unavailable manifest members as explicit per-read errors.

This is intentionally audit-only behavior. Ordinary readers must use Self::open, which fails immediately when any configured member cannot be opened.

Source

pub fn delete_protection_status( &self, ) -> Result<Option<PoolDeleteProtectionStatus>, StoreError>

Source

pub fn hold_delete_protection( &self, lease_id: Hash, expected_record_sha256: Hash, ) -> Result<PoolDeleteProtectionGuard, StoreError>

Source

pub fn blob_location( &self, hash: &Hash, ) -> Result<Option<PoolMemberId>, StoreError>

Source

pub fn member_ids(&self) -> Vec<PoolMemberId>

Return the exact member identities declared by the Pool manifest.

Validators use this to pin the complete target-member set instead of accidentally accepting a newly added or removed member.

Source

pub fn manifest_identity(&self) -> PoolManifestIdentity

Return the complete manifest identity captured by this reader.

Source

pub fn validate_terminal_catalog_and_payloads( &self, ) -> Result<PoolTerminalAudit, StoreError>

Exhaustively prove terminal catalog and physical member state.

Every location must decode as Stored, reference a manifest member, have its exact secondary index entry, and resolve to bytes of the declared size and SHA-256. Each member’s blob and metadata key sets must be identical and exactly match catalog ownership, so missing metadata and addressable member orphans are rejected even when counts coincide. Callers must keep all target Pool writers fenced for the full scan.

Source

pub fn validate_terminal_catalog_and_physical_state( &self, ) -> Result<PoolPhysicalAudit, StoreError>

Exhaustively prove exact catalog/physical-member parity without rereading multi-terabyte payload bodies.

Source

pub fn scan_terminal_catalog_entries_after( &self, after: Option<Hash>, limit: usize, ) -> Result<Vec<(Hash, u64)>, StoreError>

Scan one bounded terminal catalog page without reading payload bytes.

Every row must already be Stored; callers can merge the returned hash/size stream with an independently certified content-evidence stream while target writers remain fenced.

Source

pub fn member_existing_hashes_in_sorted_candidates( &self, member: PoolMemberId, hashes: &[Hash], ) -> Result<Vec<bool>, StoreError>

Mark which sorted candidate hashes physically exist on one exact Pool member. No catalog fallback or mutation is performed.

Source

pub fn read_member_hashes_bounded_unverified( &self, member: PoolMemberId, hashes: &[Hash], byte_limit: u64, ) -> Result<Vec<(Hash, Vec<u8>)>, StoreError>

Read a bounded prefix of sorted, physically present hashes from one exact Pool member without checking their content hashes.

Callers must pass only hashes reported present by Self::member_existing_hashes_in_sorted_candidates and must verify every returned body against its requested hash.

Source

pub fn blob_member_candidates( &self, hashes: &[Hash], ) -> Result<Vec<Vec<PoolMemberId>>, StoreError>

Resolve candidate member order for many hashes with one catalog transaction. Moving records prefer the target and retain the source as a read fallback; pending and stored records contain one candidate.

Source

pub fn blob_catalog_locations( &self, hashes: &[Hash], ) -> Result<Vec<PoolCatalogLocation>, StoreError>

Return exact catalog state for many hashes in one read transaction.

This deliberately exposes Pending and Moving rather than reducing them to read candidates, so a release audit cannot mistake an in-progress write or relocation for terminal residency.

Source

pub fn blob_size_sync(&self, hash: &Hash) -> Result<Option<u64>, StoreError>

Source

pub fn get_sync(&self, hash: &Hash) -> Result<Option<Vec<u8>>, StoreError>

Read and hash-check bytes without finalizing or otherwise touching the catalog. Moving records try the target first and then the source.

Source

pub fn read_hashes_bounded( &self, hashes: &[Hash], byte_limit: u64, ) -> Result<Vec<PoolReadBatchItem>, StoreError>

Resolve a bounded prefix with one catalog transaction and coalesced member reads. The returned prefix always contains at least one item when hashes is non-empty and byte_limit is non-zero.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V