Interface IPageSource
A read-only, random-access source of 8 KiB storage pages. The seam every integrity check reads through, so the same catalogue can run against an offline bundle, a live engine, a backup file, or a synthetic in-memory image.
public interface IPageSource : IDisposable
- Inherited Members
Remarks
Implementations must be side-effect free: no lock acquisition, no WAL replay, no clean-shutdown flag mutation, no
page-cache residency change. This is principle PR-2 (scan never mutates) expressed as a type constraint —
it is what makes a scan always safe to run, including on a production database and on one that will not open.
Deliberately not a page cache: no pinning, no eviction, no epochs, no latches. The scanner streams and does its own bounded buffering so it can walk a very large database in a process with a small heap without competing with a live engine's cache budget.
Properties
PageCount
Number of pages addressable in this source. Indices [0, PageCount) are in range.
int PageCount { get; }
Property Value
Methods
Describe()
Human-readable identity of the source, used to anchor findings: a bundle path, a backup id, or "live".
string Describe()
Returns
TryReadPage(int, Span<byte>)
Reads page index into destination.
bool TryReadPage(int index, Span<byte> destination)
Parameters
Returns
- bool
truewhen the page was read in full;falsewhen it does not exist in this source (out of range, or a hole in a sparse source such as an incremental backup). Afalsereturn is not an error — the caller decides whether an absent page is a finding.