Skip to main content

Module scan

Module scan 

Source
Expand description

Bounded QSync content scan (SVC-01.16 partial).

Logical size is a u64. Admitted resident is a u32 cap (4 MiB), never a buffer allocated to that size or to logical_bytes. Each page copies into a caller-owned buffer of at most MAX_PAGE_BYTES. This is not RAM-sized materialization and is not a complete QSync package.

Declared limits: wire delivery is at-least-once (a QdnfError::Capacity does not advance the cursor, so the same offset may be re-offered). Local application of Ok(n > 0) is at-most-once for this cursor (offset advances). Not exactly-once. Continuations do not refill remaining caps. Cancelled complete cannot resurrect.

Structs§

ScanBudget
Remaining scan quanta. Continuations must not refill these fields.
ScanCursor
Copy cursor: operation id, logical offset, generation, remaining budget.

Constants§

MAX_PAGES
Maximum pages charged against one remaining ScanBudget.
MAX_PAGE_BYTES
Maximum bytes copied into one caller page.
Q42_QUINS_PER_SUPERBLOCK
Maximum 48-byte NQuins stored in one .q42 SuperBlock.
Q42_SUPERBLOCK_BYTES
Canonical .q42 SuperBlock byte size (853 NQuins × 48 B + 16 B tail padding).
RESIDENT_CAP_BYTES
Admitted resident ceiling. Not a dataset size and not an allocated buffer.

Functions§

admit_scan
Admit a page-sized exclusive lease (never logical_bytes) for this scan.
allocation_class_hot_zero_heap
next_page copies into caller-owned out with no Vec/String/Box.
at_least_once_delivery
Pages may be re-offered after Capacity if the cursor was not advanced.
at_most_once_local_application
Once Ok(n > 0) returns, a later next_page uses a higher offset.
cancel_scan
Stop further pages. A cancelled cursor cannot resume as if cancel never happened. Idempotent.
cancel_scan_in
Cancel the cursor and the admitted operation, if present.
complete_scan
Finish the admitted scan. After cancel this releases storage and returns QdnfError::Cancelled so a late page is not a live success.
continuation_refills_budget
Continuations never restore pages/work/bytes.
next_page
Copy the next page into out using the synthetic XOR fill.
next_page_from
Copy the next page from source via ScanSource::read_at at cursor.offset.
next_page_in
Gate further pages on OperationTable cancel. Table cancel stops pages.
open_production_scan
Open a production scan bound to source. Requires a non-zero source digest.
open_scan
Open a scan over a logical size. Never materializes logical_bytes.
open_scan_bound
Open a scan bound to an authenticated source identity (not computed here).
production_scan_uses_synthetic_xor
Production scans copy through ScanSource, never the XOR fill.
ram_sized_dataset_materialized
This module never allocates or maps a RAM-sized logical dataset.
scan_pages_are_storage_evidence
True only when open_scan_bound attached a non-zero source digest.
synthetic_scan_is_storage_evidence
Synthetic XOR next_page fill is never storage evidence.
verify_superblock_slice_parity_and_sha256
Verify a .q42 SuperBlock slice against its expected SHA-256 Merkle chain digest and verify canonical 5-field NQuin XOR parity (s ^ p ^ o ^ c ^ m) on every 48-byte Quin in the slice (R08).